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

/new_data/feedback TypeError: the JSON object must be str, bytes or bytearray, not dict #166

Open
mfekadu opened this issue May 28, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@mfekadu
Copy link
Member

mfekadu commented May 28, 2020

Stacktrace

May 28 09:44:03 AM  10.100.0.191 - - [28/May/2020:16:44:03 +0000] "GET / HTTP/1.1" 200 37 "-" "Render/1.0"
May 28 09:44:08 AM  10.104.30.4 - - [28/May/2020:16:44:08 +0000] "OPTIONS /new_data/feedback HTTP/1.1" 200 0 "https://nimbus.calpolycsai.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36"
May 28 09:44:08 AM  [2020-05-28 16:44:08,122] ERROR in app: Exception on /new_data/feedback [POST]
May 28 09:44:08 AM  Traceback (most recent call last):
  File "/opt/render/project/src/.venv/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/render/project/src/.venv/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/render/project/src/.venv/lib/python3.7/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/opt/render/project/src/.venv/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/render/project/src/.venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/opt/render/project/src/.venv/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/render/project/src/.venv/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/render/project/src/flask_api.py", line 239, in save_feedback
    data = json.loads(request.get_json())
  File "/usr/local/lib/python3.7/json/__init__.py", line 341, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
May 28 09:44:08 AM  10.104.30.4 - - [28/May/2020:16:44:08 +0000] "POST /new_data/feedback HTTP/1.1" 500 290 "https://nimbus.calpolycsai.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36"
@mfekadu mfekadu added the bug Something isn't working label May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant