Skip to content

JSON decode error #58

@in1323

Description

@in1323

I'm not a python expert so take my analysis with a grain of salt.
I'm getting a bunch of the JSON decode error on basically any action, which I'm interpreting as the api or the response schema having changed, as no commands seem to be receiving any valid responses.
I have this installed in a docker instance of code-server and it stopped working all of a sudden without any changes from my end, so I interpret this to be changing from the kemono/coomer side, below is the stack trace of the error:

Traceback (most recent call last):

  File "/data/party/.venv/bin/party", line 8, in <module>
    sys.exit(APP())
             ^^^^^

  File "/data/party/.venv/lib/python3.12/site-packages/party/cli.py", line 282, in kemono
    pull_user(**ctx.params)

  File "/data/party/.venv/lib/python3.12/site-packages/party/cli.py", line 136, in pull_user
    user = User.get_user(site, service, user_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/data/party/.venv/lib/python3.12/site-packages/party/user.py", line 83, in get_user
    users = cls.generate_users(base_url)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/data/party/.venv/lib/python3.12/site-packages/party/user.py", line 56, in generate_users
    ).loads(resp.text, many=True)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/data/party/.venv/lib/python3.12/site-packages/marshmallow/schema.py", line 759, in loads
    data = self.opts.render_module.loads(json_data, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Further context, I use some bash scripts to iterate over everything (basically just a list of all the creators/folders I want to search or update) and it neither works with this method, nor via a simple command such as party kemono patreon <id>.
Have also tried a fresh install.
Happy to try look into it myself but I'm not a Python guru so someone smarter than me will probably be a lot quicker :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions