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

HTTP 500 when fetching subdevices #49

Open
DRSchlaubi opened this issue Jul 11, 2024 · 0 comments · May be fixed by #48
Open

HTTP 500 when fetching subdevices #49

DRSchlaubi opened this issue Jul 11, 2024 · 0 comments · May be fixed by #48

Comments

@DRSchlaubi
Copy link

2024-07-10 23:09:13.776606598 TypeError: Object of type SubDevice is not JSON serializable
2024-07-10 23:09:13.776605901 raise TypeError(f'Object of type {o.__class__.__name__} '
2024-07-10 23:09:13.776605198 File "/usr/lib/python3.7/json/encoder.py", line 179, in default
2024-07-10 23:09:13.776604469 return super().default(o)
2024-07-10 23:09:13.776603850 File "/usr/local/lib/python3.7/dist-packages/flask/json/__init__.py", line 50, in default
2024-07-10 23:09:13.776603086 return _iterencode(o, 0)
2024-07-10 23:09:13.776602474 File "/usr/lib/python3.7/json/encoder.py", line 257, in iterencode
2024-07-10 23:09:13.776601741 chunks = self.iterencode(o, _one_shot=True)
2024-07-10 23:09:13.776601076 File "/usr/lib/python3.7/json/encoder.py", line 199, in encode
2024-07-10 23:09:13.776600418 **kw).encode(obj)
2024-07-10 23:09:13.776599844 File "/usr/lib/python3.7/json/__init__.py", line 238, in dumps
2024-07-10 23:09:13.776599113 return _json.dumps(obj, **kwargs)
2024-07-10 23:09:13.776598484 File "/usr/local/lib/python3.7/dist-packages/flask/json/__init__.py", line 131, in dumps
2024-07-10 23:09:13.776597689 f"{dumps(data, indent=indent, separators=separators)}\n",
2024-07-10 23:09:13.776596998 File "/usr/local/lib/python3.7/dist-packages/flask/json/__init__.py", line 297, in jsonify
2024-07-10 23:09:13.776596226 "data": data
2024-07-10 23:09:13.776595668 File "/opt/custom_broker/messaging.py", line 14, in make_api_response
2024-07-10 23:09:13.776594930 return make_api_response(data=device.child_subdevices)
2024-07-10 23:09:13.776594211 File "/opt/custom_broker/blueprints/hub.py", line 35, in get_subdevices
2024-07-10 23:09:13.776593448 return f(*args, **kwargs, api_payload=payload)
2024-07-10 23:09:13.776592805 File "/opt/custom_broker/decorator.py", line 83, in wrap
2024-07-10 23:09:13.776592084 return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
2024-07-10 23:09:13.776591279 File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1509, in dispatch_request
2024-07-10 23:09:13.776590431 rv = self.dispatch_request()
2024-07-10 23:09:13.776589645 File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1523, in full_dispatch_request
2024-07-10 23:09:13.776588742 Traceback (most recent call last):
@DRSchlaubi DRSchlaubi linked a pull request Jul 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant