Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bug File name too long #109

Closed
bonzoskill opened this issue Jun 13, 2024 · 1 comment
Closed

Bug File name too long #109

bonzoskill opened this issue Jun 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bonzoskill
Copy link

bonzoskill commented Jun 13, 2024

Installation method:
pipx (arch)

Version:
Python 3.12 and audiobook-dl 0.7.3

Describe the bug
OSError: [Errno 36] File name too long:
After trying to download a podcast with a long name

Command output
audiobook-dl --username username --password password https://www.storytel.com/it/books/i-miracoli-delle-campagne-elettorali-israele-bombarda-una-scuola-40-morti-putin-sarei-uno-scemo-ad-attaccare-la-nat-stoltenberg-e-vero-meloni-da-mentana-tra-numeri-e-mezze-verit%C3%A0-la-bce-taglia-i-tassi-ombrelloni-dove-i-pi%C3%B9-cari-8719787 --debug
DEBUG audiobook-dl 0.7.3
DEBUG python 3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417]
INFO Finding compatible source
INFO Authenticating with storytel
DEBUG Logging in
DEBUG Downloading result of
https://www.storytel.com/it/books/i-miracoli-delle-campagne-elettorali-israele-bombarda-una-scuola-40-
morti-putin-sarei-uno-scemo-ad-attaccare-la-nat-stoltenberg-e-vero-meloni-da-mentana-tra-numeri-e-mezz
e-verit%C3%A0-la-bce-taglia-i-tassi-ombrelloni-dove-i-pi%C3%B9-cari-8719787
INFO
INFO Downloading I miracoli delle campagne elettorali. Israele bombarda una scuola, 40 morti. Putin:
“Sarei uno scemo ad attaccare la Nat”, Stoltenberg: “E’ vero”. Meloni da Mentana, tra numeri e mezze
verità. La Bce taglia i tassi. Ombrelloni, dove i più cari? from storytel
DEBUG Starting downloading file:
https://www.storytel.com/mp3streamRangeReq?startposition=0&programId=7602265&token=RJpb1MH9CBlnFzWAhwc
HPB9lPEeMzNzc
DEBUG expected_status_code not set by source, status-code is 200, please update the source
implementation
DEBUG expected_content_type not set by source, content-type is audio/mpeg, please update the source
implementation
Downloading I miracoli delle campagne elettorali. Israele bombarda una scuola, 40 morti. Putin: “S… …
Traceback (most recent call last):
File "/home/bonzo/.local/bin/audiobook-dl", line 8, in
sys.exit(main())
^^^^^^
File "/home/bonzo/.local/share/pipx/venvs/audiobook-dl/lib/python3.12/site-packages/audiobookdl/main.py", line 31, in main
process_url(url, options, config)
File "/home/bonzo/.local/share/pipx/venvs/audiobook-dl/lib/python3.12/site-packages/audiobookdl/main.py", line 58, in process_url
process_audiobook(result, options)
File "/home/bonzo/.local/share/pipx/venvs/audiobook-dl/lib/python3.12/site-packages/audiobookdl/main.py", line 163, in process_audiobook
download(audiobook, options)
File "/home/bonzo/.local/share/pipx/venvs/audiobook-dl/lib/python3.12/site-packages/audiobookdl/output/download.py", line 37, in download
download_audiobook(audiobook, output_dir, options)
File "/home/bonzo/.local/share/pipx/venvs/audiobook-dl/lib/python3.12/site-packages/audiobookdl/output/download.py", line 47, in download_audiobook
filepaths = download_files_with_cli_output(audiobook, output_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bonzo/.local/share/pipx/venvs/audiobook-dl/lib/python3.12/site-packages/audiobookdl/output/download.py", line 133, in download_files_with_cli_output
filepaths = download_files(audiobook, output_dir, update_progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bonzo/.local/share/pipx/venvs/audiobook-dl/lib/python3.12/site-packages/audiobookdl/output/download.py", line 200, in download_files
for filepath in pool.imap(download_file, arguments):
File "/usr/lib/python3.12/multiprocessing/pool.py", line 873, in next
raise value
File "/usr/lib/python3.12/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, *kwds))
^^^^^^^^^^^^^^^^^^^
File "/home/bonzo/.local/share/pipx/venvs/audiobook-dl/lib/python3.12/site-packages/audiobookdl/output/download.py", line 181, in download_file
with open(filepath, "wb") as f:
^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 36] File name too long: 'I miracoli delle campagne elettorali. Israele bombarda una scuola, 40 morti. Putin: “Sarei uno scemo ad attaccare la Nat”, Stoltenberg: “E’ vero”. Meloni da Mentana, tra numeri e mezze verità. La Bce taglia i tassi. Ombrelloni, dove i più cari?.mp3'

@bonzoskill bonzoskill added the bug Something isn't working label Jun 13, 2024
@bonzoskill bonzoskill changed the title Bug with a name size with storytel Bug File name too long Jun 13, 2024
@freddy36
Copy link
Collaborator

freddy36 commented Jun 27, 2024

This should be already fixed in 7567b2d

Please try the current master branch or the https://github.com/jo1gi/audiobook-dl/releases/tag/v0.7.4 pre release

@freddy36 freddy36 closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants