question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

invalid literal for int() with base 10

See original GitHub issue

What version of Music Assistant has the issue?

2022.7.0

The problem

Logger: music_assistant.music.file
Source: /usr/local/lib/python3.10/site-packages/music_assistant/music_providers/filesystem.py:247
First occurred: 5:09:33 PM (4 occurrences)
Last logged: 5:09:38 PM

Error processing /media/albums/3 Doors Down/Kryptonite/01 - Kryptonite.mp3 - invalid literal for int() with base 10: ''
Error processing /media/albums/4hero/Play with the Changes/01 Morning Child.mp3 - invalid literal for int() with base 10: ''
Error processing /media/albums/4hero/Play with the Changes/14 Gonna Give It Up (Wanna Quit).mp3 - invalid literal for int() with base 10: ''
Error processing /media/albums/Aaliyah/Are You That Somebody/02 - Are U That Somebody.mp3 - invalid literal for int() with base 10: ''
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/music_assistant/music_providers/filesystem.py", line 234, in sync_library
    track = await self._parse_track(entry.path)
  File "/usr/local/lib/python3.10/site-packages/music_assistant/music_providers/filesystem.py", line 544, in _parse_track
    track.disc_number = tags.disc
  File "/usr/local/lib/python3.10/site-packages/music_assistant/helpers/tags.py", line 97, in disc
    return int(tag.split("/")[0])
ValueError: invalid literal for int() with base 10: ''

How to reproduce

have mp3 on file share.

Relevant log output

see above.

Additional information

No response

What version of Home Assistant Core are your running

2022.7.3

What type of installation are you running?

Home Assistant Core

On what type of hardware are you running?

Raspberry Pi

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
marcelveldtcommented, Jul 25, 2022

No worries, it didn’t break on the slash but on the empty string. It’s fixed in 2022.7.1 patch release. Thanks for reporting. If you still experience any issues after installing the 2022.7.1 patch let me know!

1reaction
marcelveldtcommented, Jul 24, 2022

Tagging issue indeed. Looking at the error there’s a string inside the disc field that can’t be parsed to a number.

Please keep this issue open so I can throw a bit more specific exception here

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: invalid literal for int() with base 10: '' - Stack Overflow
The reason is that you are getting an empty string or a string as an argument into int. Check if it ...
Read more >
ValueError: invalid literal for int() with base 10
The error message invalid literal for int() with base 10 would seem to indicate that you are passing a string that's not an...
Read more >
Python ValueError: invalid literal for int() with base 10
This error can frequently occur when converting user-input to an integer-type using the int() function. This problem happens because Python stores the input...
Read more >
ValueError: invalid literal for int() with base 10 in Python
The Python "ValueError: invalid literal for int() with base 10" occurs when we pass a string that cannot be directly converted to an...
Read more >
Python ValueError: invalid literal for int() with base 10 Solution
Our error message tells us there is an invalid literal for an integer in base 10. This means the value we have passed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found