xtream1101 / humblebundle-downloader

Download you Humble Bundle Library
MIT License
543 stars 63 forks source link

Downloading trove results in error message #60

Closed Ethanadams642 closed 2 years ago

Ethanadams642 commented 2 years ago

When attempting to download using the command hbd -s "my cookie value" --library-path "Downloaded Library" --progress --trove, I get the error:

`Only checking the Humble Trove... Traceback (most recent call last): File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\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)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\Scripts\hbd-script.py", line 33, in File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\humblebundle_downloader\cli.py", line 95, in cli ).start() File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\humblebundle_downloader\download_library.py", line 67, in start File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\humblebundle_downloader\download_library.py", line 185, in _get_trove_products page_content = trove_r.json() File "C:\Users\Ethan\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 917, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: [Errno Expecting value]

405 Method Not Allowed

405 Method Not Allowed

The method GET is not allowed for this resource.

: 0`

Running the command without --trove works as expected.

felinir commented 2 years ago

PR #59 fixed this for me.

You can install hbd from the local repository (after applying the change from the PR) via pip install -e .

Ethanadams642 commented 2 years ago

Works perfectly, Thanks!