pyacoustid: acoustid submission error: response is not valid JSON - 504 gateway time-out
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?
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 15 (3 by maintainers)
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.
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.
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
print
ing out the response inside the Python library.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 https://github.com/acoustid/acoustid-server/issues/50.
Yes, I just hacked acoustid.py. I forked pyacoustid and uploaded the changes I used for testing. You can see the diff here: https://github.com/beetbox/pyacoustid/compare/master...skapazzo:skapazzo-temporary Beware, this was just a hack for testing, no idea about side effects.
I also get the same error here (504), but querying the api with the same parameters through browser/wget/curl works fine.
@Extarys Ah maybe Picard is just working for matching recordings and not submissions then, sorry to hear that
Yeah! A PR here would be welcome if anyone has a moment to add a better error message for 5xx error codes.
It’s a gateway timeout it seems:
This is from trying to match a recording as well. Seems like the API is broken atm?