Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Web API is not working #11

Open
Open
@PiciAkk

Description

@PiciAkk

Flask web server is not working

Error:

[2021-09-08 15:46:41,025] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
  File "/home/piciakk/.local/lib/python3.8/site-packages/flask/app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/piciakk/.local/lib/python3.8/site-packages/flask/app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/piciakk/.local/lib/python3.8/site-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/piciakk/.local/lib/python3.8/site-packages/flask/app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "maskdetector.py", line 28, in webAPI
    return jsonify(maskStatus)
  File "/home/piciakk/.local/lib/python3.8/site-packages/flask/json/__init__.py", line 348, in jsonify
    f"{dumps(data, indent=indent, separators=separators)}\n",
  File "/home/piciakk/.local/lib/python3.8/site-packages/flask/json/__init__.py", line 129, in dumps
    rv = _json.dumps(obj, **kwargs)
  File "/usr/lib/python3.8/json/__init__.py", line 234, in dumps
    return cls(
  File "/usr/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/piciakk/.local/lib/python3.8/site-packages/flask/json/__init__.py", line 56, in default
    return super().default(o)
  File "/usr/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '

Steps to reproduce

  • Download the latest version of the application
  • Install all the dependencies from the requirements.txt
  • Start the app
  • Try to use the web API
  • Enjoy the error message

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions