Skip to content

[BUG] JSONDecodeError when trying to download #1015

Description

@frankengrrl

log_output.txt

Running on Windows with Python 3.14. I just did a clean install of both python and bdfr and I have no idea what's going on here.

Here is my full log:

C:\Users\seana>bdfr download I:\scram --saved --authenticate --no-dupes --search-existing
Traceback (most recent call last):
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\requests\models.py", line 1116, in json
    return complexjson.loads(self.text, **kwargs)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\json\__init__.py", line 352, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\json\decoder.py", line 345, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\json\decoder.py", line 363, 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 "<frozen runpy>", line 203, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Scripts\bdfr.exe\__main__.py", line 5, in <module>
    sys.exit(cli())
             ~~~^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\click\core.py", line 1524, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\click\core.py", line 1445, in main
    rv = self.invoke(ctx)
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\click\core.py", line 1912, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\click\core.py", line 1308, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\click\core.py", line 877, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\click\decorators.py", line 34, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\bdfr\__main__.py", line 117, in cli_download
    reddit_downloader = RedditDownloader(config, [stream])
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\bdfr\downloader.py", line 41, in __init__
    super(RedditDownloader, self).__init__(args, logging_handlers)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\bdfr\connector.py", line 63, in __init__
    self._setup_internal_objects()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\bdfr\connector.py", line 80, in _setup_internal_objects
    self.create_reddit_instance()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\bdfr\connector.py", line 139, in create_reddit_instance
    oauth2_authenticator = OAuth2Authenticator(
        scopes,
        self.cfg_parser.get("DEFAULT", "client_id"),
        self.cfg_parser.get("DEFAULT", "client_secret"),
    )
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\bdfr\oauth2.py", line 21, in __init__
    self._check_scopes(wanted_scopes)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\bdfr\oauth2.py", line 31, in _check_scopes
    known_scopes = [scope for scope, data in response.json().items()]
                                             ~~~~~~~~~~~~~^^
  File "C:\Users\seana\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\requests\models.py", line 1120, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions