digitalec / deemon

Monitor specified artists for new releases
GNU General Public License v3.0
176 stars 15 forks source link

int() argument must be a string, a bytes-like object or a number, not 'NoneType', when downloading in version 2.0.5 #39

Closed mathiasfoster closed 3 years ago

mathiasfoster commented 3 years ago

When downloading with deemon download, the download fails with the error: int() argument must be a string, a bytes-like object or a number, not 'NoneType'.

Commands/command output/logs have been edited slightly for clarity.

> deemon -V
deemon 2.0.5
> deemon download
# Navigate to download a specific item
Sending 1 release(s) to deemix for download:
[1/1] The Vaccines - Back In Love City...

In errors.txt:

1341331652 | The Vaccines - Back In Love City | int() argument must be a string, a bytes-like object or a number, not 'NoneType'

In the logs:

2021-10-13 08:49:39 [DEBUG] deemon.core.dmi: Initializing deemix library
2021-10-13 08:49:39 [DEBUG] deemon.core.dmi: deemix 3.5.1
2021-10-13 08:49:39 [DEBUG] deemon.core.dmi: deemix Config Path: /home/mathias/.config/deemix
2021-10-13 08:49:39 [DEBUG] deemon.core.dmi: deemix Download Path: /home/mathias/Music/
2021-10-13 08:49:39 [DEBUG] deemon.core.dmi: Looking for ARL...
2021-10-13 08:49:39 [DEBUG] deemon.core.dmi: ARL found in deemix config
2021-10-13 08:49:40 [DEBUG] deemon.core.dmi: ARL is valid
2021-10-13 08:49:40 [INFO] deemon.cmd.download: Sending 1 release(s) to deemix for download:
2021-10-13 08:49:40 [DEBUG] deemon.cmd.download: Writing queue to CSV file - 1 items in queue
2021-10-13 08:49:40 [DEBUG] deemon.cmd.download: Queue exported to /home/mathias/.config/deemon/queue.csv
2021-10-13 08:49:40 [DEBUG] deemon.cmd.download: deemix bitrate set to None (3)
2021-10-13 08:49:40 [INFO] deemon.cmd.download: [1/1] The Vaccines - Back In Love City...
2021-10-13 08:49:44 [ERROR] deemix: The Vaccines - Back In Love City int() argument must be a string, a bytes-like obje>Traceback (most recent call last):
  File "/home/mathias/.local/lib/python3.8/site-packages/deemix/downloader.py", line 467, in downloadWrapper
    result = self.download(extraData, track)
  File "/home/mathias/.local/lib/python3.8/site-packages/deemix/downloader.py", line 286, in download
    selectedFormat = getPreferredBitrate(
  File "/home/mathias/.local/lib/python3.8/site-packages/deemix/downloader.py", line 88, in getPreferredBitrate
    preferredBitrate = int(preferredBitrate)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
digitalec commented 3 years ago

Fixed in 2.0.6 - deleted previous comment as your bitrate value was a default value in a previous version (~v1.3) but is no longer valid. It was supposed to convert all previous default/acceptable values to the new format ("128", "320", "FLAC") but it was not saving back to the actual configuration therefore passing an invalid parameter.