You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While debugging the Steam Deck updater program I discovered that #59 causes a regression making it unable to parse the new added field back with the following backtrace:
Traceback (most recent call last):
File "/var/home/marco/Desktop/jupiter_controller_fw_updater/./d20bootloader.py", line 912, in <module>
cli()
File "/usr/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/home/marco/Desktop/jupiter_controller_fw_updater/./d20bootloader.py", line 765, in getdevicesjson
print(json.dumps(devs))
^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/json/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/json/encoder.py", line 258, in iterencode
return _iterencode(o, 0)
^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type BusType is not JSON serializable
It's unfortunate 1.0.6 broke that software, but I don't think there is a good way to fix this in pyhidapi without causing even more breakage in other applications which now use BusType.
jupiter-hw-support can either:
remove the bus type field before json encoding
convert the bus type field to an int before encoding
implement a json.JSONEncoder subclass that handles BusType
While debugging the Steam Deck updater program I discovered that #59 causes a regression making it unable to parse the new added field back with the following backtrace:
If you need to take a look at the source code of the software, the code is here: https://gitlab.com/evlaV/jupiter-hw-support/-/tree/master/usr/share/jupiter_controller_fw_updater?ref_type=heads
Downgrading back to 1.0.5 makes the program works correctly.
The text was updated successfully, but these errors were encountered: