rudigiesler / mathml-to-image-service Goto Github PK
View Code? Open in Web Editor NEWHTTP Rest API for converting mathml to various image formats
License: MIT License
HTTP Rest API for converting mathml to various image formats
License: MIT License
After Building the Flask server & svgtex .. I got the below error . Kindly help me to proceed further to get an proper output
(Flask) PS C:\mathml-to-image-service> python -m unittest discover mathml_to_image_service
F.....[2017-03-21 14:37:37,093] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
File "C:\mathml-to-image-service\mathml_to_image_service\Flask\lib\site-packages\flask\app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "C:\mathml-to-image-service\mathml_to_image_service\Flask\lib\site-packages\flask\app.py", line 1614, in full_dis
patch_request
rv = self.handle_user_exception(e)
File "C:\mathml-to-image-service\mathml_to_image_service\Flask\lib\site-packages\flask\app.py", line 1517, in handle_u
ser_exception
reraise(exc_type, exc_value, tb)
File "C:\mathml-to-image-service\mathml_to_image_service\Flask\lib\site-packages\flask_compat.py", line 33, in rerais
e
raise value
File "C:\mathml-to-image-service\mathml_to_image_service\Flask\lib\site-packages\flask\app.py", line 1612, in full_dis
patch_request
rv = self.dispatch_request()
File "C:\mathml-to-image-service\mathml_to_image_service\Flask\lib\site-packages\flask\app.py", line 1598, in dispatch
_request
return self.view_functionsrule.endpoint
File "C:\mathml-to-image-service\mathml_to_image_service\service.py", line 30, in convert
file_name = to_image(svg_string, format, int(max_size), int(quality))
File "C:\mathml-to-image-service\mathml_to_image_service\svg_to_image.py", line 127, in to_image
stderr=subprocess.DEVNULL)
File "c:\program files\python36\Lib\subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "c:\program files\python36\Lib\subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "c:\program files\python36\Lib\subprocess.py", line 707, in init
restore_signals, start_new_session)
File "c:\program files\python36\Lib\subprocess.py", line 990, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
E.EEEEEE
ERROR: test_root_path_post_redirect_to_image (tests.test_service.FlaskrTestCase)
Traceback (most recent call last):
File "C:\mathml-to-image-service\mathml_to_image_service\tests\test_service.py", line 50, in test_root_path_post_redir
ect_to_image
data = json.loads(response.data.decode('utf-8'))
File "c:\program files\python36\Lib\json_init_.py", line 354, in loads
return _default_decoder.decode(s)
File "c:\program files\python36\Lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\program files\python36\Lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
======================================================================
ERROR: test_create_image (tests.test_svg_to_image.SVGToImageTestCase)
Traceback (most recent call last):
File "C:\mathml-to-image-service\mathml_to_image_service\tests\test_svg_to_image.py", line 14, in test_create_image
filename = to_image(svg, 'gif', 200)
File "C:\mathml-to-image-service\mathml_to_image_service\svg_to_image.py", line 127, in to_image
stderr=subprocess.DEVNULL)
File "c:\program files\python36\Lib\subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "c:\program files\python36\Lib\subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "c:\program files\python36\Lib\subprocess.py", line 707, in init
restore_signals, start_new_session)
File "c:\program files\python36\Lib\subprocess.py", line 990, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
======================================================================
ERROR: test_create_image_bad_svg (tests.test_svg_to_image.SVGToImageTestCase)
Traceback (most recent call last):
File "C:\mathml-to-image-service\mathml_to_image_service\tests\test_svg_to_image.py", line 23, in test_create_image_ba
d_svg
filename = to_image(svg, 'png', 200)
File "C:\mathml-to-image-service\mathml_to_image_service\svg_to_image.py", line 127, in to_image
stderr=subprocess.DEVNULL)
File "c:\program files\python36\Lib\subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "c:\program files\python36\Lib\subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "c:\program files\python36\Lib\subprocess.py", line 707, in init
restore_signals, start_new_session)
File "c:\program files\python36\Lib\subprocess.py", line 990, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
======================================================================
ERROR: test_create_quality_1_gif (tests.test_svg_to_image.SVGToImageTestCase)
Traceback (most recent call last):
File "C:\mathml-to-image-service\mathml_to_image_service\tests\test_svg_to_image.py", line 66, in test_create_quality_
1_gif
filename = to_image(svg, 'gif', 200, 1)
File "C:\mathml-to-image-service\mathml_to_image_service\svg_to_image.py", line 127, in to_image
stderr=subprocess.DEVNULL)
File "c:\program files\python36\Lib\subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "c:\program files\python36\Lib\subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "c:\program files\python36\Lib\subprocess.py", line 707, in init
restore_signals, start_new_session)
File "c:\program files\python36\Lib\subprocess.py", line 990, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
======================================================================
ERROR: test_create_quality_1_png (tests.test_svg_to_image.SVGToImageTestCase)
Traceback (most recent call last):
File "C:\mathml-to-image-service\mathml_to_image_service\tests\test_svg_to_image.py", line 50, in test_create_quality_
1_png
filename = to_image(svg, 'png', 200, 1)
File "C:\mathml-to-image-service\mathml_to_image_service\svg_to_image.py", line 127, in to_image
stderr=subprocess.DEVNULL)
File "c:\program files\python36\Lib\subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "c:\program files\python36\Lib\subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "c:\program files\python36\Lib\subprocess.py", line 707, in init
restore_signals, start_new_session)
File "c:\program files\python36\Lib\subprocess.py", line 990, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
======================================================================
ERROR: test_create_quality_2_gif (tests.test_svg_to_image.SVGToImageTestCase)
Traceback (most recent call last):
File "C:\mathml-to-image-service\mathml_to_image_service\tests\test_svg_to_image.py", line 58, in test_create_quality_
2_gif
filename = to_image(svg, 'gif', 200, 2)
File "C:\mathml-to-image-service\mathml_to_image_service\svg_to_image.py", line 127, in to_image
stderr=subprocess.DEVNULL)
File "c:\program files\python36\Lib\subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "c:\program files\python36\Lib\subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "c:\program files\python36\Lib\subprocess.py", line 707, in init
restore_signals, start_new_session)
File "c:\program files\python36\Lib\subprocess.py", line 990, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
======================================================================
ERROR: test_create_quality_2_png (tests.test_svg_to_image.SVGToImageTestCase)
Traceback (most recent call last):
File "C:\mathml-to-image-service\mathml_to_image_service\tests\test_svg_to_image.py", line 42, in test_create_quality_
2_png
filename = to_image(svg, 'png', 200, 2)
File "C:\mathml-to-image-service\mathml_to_image_service\svg_to_image.py", line 127, in to_image
stderr=subprocess.DEVNULL)
File "c:\program files\python36\Lib\subprocess.py", line 286, in check_call
retcode = call(*popenargs, **kwargs)
File "c:\program files\python36\Lib\subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "c:\program files\python36\Lib\subprocess.py", line 707, in init
restore_signals, start_new_session)
File "c:\program files\python36\Lib\subprocess.py", line 990, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
======================================================================
FAIL: test_basic_encode (tests.test_mathoid_client.MathoidTestCase)
Traceback (most recent call last):
File "C:\mathml-to-image-service\mathml_to_image_service\tests\test_mathoid_client.py", line 16, in test_basic_encode
self.assertEqual(get_svg(self.mml), self.svg)
AssertionError: '<svg[39 chars]ink" width="28.74ex" height="6.009ex" viewBox=[10979 chars]svg>' != '<svg[39 chars]ink" s
tyle="width: 28.125ex; height: 5.375ex; [11091 chars]svg>'
Diff is 22261 characters long. Set self.maxDiff to None to see it.
Ran 14 tests in 4.051s
FAILED (failures=1, errors=7)
Can't find anything in the log except that it served a 500...
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
302 is not the correct response for a redirect to a GET from a POST, 303 is a more correct code to use. Information:
http://tools.ietf.org/html/rfc7231#section-4.3.3
http://tools.ietf.org/html/rfc7231#section-6.4.4
http://en.wikipedia.org/wiki/HTTP_303
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.