Closed JThreepw closed 8 months ago
Have tested your patch on my machine and it does fix the issue mentioned, have made a pull request to fix it #21. Thank you.
how do I apply the patch I get this error
2023-10-26 11:41:05.299 | DEBUG | party.cli:pull_user:80 - Excluded Extensions: [] Traceback (most recent call last):
File "/data/data/com.termux/files/usr/bin/party", line 8, in
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/party/cli.py", line 87, in pull_user user = User.get_user(base_url, service, user_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/party/user.py", line 61, in get_user users = cls.generate_users(base_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/party/user.py", line 48, in generate_users
return UserSchema(context=dict(site=base_url)).loads(resp.text, many=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/marshmallow/schema.py", line 755, in loads data = self.opts.render_module.loads(json_data, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/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)
It hasn't been applied to this project (yet). But I have just created a release on my fork of the project with the patch applied. so to apply the patch run 'pip install https://github.com/julesupss/party/releases/download/release/party-0.5.0-py3-none-any.whl' should work. Let me know if it doesn't. Here's a link to the release in case you want to inspect the code
@julesupss it works, although when testing, I found something that can be improved, the input string from for user id should be case insensitive to match with the creators list. if it is not a direct match ie has capital letters, the iteration to find creators will fail. Thought you could include this in your PR as well.
@ysjeed done. Made it be case sensitive to begin with and if no user is found then be case insensitive. To install (from my fork) before it comes to this project: 'pip install https://github.com/julesupss/party/releases/download/v0.5.0-CaseInsensitive/party-0.5.0-py3-none-any.whl'
I'm sorry it took me so long to get around to things. I just approved the PR and published a new release. I'm about to update the README right now.
It is no longer working for me, looks like the API has changed (https://coomer.party/api/schema). I could fix it with a small code change: api_change.patch