beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.89k stars 1.82k forks source link

need help with discogs plugin #3031

Closed silkyclouds closed 4 years ago

silkyclouds commented 6 years ago

Problem

It seems like discogs can't be connected.

Running this command in verbose (-vv) mode:

$ docker exec -it beets /bin/bash -c 'beet -vv import -q /downloads'

export of a part of the log (it is gigantic ;):

Sending event: import_task_created Sending event: import_task_start Looking up: /downloads/036/Sunlounger-The_Downtempo_Edition-2CD-2010-TGX Tagging Sunlounger - The Downtempo Edition No album ID found. Search terms: Sunlounger - The Downtempo Edition Album might be VA: False Searching for MusicBrainz releases with: {'release': u'the downtempo edition', 'tracks': u'2', 'artist': u'sunlounger'} Requesting MusicBrainz release 28f465dd-df5b-4eac-905b-4d0fb879dfe8 Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created primary MB release type: album secondary MB release type(s): compilation Sending event: albuminfo_received Candidate: Sunlounger - The Downtempo Edition (28f465dd-df5b-4eac-905b-4d0fb879dfe8) Computing track assignment... ...done. Success. Distance: 0.70 Requesting MusicBrainz release 5629ec6e-179e-4b2c-903c-e79eac2166ce Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created primary MB release type: album secondary MB release type(s): compilation Sending event: albuminfo_received Candidate: Sunlounger - Beautiful Voices 036 (Sunlounger a.k.a. DJ Shah Special Edition 3) (5629ec6e-179e-4b2c-903c-e79eac2166ce) Computing track assignment... ...done. Success. Distance: 0.77 Requesting MusicBrainz release 3624d4be-2607-442c-b670-cb6d8df6dac2 Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created primary MB release type: album Sending event: albuminfo_received Candidate: Sunlounger - Another Day on the Terrace (3624d4be-2607-442c-b670-cb6d8df6dac2) Computing track assignment... ...done. Success. Distance: 0.77 Requesting MusicBrainz release 6a9a1b75-9003-444f-890e-33575a05a5b3 Sending event: import_task_created primary MB release type: album Sending event: albuminfo_received Candidate: Sunlounger - Another Day on the Terrace: Chill Versions (6a9a1b75-9003-444f-890e-33575a05a5b3) Computing track assignment... ...done. Success. Distance: 0.72 Requesting MusicBrainz release cfe68c8c-70c4-4dcb-a516-9e3ae764bcca Sending event: import_task_created Sending event: import_task_created primary MB release type: album Sending event: albuminfo_received Candidate: Sunlounger - Another Day on the Terrace: Dance Versions (cfe68c8c-70c4-4dcb-a516-9e3ae764bcca) Computing track assignment... ...done. Success. Distance: 0.70 Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created discogs: Communication error while searching for u'Sunlounger The Downtempo Edition' Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/beetsplug/discogs.py", line 211, in get_albums type='release').page(1) File "/usr/lib/python2.7/site-packages/discogs_client/models.py", line 347, in page data = self.client._get(self._url_for_page(index)) File "/usr/lib/python2.7/site-packages/discogs_client/client.py", line 123, in _get return self._request('GET', url) File "/usr/lib/python2.7/site-packages/discogs_client/client.py", line 115, in _request body = json.loads(content.decode('utf8')) File "/usr/lib/python2.7/json/init.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Evaluating 5 candidates.

Sending event: import_task_start /downloads/036/Sunlounger-The_Downtempo_Edition-2CD-2010-TGX (2 items) Skipping. Looking up: /downloads/036/Sunn_0)))-Black_One-2005-BUTT Tagging Sunn 0))) - Black One No album ID found. Search terms: Sunn 0))) - Black One Album might be VA: False Searching for MusicBrainz releases with: {'release': u'black one', 'tracks': u'7', 'artist': u'sunn 0)))'} Requesting MusicBrainz release 2cd90e18-0b4b-32e9-b07d-ea5d13cd0c2e Sending event: import_task_choice Sending event: import_task_created Sending event: import_task_created primary MB release type: album Sending event: albuminfo_received Candidate: Sunn O))) - Black One (2cd90e18-0b4b-32e9-b07d-ea5d13cd0c2e) Computing track assignment... ...done. Success. Distance: 0.04 Requesting MusicBrainz release fc4ab79b-3622-4221-8883-8da2e9d2b5ce open failed: can't sync to MPEG frame unreadable file: /downloads/036/Super_Flu_and_Andhim--Reeves-(MONABERRY013-6)-WEB-2012-SiBERiA/05-super_flu_andandhim--scuzzlebutt(gn)-sibrsion)-siberia.mp3 Sending event: import_task_created Sending event: import_task_created primary MB release type: album Sending event: albuminfo_received Candidate: Sunn O))) - Black One (fc4ab79b-3622-4221-8883-8da2e9d2b5ce) Computing track assignment... ...done. Success. Distance: 0.04 Requesting MusicBrainz release a87bb818-1584-4792-a4ea-ede2a752670f Sending event: import_task_created primary MB release type: album Sending event: albuminfo_received Candidate: Sunn O))) - Black One (a87bb818-1584-4792-a4ea-ede2a752670f) Computing track assignment... ...done. Success. Distance: 0.04 Requesting MusicBrainz release 6cb486f7-ae6d-3205-869a-e99dd5c410f4 Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created primary MB release type: album Sending event: albuminfo_received Candidate: Sunn O))) - Black One (6cb486f7-ae6d-3205-869a-e99dd5c410f4) Computing track assignment... ...done. Success. Distance: 0.18 Requesting MusicBrainz release 2bf3e883-7b9d-4a49-a16b-70a0f043bb31 Sending event: import_task_created Sending event: import_task_created primary MB release type: album Sending event: albuminfo_received Candidate: Sunn O))) - Black One (2bf3e883-7b9d-4a49-a16b-70a0f043bb31) Computing track assignment... ...done. Success. Distance: 0.11 Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created discogs: Connection error in album search Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/beetsplug/discogs.py", line 151, in candidates return self.get_albums(query) File "/usr/lib/python2.7/site-packages/beetsplug/discogs.py", line 216, in get_albums return [album for album in map(self.get_album_info, releases[:5]) File "/usr/lib/python2.7/site-packages/beetsplug/discogs.py", line 246, in get_album_info result.refresh() File "/usr/lib/python2.7/site-packages/discogs_client/models.py", line 211, in refresh data = self.client._get(self.data['resource_url']) File "/usr/lib/python2.7/site-packages/discogs_client/client.py", line 123, in _get return self._request('GET', url) File "/usr/lib/python2.7/site-packages/discogs_client/client.py", line 115, in _request body = json.loads(content.decode('utf8')) File "/usr/lib/python2.7/json/init.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Evaluating 5 candidates.

Sending event: import_task_start /downloads/036/Sunn_0)))-Black_One-2005-BUTT (7 items) Looking up: /downloads/036/Sunn_0)))-BlackOne(Bonus_CD)-CD-2005-COR Correcting tags from: Tagging Sunn 0))) - Black One (Bonus CD) Sunn 0))) - Black One To: No album ID found. Sunn O))) - Black One Search terms: Sunn 0))) - Black One (Bonus CD) URL: https://musicbrainz.org/release/2cd90e18-0b4b-32e9-b07d-ea5d13cd0c2e (Similarity: 96.3%) (artist, tracks) (2x12" Vinyl, 2005, US, Southern Lord, picture disc) Album might be VA: False Searching for MusicBrainz releases with: {'release': u'black one (bonus cd)', 'tracks': u'2', 'artist': u'sunn 0)))'} 12" Vinyl 1

/downloads/036/Sunn_0)))-BlackOne(Bonus_CD)-CD-2005-COR (2 items) Skipping. Sending event: import_task_start Sending event: import_task_choice Looking up: /downloads/036/Sunn0)))-Boris-Altar(Bonus)-CD-2006-COR Tagging Sunn 0)))_-Boris - Altar (Bonus) No album ID found. Search terms: Sunn 0)))-Boris - Altar (Bonus) Album might be VA: False Searching for MusicBrainz releases with: {'release': u'altar (bonus)', 'tracks': u'1', 'artist': u'sunn 0)))-_boris'} lastgenre: added last.fm album genre (album): Drone Metal Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Requesting MusicBrainz release eacb8678-70e8-45a0-88c3-06bf42f26a19 Sending event: import_task_created fetchart: trying source filesystem for album Sunn O))) - Black One fetchart: trying source coverart for album Sunn O))) - Black One fetchart: downloading image: https://coverartarchive.org/release/2cd90e18-0b4b-32e9-b07d-ea5d13cd0c2e/front fetchart: not a supported image: image/x-None fetchart: trying source coverart for album Sunn O))) - Black One fetchart: downloading image: https://coverartarchive.org/release-group/5cf7cf40-d44c-3393-923e-ad399170d76d/front Sending event: import_task_created primary MB release type: album Sending event: albuminfo_received Candidate: Sunn O))) & Boris - Altar (eacb8678-70e8-45a0-88c3-06bf42f26a19) Computing track assignment... ...done. Success. Distance: 0.59 Requesting MusicBrainz release 441e27af-1bab-4295-9a07-76b5d534766c Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created primary MB release type: album Sending event: albuminfo_received Candidate: Sunn O))) & Boris - Altar (441e27af-1bab-4295-9a07-76b5d534766c) Computing track assignment... ...done. Success. Distance: 0.59 Requesting MusicBrainz release 0611646d-bd7f-491a-bfd0-d7a7ae7bda55 primary MB release type: album Sending event: albuminfo_received Candidate: Sunn O))) & Boris - Altar (0611646d-bd7f-491a-bfd0-d7a7ae7bda55) Computing track assignment... ...done. Success. Distance: 0.50 Requesting MusicBrainz release c13c6243-1511-44c0-b2ba-4ace484a8eb6 Sending event: import_task_created fetchart: downloaded art to: /tmp/tmpyZSYqO.jpg fetchart: using remote image /tmp/tmpyZSYqO.jpg Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: item_copied Sending event: database_change Sending event: database_change Sending event: write Sending event: after_write primary MB release type: album Sending event: albuminfo_received Candidate: Sunn O))) & Boris - Altar (c13c6243-1511-44c0-b2ba-4ace484a8eb6) Computing track assignment... ...done. Success. Distance: 0.48 Requesting MusicBrainz release 66411727-983b-385e-8bbf-62a91c5f04a0 Sending event: item_copied Sending event: import_task_created Sending event: database_change Sending event: database_change Sending event: write Sending event: after_write Sending event: item_copied Sending event: import_task_created Sending event: database_change Sending event: database_change Sending event: write Sending event: after_write primary MB release type: album Sending event: albuminfo_received Candidate: Sunn O))) & Boris - Altar (66411727-983b-385e-8bbf-62a91c5f04a0) Computing track assignment... ...done. Success. Distance: 0.56 Sending event: item_copied Sending event: import_task_created Sending event: database_change Sending event: database_change Sending event: write Sending event: after_write Sending event: item_copied Sending event: database_change Sending event: database_change Sending event: write Sending event: after_write Sending event: import_task_created Sending event: item_copied Sending event: import_task_created Sending event: import_task_created Sending event: database_change Sending event: database_change Sending event: write Sending event: after_write Sending event: item_copied Sending event: import_task_created Sending event: database_change Sending event: database_change Sending event: write Sending event: after_write Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: database_change Sending event: import_task_files scrub: auto-scrubbing /music/Sunn O)))/Black One/01 - Sin Nanna.mp3 scrub: writing new tags after scrub Sending event: write Sending event: after_write scrub: auto-scrubbing /music/Sunn O)))/Black One/02 - It Took the Night to Believe.mp3 scrub: writing new tags after scrub Sending event: write Sending event: after_write scrub: auto-scrubbing /music/Sunn O)))/Black One/03 - Cursed Realms (of the Winterdemons).mp3 Sending event: import_task_created scrub: writing new tags after scrub Sending event: write Sending event: after_write scrub: auto-scrubbing /music/Sunn O)))/Black One/06 - Cry for the Weeper.mp3 scrub: writing new tags after scrub Sending event: write Sending event: after_write scrub: auto-scrubbing /music/Sunn O)))/Black One/07 - Báthory Erzsebet.mp3 scrub: writing new tags after scrub Sending event: write Sending event: after_write scrub: auto-scrubbing /music/Sunn O)))/Black One/04 - Orthodox Caveman.mp3 scrub: writing new tags after scrub Sending event: write Sending event: after_write scrub: auto-scrubbing /music/Sunn O)))/Black One/05 - CandleGoat.mp3 scrub: writing new tags after scrub Sending event: write Sending event: after_write Sending event: art_set embedart: Embedding album art into Sunn O))) - Black One embedart: embedding /music/Sunn O)))/Black One/albumart.jpg Sending event: write Sending event: after_write embedart: embedding /music/Sunn O)))/Black One/albumart.jpg Sending event: write Sending event: after_write embedart: embedding /music/Sunn O)))/Black One/albumart.jpg Sending event: write Sending event: after_write embedart: embedding /music/Sunn O)))/Black One/albumart.jpg Sending event: write Sending event: after_write embedart: embedding /music/Sunn O)))/Black One/albumart.jpg Sending event: write Sending event: after_write embedart: embedding /music/Sunn O)))/Black One/albumart.jpg Sending event: write Sending event: after_write embedart: embedding /music/Sunn O)))/Black One/albumart.jpg Sending event: write Sending event: after_write Sending event: database_change Sending event: album_imported Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_task_created Sending event: import_taskcreated discogs: Communication error while searching for u'Sunn 0 _Boris Altar Bonus ' Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/beetsplug/discogs.py", line 211, in get_albums type='release').page(1) File "/usr/lib/python2.7/site-packages/discogs_client/models.py", line 347, in page data = self.client._get(self._url_for_page(index)) File "/usr/lib/python2.7/site-packages/discogs_client/client.py", line 123, in _get return self._request('GET', url) File "/usr/lib/python2.7/site-packages/discogs_client/client.py", line 115, in _request body = json.loads(content.decode('utf8')) File "/usr/lib/python2.7/json/init.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded Evaluating 5 candidates. Sending event: import_task_start

