-
Notifications
You must be signed in to change notification settings - Fork 3
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
ValueError: could not convert string to float: '' #27
Comments
Does the playlist file contain a According to https://en.wikipedia.org/wiki/M3U that's invalid, so the error is correct. |
Indeed it does. The 3 songs I added to test with all read - #EXTINF:,Crazy
Talk
I'll have to look into how to fix that. I created the m3u with Rhythmbox.
Would be handy if you could catch the error and define it - i.e. "Invalid
M3U data" or even "Invalid #EXTINF in M3U"
Thanks for the info!
…On Thu, Nov 9, 2023 at 6:07 AM Radu ***@***.***> wrote:
Does the playlist file contain a #EXTINF: entry without any number of
seconds, such as #EXTINF:123?
According to https://en.wikipedia.org/wiki/M3U that's invalid, so the
error is correct.
—
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMVZ7QELHUMIWFLBCZJWATTYDTBRVAVCNFSM6AAAAAA7DY5F6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBTG4YTANJTGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Perhaps, for |
Ubuntu 22.04
Python 3.10.12
INFO:root:Created playlist with name=Test at id=4rkgtHurcTnsGjp7lHNFMr
Traceback (most recent call last):
File "/usr/local/bin/tospotify", line 8, in
sys.exit(main())
File "/home/serenity/.local/lib/python3.10/site-packages/tospotify/run.py", line 87, in main
update_spotify_playlist(spot, playlist_path, playlist_id, args.convert)
File "/home/serenity/.local/lib/python3.10/site-packages/tospotify/search.py", line 120, in update_spotify_playlist
songs = parse_songs(playlist_path)
File "/home/serenity/.local/lib/python3.10/site-packages/tospotify/parser.py", line 33, in parse_songs
playlist = m3u8.load(playlist_path)
File "/home/serenity/.local/lib/python3.10/site-packages/m3u8/init.py", line 49, in load
return _load_from_file(uri, custom_tags_parser)
File "/home/serenity/.local/lib/python3.10/site-packages/m3u8/init.py", line 56, in _load_from_file
return M3U8(raw_content, base_uri=base_uri, custom_tags_parser=custom_tags_parser)
File "/home/serenity/.local/lib/python3.10/site-packages/m3u8/model.py", line 153, in init
self.data = parse(content, strict, custom_tags_parser)
File "/home/serenity/.local/lib/python3.10/site-packages/m3u8/parser.py", line 143, in parse
_parse_extinf(line, data, state, lineno, strict)
File "/home/serenity/.local/lib/python3.10/site-packages/m3u8/parser.py", line 261, in _parse_extinf
state['segment']['duration'] = float(duration)
ValueError: could not convert string to float: ''
The text was updated successfully, but these errors were encountered: