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

API URL doesn't work after running Docker container #118

Closed
te4336 opened this issue Feb 27, 2019 · 3 comments
Closed

API URL doesn't work after running Docker container #118

te4336 opened this issue Feb 27, 2019 · 3 comments
Labels
question Further information is requested

Comments

@te4336
Copy link

te4336 commented Feb 27, 2019

When running the API server in the docker container the web UI works however when I got to access the API link I get the following...

{"code":500,"errors":["Traceback (most recent call last):\n File "/venv/lib/python3.6/site-packages/werkzeug/routing.py", line 1538, in match\n rv = rule.match(path, method)\n File "/venv/lib/python3.6/site-packages/werkzeug/routing.py", line 776, in match\n raise RequestSlash()\nwerkzeug.routing.RequestSlash\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/venv/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request\n rv = self.dispatch_request()\n File "/venv/lib/python3.6/site-packages/flask/app.py", line 1791, in dispatch_request\n self.raise_routing_exception(req)\n File "/venv/lib/python3.6/site-packages/flask/app.py", line 1774, in raise_routing_exception\n raise request.routing_exception\n File "/venv/lib/python3.6/site-packages/flask/ctx.py", line 336, in match_request\n self.url_adapter.match(return_rule=True)\n File "/venv/lib/python3.6/site-packages/werkzeug/routing.py", line 1542, in match\n safe='/:|+') + '/', query_args))\nwerkzeug.routing.RequestRedirect: 301 Moved Permanently: None\n"],"message":"301 Moved Permanently: None","status":"error"}

Is there a way to fix this? I followed the directions for the docker container to the letter.

@satterly
Copy link
Member

Does it work if you add a "/" to the end of the API URL? eg. instead of trying http://example.com:8888/api try http://example.com:8888/api/ and see if you get a list of API resource endpoints and no errors?

@satterly satterly added the question Further information is requested label Feb 27, 2019
@te4336
Copy link
Author

te4336 commented Feb 27, 2019

adding the "/" worked. Was just weird as we didn't need that when it was running as a WSGI app natively on the server. Thanks for helping!

@satterly
Copy link
Member

No problem. And yes, it is weird. I'm putting in a fix for it anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants