Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

FileNotFoundError - No such file or directory - bandcamp-dl.json #240

Open
ENiGMATiiQ opened this issue Sep 29, 2024 · 4 comments
Open

FileNotFoundError - No such file or directory - bandcamp-dl.json #240

ENiGMATiiQ opened this issue Sep 29, 2024 · 4 comments
Assignees
Labels

Comments

@ENiGMATiiQ
Copy link

Describe the bug
Fails to start program for any url, says missing json file at user folder

To Reproduce
Command to reproduce the behavior:
bandcamp-dl <URL>

Expected behavior
Downloader runs

Logs

PS C:\Users\Brad> bandcamp-dl --debug <URL>
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Brad\AppData\Local\Programs\Python\Python312\Scripts\bandcamp-dl.exe\__main__.py", line 7, in <module>
  File "C:\Users\Brad\AppData\Local\Programs\Python\Python312\Lib\site-packages\bandcamp_dl\__main__.py", line 34, in main
    conf = config.Config()
           ^^^^^^^^^^^^^^^
  File "C:\Users\Brad\AppData\Local\Programs\Python\Python312\Lib\site-packages\bandcamp_dl\config.py", line 44, in __init__
    self._read_write_config()
  File "C:\Users\Brad\AppData\Local\Programs\Python\Python312\Lib\site-packages\bandcamp_dl\config.py", line 60, in _read_write_config
    with pathlib.Path.open(CONFIG_PATH, mode="w") as fobj:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Brad\AppData\Local\Programs\Python\Python312\Lib\pathlib.py", line 1013, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Brad\\.bandcamp-dl\\bandcamp-dl.json'

Desktop (please complete the following information):

  • OS: Windows
  • Version Windows 11 23H2 22631.4249
  • Python Version 3.12.6

Additional context
Bug present on multiple fresh install attempts across multiple user accounts and on other PCs with fresh Python installs

@sfredo
Copy link

sfredo commented Oct 12, 2024

had a similar error:

FileNotFoundError: [Errno 2] No such file or directory: '/Users/USERNAME/.config/bandcamp-dl.json'

that was resolved by creating the .config folder, yours could be resolved by creating the .bandcamp-dl folder in C:\\Users\\Brad\\

@ENiGMATiiQ
Copy link
Author

had a similar error:

FileNotFoundError: [Errno 2] No such file or directory: '/Users/USERNAME/.config/bandcamp-dl.json'

that was resolved by creating the .config folder, yours could be resolved by creating the .bandcamp-dl folder in C:\\Users\\Brad\\

This resolved it, thanks!

@Evolution0
Copy link
Collaborator

Not solved as the directories should be created if they don't exist automatically.

@ojinikaudeze
Copy link

Sorry I deleted my comment as I created a new ticket. Please advise.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants