beetbox / beets

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

importing takes a very long time with discogs plugin enabled #4108

Closed maffo999 closed 2 years ago

maffo999 commented 2 years ago

Problem

Whenever I want to import something in my library and I have Discogs enabled as a source, import operation can hang for various minutes while attempting to retrieve Discogs information.

Here is an example with discogs enabled

[user@host complete]$ time beet -vvv import -t OLIVIER_MESSIAEN_-_turangalila_symphonie\{orchestre_de_la_bastille+chung+loriod+loriod\}-DGG-SCD/
user configuration: /home/user/.config/beets/config.yaml
data directory: /home/user/.config/beets
plugin paths: 
Sending event: pluginload
inline: adding item field multidisc
artresizer: method is (2, (7, 1, 0), False)
library database: /home/user/.config/beets/beets.db
library directory: /home/user/Music
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /home/user/complete/OLIVIER_MESSIAEN_-_turangalila_symphonie{orchestre_de_la_bastille+chung+loriod+loriod}-DGG-SCD
Tagging OLIVIER MESSIAEN - turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-DGG-SCD
No album ID found.
Search terms: OLIVIER MESSIAEN - turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-DGG-SCD
Album might be VA: False
Searching for MusicBrainz releases with: {'release': 'turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-dgg-scd', 'artist': 'olivier messiaen', 'tracks': '10'}
Requesting MusicBrainz release 1e24900c-e196-4e15-bba8-e9ada575a6b1
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Hans Rosbaud - Turangalîla - Symphonie (1e24900c-e196-4e15-bba8-e9ada575a6b1)
Computing track assignment...
...done.
Success. Distance: 0.55
Requesting MusicBrainz release 682c51b6-8468-476c-a739-5f1f6a3e00f5
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Berliner Philharmoniker, Kent Nagano, Pierre‐Laurent Aimard, Dominique Kim - Turangalîla-Symphonie (682c51b6-8468-476c-a739-5f1f6a3e00f5)
Computing track assignment...
...done.
Success. Distance: 0.56
Requesting MusicBrainz release 791ebf82-1757-47df-88ec-10bd7e81402f
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; London Symphony Orchestra, Michel Béroff, Jeanne Loriod, André Previn - Turangalîla-symphonie (791ebf82-1757-47df-88ec-10bd7e81402f)
Computing track assignment...
...done.
Success. Distance: 0.57
Requesting MusicBrainz release 3e70ca3c-f448-4766-a029-d4f5644b5184
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Koninklijk Concertgebouworkest, Riccardo Chailly, Jean‐Yves Thibaudet, 原田節 - Turangalîla-Symphonie (3e70ca3c-f448-4766-a029-d4f5644b5184)
Computing track assignment...
...done.
Success. Distance: 0.60
Requesting MusicBrainz release 7d75b8a3-7c4b-3af7-bb8f-3cf3d811995f
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Jean‐Yves Thibaudet, 原田節, Koninklijk Concertgebouworkest, Riccardo Chailly - Turangalîla‐Symphonie (7d75b8a3-7c4b-3af7-bb8f-3cf3d811995f)
Computing track assignment...
...done.
Success. Distance: 0.60
Evaluating 5 candidates.

/home/user/complete/OLIVIER_MESSIAEN_-_turangalila_symphonie{orchestre_de_la_bastille+chung+loriod+loriod}-DGG-SCD (10 items)
Sending event: import_task_before_choice
Sending event: before_choose_candidate
Finding tags for album "OLIVIER MESSIAEN - turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-DGG-SCD".
Candidates:
1. Olivier Messiaen; Hans Rosbaud - Turangalîla - Symphonie (45.2%) (tracks, album, artist) (CD, 1992, DE, WERGO, 286 401-2)
2. Olivier Messiaen; Berliner Philharmoniker, Kent Nagano, Pierre‐Laurent Aimard, Dominique Kim - Turangalîla-Symphonie (44.1%) (tracks, artist, album) (CD, 2001, DE, TELDEC, 8573-82043-2)
3. Olivier Messiaen; London Symphony Orchestra, Michel Béroff, Jeanne Loriod, André Previn - Turangalîla-symphonie (43.1%) (tracks, artist, album) (DVD-Audio, 2001, EMI Classics)
4. Olivier Messiaen; Koninklijk Concertgebouworkest, Riccardo Chailly, Jean‐Yves Thibaudet, 原田節 - Turangalîla-Symphonie (40.4%) (tracks, artist, album) (Hybrid SACD, 2003, XW, Decca Records, 470 627-2 DSA)
5. Olivier Messiaen; Jean‐Yves Thibaudet, 原田節, Koninklijk Concertgebouworkest, Riccardo Chailly - Turangalîla‐Symphonie (40.4%) (tracks, artist, album) (CD, 1993, XW, Decca Records, 436 626-2)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates? s
Sending event: import_task_choice
Sending event: import
subsonicupdate: URL is http://192.168.1.215:4040/rest/startScan
subsonicupdate: auth type is token
subsonicupdate: Updating Subsonic; scanning 22459 tracks
Sending event: cli_exit

real    4m30.236s
user    0m0.810s
sys 0m0.075s

Compared to the same import without discogs plugin enabled:

[user@host complete]$ time beet -vvv import -t OLIVIER_MESSIAEN_-_turangalila_symphonie\{orchestre_de_la_bastille+chung+loriod+loriod\}-DGG-SCD/
user configuration: /home/user/.config/beets/config.yaml
data directory: /home/user/.config/beets
plugin paths: 
Sending event: pluginload
inline: adding item field multidisc
artresizer: method is (2, (7, 1, 0), False)
library database: /home/user/.config/beets/beets.db
library directory: /home/user/Music
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /home/user/complete/OLIVIER_MESSIAEN_-_turangalila_symphonie{orchestre_de_la_bastille+chung+loriod+loriod}-DGG-SCD
Tagging OLIVIER MESSIAEN - turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-DGG-SCD
No album ID found.
Search terms: OLIVIER MESSIAEN - turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-DGG-SCD
Album might be VA: False
Searching for MusicBrainz releases with: {'release': 'turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-dgg-scd', 'artist': 'olivier messiaen', 'tracks': '10'}
Requesting MusicBrainz release 1e24900c-e196-4e15-bba8-e9ada575a6b1
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Hans Rosbaud - Turangalîla - Symphonie (1e24900c-e196-4e15-bba8-e9ada575a6b1)
Computing track assignment...
...done.
Success. Distance: 0.55
Requesting MusicBrainz release 791ebf82-1757-47df-88ec-10bd7e81402f
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; London Symphony Orchestra, Michel Béroff, Jeanne Loriod, André Previn - Turangalîla-symphonie (791ebf82-1757-47df-88ec-10bd7e81402f)
Computing track assignment...
...done.
Success. Distance: 0.57
Requesting MusicBrainz release 682c51b6-8468-476c-a739-5f1f6a3e00f5
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Berliner Philharmoniker, Kent Nagano, Pierre‐Laurent Aimard, Dominique Kim - Turangalîla-Symphonie (682c51b6-8468-476c-a739-5f1f6a3e00f5)
Computing track assignment...
...done.
Success. Distance: 0.56
Requesting MusicBrainz release 7d75b8a3-7c4b-3af7-bb8f-3cf3d811995f
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Jean‐Yves Thibaudet, 原田節, Koninklijk Concertgebouworkest, Riccardo Chailly - Turangalîla‐Symphonie (7d75b8a3-7c4b-3af7-bb8f-3cf3d811995f)
Computing track assignment...
...done.
Success. Distance: 0.60
Requesting MusicBrainz release 3e70ca3c-f448-4766-a029-d4f5644b5184
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Koninklijk Concertgebouworkest, Riccardo Chailly, Jean‐Yves Thibaudet, 原田節 - Turangalîla-Symphonie (3e70ca3c-f448-4766-a029-d4f5644b5184)
Computing track assignment...
...done.
Success. Distance: 0.60
Evaluating 5 candidates.

/home/user/complete/OLIVIER_MESSIAEN_-_turangalila_symphonie{orchestre_de_la_bastille+chung+loriod+loriod}-DGG-SCD (10 items)
Sending event: import_task_before_choice
Sending event: before_choose_candidate
Finding tags for album "OLIVIER MESSIAEN - turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-DGG-SCD".
Candidates:
1. Olivier Messiaen; Hans Rosbaud - Turangalîla - Symphonie (45.2%) (tracks, album, artist) (CD, 1992, DE, WERGO, 286 401-2)
2. Olivier Messiaen; Berliner Philharmoniker, Kent Nagano, Pierre‐Laurent Aimard, Dominique Kim - Turangalîla-Symphonie (44.1%) (tracks, artist, album) (CD, 2001, DE, TELDEC, 8573-82043-2)
3. Olivier Messiaen; London Symphony Orchestra, Michel Béroff, Jeanne Loriod, André Previn - Turangalîla-symphonie (43.1%) (tracks, artist, album) (DVD-Audio, 2001, EMI Classics)
4. Olivier Messiaen; Jean‐Yves Thibaudet, 原田節, Koninklijk Concertgebouworkest, Riccardo Chailly - Turangalîla‐Symphonie (40.4%) (tracks, artist, album) (CD, 1993, XW, Decca Records, 436 626-2)
5. Olivier Messiaen; Koninklijk Concertgebouworkest, Riccardo Chailly, Jean‐Yves Thibaudet, 原田節 - Turangalîla-Symphonie (40.4%) (tracks, artist, album) (Hybrid SACD, 2003, XW, Decca Records, 470 627-2 DSA)
# selection (default 1), Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates? s
Sending event: import_task_choice
Sending event: import
subsonicupdate: URL is http://192.168.1.215:4040/rest/startScan
subsonicupdate: auth type is token
subsonicupdate: Updating Subsonic; scanning 22459 tracks
Sending event: cli_exit

real    0m9.208s
user    0m0.781s
sys 0m0.043s

Setup

My configuration (output of beet config) is:

This issue is reproducible on any instance and I don't believe it being tied to my specific configuration file, the relevant discogs section just contains the token

discogs:
    user_token: ######################
maffo999 commented 2 years ago

Additionally to the issue with the high waiting time, I am also noticing how there are no results obtained from discogs since both imports are just evaluating 5 candidates from musicbrainz; this is however false as we can see the master is present on the site with multiple releases attached: https://www.discogs.com/master/378710-Messiaen-Yvonne-Loriod-Jeanne-Loriod-Orchestre-De-LOp%C3%A9ra-Bastille-Myung-Whun-Chung-Turangal%C3%AEla-Sym

My first question therefore is: what is the program doing for 4+ minutes instead of scraping discogs for results? there is no logging on console so I don't really know...

Second question: what happens when I use --search-idon beet import to pass a specific release ID from discogs? Ideally this should be much faster since we don't have to scrape anything but just pull the specific release information, however the waiting time just grows exponentially

[user@host complete]$ time beet -vvv import OLIVIER_MESSIAEN_-_turangalila_symphonie\{orchestre_de_la_bastille+chung+loriod+loriod\}-DGG-SCD/ --search-id 5422673
user configuration: /home/user/.config/beets/config.yaml
data directory: /home/user/.config/beets
plugin paths: 
Sending event: pluginload
inline: adding item field multidisc
artresizer: method is (2, (7, 1, 0), False)
library database: /home/user/.config/beets/beets.db
library directory: /home/user/Music
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /home/user/complete/OLIVIER_MESSIAEN_-_turangalila_symphonie{orchestre_de_la_bastille+chung+loriod+loriod}-DGG-SCD
Tagging OLIVIER MESSIAEN - turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-DGG-SCD
Searching for album ID: 5422673
Requesting MusicBrainz release 5422673
Invalid MBID (5422673).
discogs: Searching for release 5422673
discogs: Searching for master release 378710
Sending event: albuminfo_received
Candidate: Olivier Messiaen, Yvonne Loriod, Jeanne Loriod, Orchestre De L'Opéra Bastille, Myung-Whun Chung - Turangalîla-Symphonie (5422673)
Computing track assignment...
...done.
Success. Distance: 0.22
Evaluating 1 candidates.

/home/user/complete/OLIVIER_MESSIAEN_-_turangalila_symphonie{orchestre_de_la_bastille+chung+loriod+loriod}-DGG-SCD (10 items)
Sending event: import_task_before_choice
Sending event: before_choose_candidate
Correcting tags from:
    OLIVIER MESSIAEN - turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-DGG-SCD
To:
    Olivier Messiaen, Yvonne Loriod, Jeanne Loriod, Orchestre De L'Opéra Bastille, Myung-Whun Chung - Turangalîla-Symphonie
URL:
    https://www.discogs.com/release/5422673-Messiaen-Yvonne-Loriod-Jeanne-Loriod-Orchestre-De-LOp%C3%A9ra-Bastille-Myung-Whun-Chung-Turangal%C3%AEla-Sym
(Similarity: 77.9%) (artist, album, source, tracks) (Discogs, CD, 2005, Germany, Deutsche Grammophon, 431 781-2)
CD: Turangalîla-Symphonie Pour Piano Principal Et Grand Orchestre
 * introduction-modere un peu vif                    -> I, Introduction: Modéré, Un Peu Vif (title)
 * chant d'amour 1-modere lourd                      -> II. Chant D'Amour 1: Modéré, Lourd (title)
 * turangalila 1-presque lent reveur                 -> III. Turangalîla 1: Presque Lent, Rêveur (title)
 * chant d'amour 2-bien modere                       -> IV. Chant D'Amour 2: Bien Modéré (title)
 * joie du sang des etoiles-vif passione avec joie   -> V. Joie Du Sang Des Étoiles: Vif, Passionné, Avec Joie (title)
 * jardin du sommeil d'amour-tres modere tres tendre -> VI. Jardin Du Sommeil D'Amour: Très Modéré, Très Tendre (title)
 * turangalila 2-un peu vif bien modere              -> VII. Turangalîla 2: Un Peu Vif - Bien Modéré (title)
 * developpement de l'amour-bien modere              -> VIII. Développement De L'Amour: Bien Modéré (title)
 * turangalila 3-bien modere                         -> IX. Turangalîla 3: Bien Modéré (title)
 * final-modere presque vif avec une grande joie     -> X. Final: Modéré, Presque Vif, Avec Une Grande Joie (title)
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates? s
Sending event: import_task_choice
Sending event: import
subsonicupdate: URL is http://192.168.1.215:4040/rest/startScan
subsonicupdate: auth type is token
subsonicupdate: Updating Subsonic; scanning 22459 tracks
Sending event: cli_exit

real    9m22.692s
user    0m0.500s
sys 0m0.073s
sampsyo commented 2 years ago

Hmm; is there any chance the Discogs search APIs are/were down or inaccessible? That seems like the simplest explanation for searching Discogs being slow and returning no results…

maffo999 commented 2 years ago

the discogs api itself is working fine (as in reachability) as it can be seen when passing --search-id

also I would expect any issue where the API is down or inaccessible to print some error message on console (if not from beets, from the library being used) but here nothing shows up at all

please let me know which other info you may need to triage this

sampsyo commented 2 years ago

Certainly, but what I meant to ask was whether the search API specifically, rather than the ID lookup API, might be down.

I can think of two ways to start trying to narrow this down:

maffo999 commented 2 years ago

Certainly, but what I meant to ask was whether the search API specifically, rather than the ID lookup API, might be down.

When I use --search-id the total time taken is over 9 minutes (twice as much as searching), leaving out the search functionality I believe 4m 30s is still too much to download a single release, don't you agree?

Watch the verbose logs to see exactly where the pause happens. Between which two events does it seem to wait for longest?

good point, from the command output it's not clear where the command hangs, it always happens after Evaluating X candidates.

will try adding some print statements to the plugin and see what else happens

maffo999 commented 2 years ago

well I guess it was rather easy to find the source of the problem, all I needed was to add a simple statement there

discogs plugin

    def _time_to_next_request(self):
        seconds_between_requests = 60 / self.rate_limit_per_minute
        seconds_since_last_request = time.time() - self.last_request_timestamp
        seconds_to_wait = seconds_between_requests - seconds_since_last_request
        **self._log.debug('waiting {0} seconds', seconds_to_wait)**
        return seconds_to_wait

then I ran import again and...

[user@hostcomplete]$ beet -vvv import -t OLIVIER_MESSIAEN_-_turangalila_symphonie\{orchestre_de_la_bastille+chung+loriod+loriod\}-DGG-SCD/
user configuration: /home/user/.config/beets/config.yaml
data directory: /home/user/.config/beets
plugin paths:
Sending event: pluginload
inline: adding item field multidisc
artresizer: method is (2, (7, 1, 0), False)
library database: /home/user/.config/beets/beets.db
library directory: /home/user/Music
Sending event: library_opened
Sending event: import_begin
Sending event: import_task_created
Sending event: import_task_start
Looking up: /home/user/complete/OLIVIER_MESSIAEN_-_turangalila_symphonie{orchestre_de_la_bastille+chung+loriod+loriod}-DGG-SCD
Tagging OLIVIER MESSIAEN - turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-DGG-SCD
No album ID found.
Search terms: OLIVIER MESSIAEN - turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-DGG-SCD
Album might be VA: False
Searching for MusicBrainz releases with: {'release': 'turangalila symphonie{orchestre de la bastille+chung+loriod+loriod}-dgg-scd', 'artist': 'olivier messiaen', 'tracks': '10'}
Requesting MusicBrainz release 1e24900c-e196-4e15-bba8-e9ada575a6b1
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Hans Rosbaud - Turangalîla - Symphonie (1e24900c-e196-4e15-bba8-e9ada575a6b1)
Computing track assignment...
...done.
Success. Distance: 0.55
Requesting MusicBrainz release 791ebf82-1757-47df-88ec-10bd7e81402f
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; London Symphony Orchestra, Michel Béroff, Jeanne Loriod, André Previn - Turangalîla-symphonie (791ebf82-1757-47df-88ec-10bd7e81402f)
Computing track assignment...
...done.
Success. Distance: 0.57
Requesting MusicBrainz release 682c51b6-8468-476c-a739-5f1f6a3e00f5
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Berliner Philharmoniker, Kent Nagano, Pierre‐Laurent Aimard, Dominique Kim - Turangalîla-Symphonie (682c51b6-8468-476c-a739-5f1f6a3e00f5)
Computing track assignment...
...done.
Success. Distance: 0.56
Requesting MusicBrainz release 7d75b8a3-7c4b-3af7-bb8f-3cf3d811995f
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Jean‐Yves Thibaudet, 原田節, Koninklijk Concertgebouworkest, Riccardo Chailly - Turangalîla‐Symphonie (7d75b8a3-7c4b-3af7-bb8f-3cf3d811995f)
Computing track assignment...
...done.
Success. Distance: 0.60
Requesting MusicBrainz release 3e70ca3c-f448-4766-a029-d4f5644b5184
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_track_extract
Sending event: mb_album_extract
Sending event: albuminfo_received
Candidate: Olivier Messiaen; Koninklijk Concertgebouworkest, Riccardo Chailly, Jean‐Yves Thibaudet, 原田節 - Turangalîla-Symphonie (3e70ca3c-f448-4766-a029-d4f5644b5184)
Computing track assignment...
...done.
Success. Distance: 0.60
**discogs: waiting -1634798140.986836 seconds**

my problem now is that I have not a clue of where to start to fix this, if someone could help/take care of this I would be extremely grateful.

maffo999 commented 2 years ago

also curious of how this was not caught by any test, unless clearly there is no test case for it :)

maffo999 commented 2 years ago

after further digging this has been introduced in PR https://github.com/beetbox/beets/pull/3138

arogl commented 2 years ago

As we are using python3-discogs-client and the rate limiting function has been released as follows Access remaining rate limit, we should review how we can leverage the rate limiting native function rather than a random wait between calls. Rate limiting enabled by default.

Requests rate limiting

Looks like a simple fix to remove the rate limiting included in #3138

sampsyo commented 2 years ago

That's a good idea, @arogl!

maffo999 commented 2 years ago

I have submitted PR #4118 which largely reverts the changes of PR #3138, any feedback welcome!