HEnquist / camillagui-backend

Backend server for camillagui
GNU General Public License v3.0
18 stars 4 forks source link

TypeError: Object of type ProcessingState is not JSON serializable #37

Closed DeLub closed 3 years ago

DeLub commented 3 years ago

Hi,

I installed the GUI according to the instructions. It does run the webserver part, and I am able to retrieve the configuration from the running CamillaDSP instance and visualise the filters and pipeline. However the GUI says " State: backend offline" and I get the following error:

Error handling request
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/aiohttp/web_protocol.py", line 406, in start
    resp = await task
  File "/usr/lib/python3/dist-packages/aiohttp/web_app.py", line 435, in _handle
    resp = await handler(request)
  File "/opt/camilladsp/backend/views.py", line 57, in get_status
    return web.json_response(status)
  File "/usr/lib/python3/dist-packages/aiohttp/web_response.py", line 706, in json_response
    text = dumps(data)
  File "/usr/lib/python3.7/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python3.7/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.7/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python3.7/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ProcessingState is not JSON serializable

I'm running CamillaDSP 0.5.2 and gui-backend 0.7.1.

Might the reason be that I'm running Python 3.7 instead of 3.6?

HEnquist commented 3 years ago

Hi! It looks like you are running the latest version of pycamilladsp. I'm working on updating the gui and backend for that, but I'll need a few days more on that.

The current version of the gui works with camilladsp 0.5.2, pycamilladsp 0.5.1 and pycamilladsp-plot 0.5.3. Can you try with those versions?

DeLub commented 3 years ago

I also tried it myself with camilladsp 0.5.2... but downgrading pycamilladsp did the trick. Forget about that one. Thanks.