Giter Club home page Giter Club logo

mathml-to-image-service's Issues

python -m unittest discover mathml_to_image_service - Unit Test Not Passed

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 get it to work...

Can't find anything in the log except that it served a 500...

curl -X POST 127.0.0.1:5000 -d mathml='x2y2' -d image_format=gif -d max_size=500 -d quality=3

<title>500 Internal Server Error</title>

Internal Server Error

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.