Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server error / 500 when Content-Type not set to application/json #9

Open
MonsieurV opened this issue Jul 16, 2020 · 0 comments
Open
Assignees
Labels

Comments

@MonsieurV
Copy link
Member

{"compiler":"pdflatex","resources":[{"main":true,"content":"\\documentclass{article}\n\\usepackage{graphicx}\n\\begin{document}\nHello World! \\\\\n\\end{document}"}]}
:authority: latex.ytotech.com
:method: POST
:path: /builds/sync
:scheme: https
accept: */*
accept-encoding: gzip, deflate, br
accept-language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
content-length: 167
content-type: text/plain;charset=UTF-8
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  | [ERROR app] Exception on /builds/sync [POST]
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  | Traceback (most recent call last):
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |   File "/root/.local/share/virtualenvs/latex-on-http-zfXpYJxv/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |     response = self.full_dispatch_request()
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |   File "/root/.local/share/virtualenvs/latex-on-http-zfXpYJxv/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |     rv = self.handle_user_exception(e)
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |   File "/root/.local/share/virtualenvs/latex-on-http-zfXpYJxv/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |     return cors_after_request(app.make_response(f(*args, **kwargs)))
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |   File "/root/.local/share/virtualenvs/latex-on-http-zfXpYJxv/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |     reraise(exc_type, exc_value, tb)
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |   File "/root/.local/share/virtualenvs/latex-on-http-zfXpYJxv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |     raise value
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |   File "/root/.local/share/virtualenvs/latex-on-http-zfXpYJxv/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |     rv = self.dispatch_request()
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |   File "/root/.local/share/virtualenvs/latex-on-http-zfXpYJxv/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |     return self.view_functions[rule.endpoint](**req.view_args)
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |   File "/app/latex-on-http/latexonhttp/api/builds.py", line 98, in compiler_latex
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |     input_spec, error = parse_json_resources_spec(request.get_json())
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |   File "/app/latex-on-http/latexonhttp/resources/json_api.py", line 24, in parse_json_resources_spec
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  |     entry_key for entry_key in json_payload if entry_key in PAYLOAD_KEYS_TO_COPY
Jul 16 17:16:54 laura docker-compose[17924]: latex_1  | TypeError: 'NoneType' object is not iterable
@MonsieurV MonsieurV added the bug label Jul 16, 2020
@MonsieurV MonsieurV self-assigned this Jul 16, 2020
@MonsieurV MonsieurV changed the title Server error / 500 when Content-Type not set to application/json Server error / 500 when Content-Type not set to application/json Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant