Skip to content

removed ".decoder" from orjson in crafty-4/app/classes/web/routes/api/roles/index.py: line 113

The error Handler in line 113 of the roles/index.py occurred another error:

Traceback (most recent call last):
  File "D:\crafty4\app\classes\web\routes\api\roles\index.py", line 112, in post
    data = orjson.loads(self.request.body)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
orjson.JSONDecodeError: invalid literal: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python312\Lib\site-packages\tornado\web.py", line 1784, in _execute
    result = method(*self.path_args, **self.path_kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\crafty4\app\classes\web\routes\api\roles\index.py", line 113, in post
    except orjson.decoder.JSONDecodeError as e:
           ^^^^^^^^^^^^^^
AttributeError: module 'orjson' has no attribute 'decoder'

To fix this I simply removed the .decoder like in the /servers route

Edited by Iain Powrie

Merge request reports