Repository navigation
Open
Description
I'm adding new releases in MB database and I was curious after tagging why the fingerprint wasn't on the website and I received no errors so I explicitly tried with the submit comment.
Output:
$ beet -vvv submit "./"
user configuration: /home/user/.config/beets/config.yaml
data directory: /home/user/.config/beets
plugin paths: /home/user/.beets-fetchartist
/home/user/.local/lib/python3.8/site-packages/beets/mediafile.py:21: UserWarning: beets.mediafile is deprecated; use mediafile instead
warnings.warn("beets.mediafile is deprecated; use mediafile instead")
Sending event: pluginload
inline: adding item field my_samplerate
inline: adding item field my_bitrate
inline: adding item field is_flac
inline: adding item field is_album
inline: adding item field multidisc
inline: adding item field vinyl
inline: adding item field compilation_display
inline: adding album field fileformat
inline: adding album field av_bitrate
inline: adding album field avg_samplerate
inline: adding album field avg_bitdepth
library database: /media/music/.beet_library.blb
library directory: /media/Nas/Music
Sending event: library_opened
chroma: /media/Nas/Music/KNEECAP/Singles/2017 - C.E.A.R.T.A [MP3 320]/01 - C.E.A.R.T.A.mp3: fingerprint exists, skipping
chroma: submitting MBID
chroma: submitting 1 fingerprints
chroma: acoustid submission error: response is not valid JSON
Sending event: cli_exit
I tried multiple tracks, I always get that error - I also confirmed my API key.
Config:
original_date: no
per_disc_numbering: yes
threaded: yes
clutter: ["Thumbs.DB", ".DS_Store", "*.m3u", ".pls"]
ignore: ["*~", "System Volume Information"]
import:
languages: en de fr jp
move: yes
copy: no
bell: yes
ui:
color: yes
colors:
text_success: green
text_warning: yellow
text_error: red
text_highlight: red
text_highlight_minor: lightgray
action_default: turquoise
action: cyan
pluginpath:
~/.beets-fetchartist
plugins: inline convert bpm discogs lastgenre absubmit acousticbrainz scrub fromfilename chroma acousticbrainz beatport the ftintitle fetchart embedart extrafiles edit fetchartist
aunique:
keys: albumartist album year
disambiguators: albumtype year country label catalognum albumdisambig releasegroupdisambig
bracket: '()'
set_fields:
how: ''
item_fields:
my_samplerate: str(round(samplerate / 1000))
my_bitrate: str(round(bitrate/1000))
is_flac: 1 if format == "FLAC" else 0
is_album: 1 if albumtype.upper() == "ALBUM" else 0
multidisc: 1 if disctotal > 1 else 0
vinyl: 1 if media in ['12" Vinyl', 'Vinyl'] else 0
compilation_display: '''Soundtracks'' if albumtype.upper() == ''SOUNDTRACK'' else ''Compilations'''
#first_artist: albumartist.split(', ',1)[0:1][0]
album_fields:
fileformat: |
formatList = []
for item in items:
formatList.append(item.format.upper())
return formatList
av_bitrate: |
total = 0
for item in items:
total += item.bitrate
return str(round(total / len(items) / 1000))
avg_samplerate: |
total = 0
for item in items:
total += item.samplerate
return str(round(total / len(items) / 1000))
avg_bitdepth: |
total = 0
for item in items:
total += item.bitdepth
return str(round(total / len(items)))
paths:
#default: %upper{%left{%asciify{%the{$albumartist}},1}}/$albumartist/%if{$year,$year - ,%if{$original_year,$original_year - }}$album%aunique{} ($format)/%if{$multidisc,$disc-}$track - $title
# Albums/A/ASCI Artist Name, The/[YEAR] ASCI Album Name, The [EP]/01 - Track Name.mp3
# %bucket{%upper{%left{%the{$albumartist},1}}}/
default: '%the{$albumartist}/%if{$original_year,$original_year,%if{$year,$year,0000}} - $album%aunique{} [%ifdef{how,$how }%if{$vinyl,Vinyl }%upper{$format}%if{$is_flac, $avg_samplerate-$avg_bitdepth, $av_bitrate}]/%if{$multidisc,$disc-}$track - $title'
albumtype:single: '%the{$albumartist}/Singles/%if{$original_year,$original_year,%if{$year,$year,0000}} - $album%aunique{} [%ifdef{how,$how }%if{$vinyl,Vinyl }%upper{$format}%if{$is_flac, $avg_samplerate-$my_samplerate, $my_bitrate}]/%if{$multidisc,$disc-}$track - $title'
albumtype:ep: '%the{$albumartist}/EPs/%if{$original_year,$original_year,%if{$year,$year,0000}} - $album%aunique{} [%ifdef{how,$how }%if{$vinyl,Vinyl }%upper{$format}%if{$is_flac, $avg_samplerate-$avg_bitdepth, $av_bitrate}]/%if{$multidisc,$disc-}$track - $title'
albumtype:soundtrack: Soundtracks/$album%aunique{}%if{$year, ($year),%if{$original_year, ($original_year)}} [%ifdef{how,$how }%if{$vinyl,Vinyl }%upper{$format}%if{$is_flac, $avg_samplerate-$avg_bitdepth, $av_bitrate}]/%if{$vinyl,$track_alt,%if{$multidisc,$disc-}$track} - $title
comp: $compilation_display/%if{$year,$year - ,%if{$original_year,$original_year - }}$album%aunique{} [%ifdef{how,$how }%upper{$format}%if{$is_flac, $avg_samplerate-$avg_bitdepth, $av_bitrate}]/%if{$multidisc,$disc-}$track - $title
singleton: '%the{$artist}/Non-Album/$title%if{$original_year, ($original_year),%if{$year, ($year),}} [%ifdef{how,$how }%upper{$format}%if{$is_flac, $samplerate-$bitdepth, $my_bitrate}]'
replace:
'[\\/]': _
'^\.': _
'[\x00-\x1f]': _
'[<>:"\?\*\|]': _
'\.$': _
'\s+$': ''
'^\s+': ''
'^-': _
'[\u2018\u2019]': ''''
'[\u201c\u201d\u2033]': '"'
check:
import: yes
write-check: yes
write-update: yes
convert-update: yes
threads: 4
ftintitle:
auto: yes
drop: no
format: feat. {0}
lyrics:
fallback: ''
google_engine_ID: xxxxxxx:xxxxxxx
google_API_key: xxxxxxx-xxxxxxx
lastgenre:
min_weight: 80
count: 5
prefer_specific: no
separator: '; '
extrafiles:
patterns:
artworkdir:
- '[sS]cans/'
- '[aA]rtwork/'
- '[aA]rtworks/'
- '[cC]overs/'
lyrics:
- '*.lrc'
lyrics2:
- 'Lyrics/'
nfo:
- 'album.nfo'
paths:
artworkdir: $albumpath/artwork
lyrics: $albumpath/$filename.lrc
lyrics2: $albumpath/Lyrics
embedart:
# I dont want album art auto-embedded either
auto: no
fetchart:
auto: yes
minwidth: 400
maxwidth: 2000
sources: filesystem coverart itunes amazon albumart
fetchartist:
filename: "poster"
acousticbrainz:
force: yes
absubmit:
extractor: ~/streaming_extractor_music
auto: yes
acoustid:
apikey: xxxxxxx
chroma:
auto: yes
Any tips?
Reacted by RobbieG3
Metadata
Metadata
Assignees
Labels
No labels
Activity
sampsyo commentedon Dec 5, 2020
Hmm; that's odd. Any chance you could view the API request and response to see if there's an underlying error? Observing the traffic with Wireshark or similar would work, as would just
printing out the response inside the Python library.BNolet commentedon Dec 5, 2020
It's a gateway timeout it seems:

This is from trying to match a recording as well. Seems like the API is broken atm?
Extarys commentedon Dec 5, 2020
Oh maybe. Thanks @BNolet I just install wireshark, I forgot I could use that.
The library returned error wasn't very helpful then, maybe it should've said: Service unavailable.
It seems beet (and picard) uses only album/artist to find matches indeed. II can't find a status page for the apis, we'll have to wait.
sampsyo commentedon Dec 5, 2020
Yeah! A PR here would be welcome if anyone has a moment to add a better error message for 5xx error codes.
BNolet commentedon Dec 5, 2020
Welp, Picard is working just fine so I'm going to use that to tag my library :) https://picard.musicbrainz.org/
Extarys commentedon Dec 5, 2020
@BNolet On my end I can tag using beet, I just can't use fingerprints or upload them - same as Picard ATM.
Using picard if I try to upload a fingerprint I see the request in the logs with no error but it never shows on the website and it usually shows the fingerprint on the website pretty fast.
BNolet commentedon Dec 5, 2020
@Extarys Ah maybe Picard is just working for matching recordings and not submissions then, sorry to hear that
Extarys commentedon Dec 6, 2020
I think this need further investigation.
This is Picard log:
Fingerprint was uploaded: https://musicbrainz.org/recording/65161f21-ae51-48f4-84c0-2f7f53662081/fingerprints
I think yesterday I didn't properly submit in Picard, that is why I thought it wasn't wokring. If it works in Picard but not in Beet, I think it can impact the number of fingerprints that will end up on the Brainz server. 😞
skapazzo commentedon Dec 7, 2020
I also get the same error here (504), but querying the api with the same parameters through browser/wget/curl works fine.
[-]acoustid submission error: response is not valid JSON[/-][+]acoustid submission error: response is not valid JSON - 504 gateway time-out[/+]skapazzo commentedon Dec 7, 2020
Correction: if I send the request as plain text through curl it works, if I send it gzipped as I think pyacoustid does I get a 504. But I could easily have gotten something wrong in these tests.
The 504 might be a problem server side then. Anyone know who to talk to for that?
skapazzo commentedon Dec 7, 2020
Further info: if I disable gzipping in acoustid.py everything seems to work correctly. My picard sends the request as plain text (urlencoded) and works.
Extarys commentedon Dec 7, 2020
@skapazzo Can you explain how to disable gzip in acoustid? I just use it straight in beet though and the beet plugin config doesn't show much options. Do I need to change this directly in the python file?
skapazzo commentedon Dec 7, 2020
Yes, I just hacked acoustid.py. I forked pyacoustid and uploaded the changes I used for testing. You can see the diff here: master...skapazzo:skapazzo-temporary
Beware, this was just a hack for testing, no idea about side effects.
sampsyo commentedon Dec 8, 2020
Oh wow, thanks for tracking that down! Seems like something is wrong on the server side with gzipped requests.
Paging @lalinsky in case he hasn't seen this thread yet. It also looks like there is a related server issue filed at acoustid/acoustid-server#50.
lalinsky commentedon Dec 8, 2020
Thanks guys. The service has been heavily overloaded during the last weeks, so I had to work on some frontend proxying and it's possible that some gzipped request support got broken. I'll have a look quickly.