Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beatport Plugin Unhandled Error #3184

malan88 opened this issue Mar 14, 2019 · 2 comments


None yet
2 participants
Copy link

commented Mar 14, 2019


The beatport plugin kicks back an unhandled error during an import quite frequently. It seems to occur most often during the evening. I am under the impression from the traceback that beatport itself is either throttling me or under unusual high load at the time.

I've been importing a rather massive collection (nearly done, thus far there are 97,908 tracks). I cannot reproduce this error consistently because it seems to occur at the whims of the beatport api. I do not have verbose output and can't provide it because I'm nearly done and just managed to capture the traceback this last time. Also, running consistently in verbose mode makes it difficult to properly interact with the autotagger.

Unfortunately, upon reviewing this traceback, it appears to not be quite as lengthy as I remember. I remember three cascading exceptions, this is merely one of them. If I run into this error again I will try to capture a fuller traceback.

Here is the traceback:

Traceback (most recent call last):
  File "/home/data/music/venv/lib/python3.7/site-packages/urllib3/", line 600, in urlopen
  File "/home/data/music/venv/lib/python3.7/site-packages/urllib3/", line 384, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/home/data/music/venv/lib/python3.7/site-packages/urllib3/", line 380, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.7/http/", line 1321, in getresponse
  File "/home/data/music/venv/src/beets/beets/ui/", line 1253, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/data/music/venv/src/beets/beets/ui/", line 955, in import_func
    import_files(lib, paths, query)
  File "/home/data/music/venv/src/beets/beets/ui/", line 925, in import_files
  File "/home/data/music/venv/src/beets/beets/", line 329, in run
  File "/home/data/music/venv/src/beets/beets/util/", line 445, in run_parallel
    six.reraise(exc_info[0], exc_info[1], exc_info[2])
  File "/home/data/music/venv/lib/python3.7/site-packages/", line 693, in reraise
    raise value
  File "/home/data/music/venv/src/beets/beets/util/", line 312, in run
    out = self.coro.send(msg)
  File "/home/data/music/venv/src/beets/beets/util/", line 194, in coro
    func(*(args + (task,)))
  File "/home/data/music/venv/src/beets/beets/", line 1351, in lookup_candidates
  File "/home/data/music/venv/src/beets/beets/", line 892, in lookup_candidates
    prop = autotag.tag_item(self.item, search_ids=self.search_ids)
  File "/home/data/music/venv/src/beets/beets/autotag/", line 513, in tag_item
    for track_info in hooks.item_candidates(item, search_artist, search_title):
  File "/home/data/music/venv/src/beets/beets/", line 571, in decorated
    for v in generator(*args, **kwargs):
  File "/home/data/music/venv/src/beets/beets/autotag/", line 640, in item_candidates
    for candidate in plugins.item_candidates(item, artist, title):
  File "/home/data/music/venv/src/beets/beets/", line 389, in item_candidates
    for item_candidate in plugin.item_candidates(item, artist, title):
  File "/home/data/music/venv/src/beets/beetsplug/", line 361, in item_candidates
    return self._get_tracks(query)
  File "/home/data/music/venv/src/beets/beetsplug/", line 460, in _get_tracks
    tracks = [self._get_track_info(x) for x in bp_tracks]
  File "/home/data/music/venv/src/beets/beetsplug/", line 460, in <listcomp>
    tracks = [self._get_track_info(x) for x in bp_tracks]
  File "/home/data/music/venv/src/beets/beetsplug/", line 134, in search
  File "/home/data/music/venv/src/beets/beetsplug/", line 194, in _get
AttributeError: 'ConnectionError' object has no attribute 'message'


  • OS: Arch Linux
  • Python version: 3.7.2
  • beets version: 1.4.8
  • Turning off plugins made problem go away (yes/no): yes

My configuration (output of beet config) is:

directory: /home/data/music
library: /home/data/music/musiclibrary.db

    move: yes
    write: yes
    incremental: yes
    detail: yes
    log: /home/data/music/log
    languages: [en]
    autotag: yes
    quiet_fallback: skip
    timid: no
art_filename: albumart
threaded: yes

- beatport
- discogs
- chroma
- web
- duplicates
- missing
- lastgenre

    color: yes

- '*.jpg'
- '*.jpeg'
- '*.png'
- '*.gif'
- '*.zip'
- Thumbs.db
- .DS_Store

    albumtype:soundtrack: Soundtracks/$album/$track $title
    apikey: REDACTED
    apisecret: REDACTED
    tokenfile: beatport_token.json
    source_weight: 0.5
    album: no
    checksum: ''
    copy: ''
    count: no
    delete: no
    format: ''
    full: no
    keys: []
    merge: no
    move: ''
    path: no
    tiebreak: {}
    strict: no
    tag: ''
    count: no
    total: no
    album: no
    auto: yes
    whitelist: yes
    min_weight: 10
    count: 1
    canonical: no
    source: album
    force: yes
    auto: yes
    separator: ', '
    prefer_specific: no
    apikey: REDACTED
    apisecret: REDACTED
    tokenfile: discogs_token.json
    source_weight: 0.5
    user_token: REDACTED
    port: 8337
    cors: ''
    cors_supports_credentials: no
    reverse_proxy: no
    include_paths: no

@sampsyo sampsyo added the bug label Mar 14, 2019


This comment has been minimized.

Copy link

commented Mar 14, 2019

Thanks! I pushed a quick fix. Can you try that out and see if it addresses the problem?

@sampsyo sampsyo closed this in 6ee824f Mar 14, 2019


This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2019

I'll pull the changes and update but I can't guarantee I'll hit the issue again anyway. I've been running with the plugin enabled all morning and haven't hit it yet! Thanks for the fix, though. Glad I could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.