sinkaroid / booru

Python bindings for booru imageboards
https://sinkaroid.github.io/booru
MIT License
25 stars 3 forks source link

[Bug] "got an unexpected keyword argument 'encoding'" from json.loads deserialization #2

Closed Rprloekwirt closed 2 years ago

Rprloekwirt commented 2 years ago

Describe the bug When running the gelbooru example:

gel = booru.Gelbooru()
res = await gel.search(query="cat_girl", limit=50)

I get an error:

parser.py", line 145, in deserialize return json.loads(better_object(data), encoding="utf-8") File "/usr/lib/python3.9/json/init.py", line 359, in loads return cls(**kw).decode(s) TypeError: init() got an unexpected keyword argument 'encoding'

To Reproduce Steps to reproduce the behavior: Run the gelbooru example from the pip install page.

Expected behavior Retrieves an image from gelbooru.

Desktop (please complete the following information):

sinkaroid commented 2 years ago

Yes actually you right, the argument encoding was removed from json.loads in Python 3.9
I will fix and make optional method soon

sinkaroid commented 2 years ago

Please check new release, that was fixed