Setup

PS: I'm running beet inside a docker container (linuxserver.io version)

My configuration (output of beet config) is:

plugins: fromfilename discogs ftintitle duplicates fetchart embedart convert scrub replaygain lastgenre web directory: /music library: /config/musiclibrary.blb art_filename: albumart threaded: yes original_date: no per_disc_numbering: no

convert: auto: no ffmpeg: /usr/bin/ffmpeg opts: -ab 320k -ac 2 -ar 48000 max_bitrate: 320 threads: 1

paths: default: $albumartist/$album%aunique{}/$track - $title singleton: Non-Album/$artist - $title comp: Compilations/$album%aunique{}/$track - $title albumtype_soundtrack: Soundtracks/$album/$track $title

import: write: yes copy: yes move: no resume: ask incremental: yes quiet_fallback: skip timid: no log: /config/beet.log

lastgenre: auto: yes source: album

embedart: auto: yes

fetchart: auto: yes

replaygain: auto: no

scrub: auto: yes

replace: '^.': '[\x00-\x1f]': '[<>:"\?*|]': '[\xE8-\xEB]': e '[\xEC-\xEF]': i '[\xE2-\xE6]': a '[\xF2-\xF6]': o '[\xF8]': o '.$': '\s+$': ''

web: host: 0.0.0.0 port: 8337

musicbrainz:

host: 127.0.0.1:5051

ratelimit: 100

Do anyone know how I could fix this ? Musicbrainz alone matches around 30% of my albums only ... :(

thanks !

sampsyo commented 6 years ago

Hello! Please use the code blocks from the template so your pastes are legible. Also, we will need more context here. Does this happen for every album, for just specific ones? You’ve truncated the verbose output; what else is in the logs?

silkyclouds commented 6 years ago

Hi sampsyo !

Thanks for taking the time to have a look at my problem!

I'm a little bit confused about the order beets matches my releases. But you'll probably have a better idea by reading the log I've pasted (I edit above message) (I only took a part of it as I am currently working on my whole collections which makes it impossible to paste here ;)

Looks like the discogs issue happens all the time...

thanks again !

sampsyo commented 6 years ago

Hello! We really do need you to use those code blocks (see the GitHub formatting instructions) to make the pastes legible.

In any case, I've tried the Discogs plugin here locally and can't seem to reproduce the problem. Any guesses about what might be different on your machine?

silkyclouds commented 6 years ago

sampsyo,

sorry but I did paste the command as I type it (I invoque a command inside a docker container). What else are you actually expecting ?

I will, at the end of the first quiet import, run some tests on single albums and try to check why discogs connection fails.

I believe this is what I should investigate in priority.

By the way, can you let me know what I should look for in verbose mode to make sure the fromfilename plugin actually works ?

Thanks again !!!

sampsyo commented 6 years ago

Please see the GitHub documentation about how to format comments in Markdown. You want to use fenced code blocks for pastes.

I don’t know if fromfilename prints anything to the verbose log, but if it does, it will be labeled with the name of the plugin.

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.