Closed mathiasfoster closed 2 years ago
This is what happens when trying deemon search
.
> deemon search
# ... get to the point of selecting a track
:: [SELECT] Please choose an option or type 'exit': 1
{'id': 911221012, 'readable': True, 'title': 'Great Boleros Of Fire (Live 1977)', 'title_short': 'Great Boleros Of Fire', 'title_version': '(Live 1977)', 'isrc': 'GBSMU7724364', 'link': 'https://www.deezer.com/track/911221012', 'duration': 236, 'track_position': 1, 'disk_number': 1, 'rank': 206506, 'explicit_lyrics': False, 'explicit_content_lyrics': 2, 'explicit_content_cover': 2, 'preview': 'https://cdns-preview-9.dzcdn.net/stream/c-94c5d62820797dd86c541f3b164f993a-6.mp3', 'md5_image': '093ee6df448cab16637fefcaba7990ce', 'artist': {'id': 533311, 'name': 'Meatloaf', 'tracklist': 'https://api.deezer.com/artist/533311/top?limit=50', 'type': 'artist'}, 'type': 'track'}
Traceback (most recent call last):
File "/home/mathias/.local/bin/deemon", line 8, in <module>
sys.exit(main())
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/__main__.py", line 5, in main
cli.run()
File "/home/mathias/.local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/mathias/.local/lib/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/mathias/.local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mathias/.local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mathias/.local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cli.py", line 435, in search
client.search_menu()
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cmd/search.py", line 100, in search_menu
artist_selected = self.artist_menu(self.search_results['query'], self.search_results['results'], quick_search)
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cmd/search.py", line 161, in artist_menu
self.album_menu(results[response])
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cmd/search.py", line 304, in album_menu
self.track_menu(filtered_choices[selected_index])
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cmd/search.py", line 361, in track_menu
self.send_to_queue(selected_item)
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cmd/search.py", line 450, in send_to_queue
if item['record_type'] in ['album', 'ep', 'single']:
KeyError: 'record_type'
> cat .config/deemon/logs/deemon.log
# ... previous logs elided
2022-02-02 13:08:56 [DEBUG] deemon.cli: deemon 2.9.0-beta3
2022-02-02 13:08:56 [DEBUG] deemon.cli: command: "search"
2022-02-02 13:08:56 [DEBUG] deemon.cli: Python 3.8.10
2022-02-02 13:08:56 [DEBUG] deemon.cli: Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.29
2022-02-02 13:08:56 [DEBUG] deemon.cli: deemon appdata is located at /home/mathias/.config/deemon
2022-02-02 13:08:56 [DEBUG] deemon.core.config: Loading configuration, please wait...
2022-02-02 13:08:56 [DEBUG] deemon.core.config: Attempting to locate deemix's .arl file
2022-02-02 13:08:56 [DEBUG] deemon.core.config: Successfully loaded ARL
2022-02-02 13:08:56 [DEBUG] deemon.core.db: Database version 3.5.2
2022-02-02 13:08:56 [DEBUG] deemon.core.db: DATABASE UPGRADE IN PROGRESS!
2022-02-02 13:08:56 [DEBUG] deemon.core.config: Loaded config for profile 1 (default)
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > check_update: 1
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > debug_mode: True
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > release_channel: stable
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > query_limit: 5
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > rollback_view_limit: 10
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > prompt_duplicates: False
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > prompt_no_matches: True
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > new_releases/by_release_date: 1
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > new_releases/release_max_age: 90
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > global/bitrate: 128
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > global/alerts: False
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > global/record_type: all
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > global/download_path: Music
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > global/email:
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > deemix/path:
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > deemix/arl: ********
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > deemix/check_account_status: False
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > smtp_settings/server:
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > smtp_settings/port: ********
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > smtp_settings/username:
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > smtp_settings/password:
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > smtp_settings/from_addr:
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > plex/base_url:
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > plex/token:
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > plex/library:
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > experimental/experimental_api: True
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > experimental/allow_unofficial_releases: False
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > experimental/allow_compilations: False
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > experimental/allow_featured_in: False
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > profile_id: 1
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > tid: 159
2022-02-02 13:08:56 [DEBUG] deemon.core.config: > profile_name: default
2022-02-02 13:08:57 [DEBUG] deemon.core.api: Deezer account type is "Free"
2022-02-02 13:08:57 [DEBUG] deemon.core.api: Using GW API, max_threads set to 50
2022-02-02 13:09:03 [DEBUG] deemon.core.api: DEBUG_MODE: RefreshArtist Meatloaf
After deleting deemon.db
and starting again:
# Export Artist IDs to CSV
> deemon show artists -cHf id -e artists.csv
# Delete database
> rm ~/.config/deemon/deemon.db
# Import artists setting time machine date to last refresh
> deemon monitor -I artists.csv -T 2022-01-28
> deemon search
# get to the point of adding a track
:: [SELECT] Please choose an option or type 'exit': 1
{'id': 1632297152, 'readable': True, 'title': 'High', 'title_short': 'High', 'title_version': '', 'isrc': 'USQX92105208', 'link': 'https://www.deezer.com/track/1632297152', 'duration': 175, 'track_position': 1, 'disk_number': 1, 'rank': 912726, 'explicit_lyrics': True, 'explicit_content_lyrics': 1, 'explicit_content_cover': 2, 'preview': 'https://cdns-preview-4.dzcdn.net/stream/c-412eb6fad6d3395f29e05787e7aa3d9e-3.mp3', 'md5_image': 'bad3a7e5a75316205db68a254c57c0ab', 'artist': {'id': 4104927, 'name': 'The Chainsmokers', 'tracklist': 'https://api.deezer.com/artist/4104927/top?limit=50', 'type': 'artist'}, 'type': 'track'}
Traceback (most recent call last):
File "/home/mathias/.local/bin/deemon", line 8, in <module>
sys.exit(main())
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/__main__.py", line 5, in main
cli.run()
File "/home/mathias/.local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/mathias/.local/lib/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/mathias/.local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mathias/.local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mathias/.local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cli.py", line 435, in search
client.search_menu()
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cmd/search.py", line 100, in search_menu
artist_selected = self.artist_menu(self.search_results['query'], self.search_results['results'], quick_search)
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cmd/search.py", line 161, in artist_menu
self.album_menu(results[response])
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cmd/search.py", line 304, in album_menu
self.track_menu(filtered_choices[selected_index])
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cmd/search.py", line 361, in track_menu
self.send_to_queue(selected_item)
File "/home/mathias/.local/lib/python3.8/site-packages/deemon/cmd/search.py", line 450, in send_to_queue
if item['record_type'] in ['album', 'ep', 'single']:
KeyError: 'record_type'
Odd error!
Looks like two different bugs here. The playlist issue seems to be caused by a private playlist perhaps? Do you know which one?
The second bug with search is probably related to the conversion to the new API. I’ll take a look further into both.
Ok, I looked into this and the first issue deezer.errors.PermissionException
is caused because the playlist is private and you don't have permission to see it (at least with the ARL you're using). I get the same error when I try to monitor the playlist in question (1257036831). Chances are you started monitoring it and then it was made private or it's an issue with the ARL not matching your account. Can you see the playlist itself?
I just patched this in commit e68623d. Now, instead of a crash, you'll simply see the message Playlist ID 1257036831 is private
when trying to monitor a private playlist or Playlist ID 1257036831 was not found
when trying to monitor a playlist ID that doesn't exist. There's no error checking (yet) for already monitored playlists so you'll have to remove it via deemon monitor -R -p <playlist_url>
.
I found two different bugs in deemon search
while investigating the bug you reported. The first affects v2.8.2 which will crash with a TypeError exception when selecting a specific track. The second bug affects v2.9.0-beta3 which will cause the KeyError you reported when selecting a track.
I'm pushing 2.8.3 and 2.9.0-beta4 in the next few minutes to address these bugs. Feel free to reopen/comment if needed.
An error with upgrading the database? Or alternatively, a playlist issue?
I've had this error for about a week, first on 2.8.2 then continuing when I upgraded to 2.9.0-beta3.