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

bpmanalyser: Error(1): Unknown error! Unparsable response. #22

Open
Kinspappy opened this issue Nov 8, 2024 · 2 comments
Open

bpmanalyser: Error(1): Unknown error! Unparsable response. #22

Kinspappy opened this issue Nov 8, 2024 · 2 comments

Comments

@Kinspappy
Copy link

Problem

Get "bpmanalyser: Error(1): Unknown error! Unparsable response." when running beet import or beet -vv bpmanalyser.
Running your command in verbose (-vv) mode:

$ beet -vv bpmanalyser 
user configuration: /home/kinspappy/.config/beets/config.yaml
data directory: /home/kinspappy/.config/beets
plugin paths: /usr/lib/python3.12/site-packages/beetsplug
inline: adding item field multidisc
inline: adding item field is_flac
inline: adding album field format
inline: adding album field bitdepth
inline: adding album field album_samplerate
inline: adding album field is_1644
inline: adding album field source
inline: adding album field media_type
lyrics: Disabling google source: no API key configured.
Sending event: pluginload
library database: /home/kinspappy/.config/beets/musiclibrary.db
library directory: /home/kinspappy/Desktop/kinspappy's music
Sending event: library_opened
Parsed query: AndQuery([PathQuery('path', "/home/kinspappy/Desktop/kinspappy's music/Rap/will.i.am & Britney Spears (US)", fast=True, case_sensitive=True)])
Parsed sort: NullSort()
bpmanalyser: BpmAnalyser exec threads: 4
bpmanalyser: Analysing[/home/kinspappy/Desktop/kinspappy's music/Rap/will.i.am & Britney Spears (US)/Singles/(2012) Scream & Shout (DE) [CD, FLAC]/will.i.am & Britney Spears - Scream & Shout (dirty main).flac]...
bpmanalyser: Analysing[/home/kinspappy/Desktop/kinspappy's music/Rap/will.i.am & Britney Spears (US)/Singles/(2012) Scream & Shout (DE) [CD, FLAC]/will.i.am & Britney Spears - Scream & Shout (clean edit).flac]...
bpmanalyser: Error(1): Unknown error! Unparsable response.
bpmanalyser: Error(1): Unknown error! Unparsable response.
bpmanalyser: Done.
Sending event: cli_exit

Led to this problem:

Bpm not being added to any tracks.

Setup

  • OS: Garuda Linux Hyprland with all updates
  • Python version: 3.12.7
  • Beets version: 2.0.0 installed using pipx with all plugins and dependencies injected into beets using pipx.
  • Turning off other plugins made problem go away (yes/no):
    No. Tried turning off all plugins except for bpmanalyser and received the same error.
    My configuration (output of beet config) is:
lyrics:
    bing_lang_from: []
    auto: yes
    force: yes
    fallback: ''
    google_APi_key: AIzaSyCRK8TTQ-I5vI9ucqFcJ8ewFt_mxbQFDH0
    google_engine_ID: REDACTED
    sources: lrclib genius google tekstowo
    synced: yes
    bing_client_secret: REDACTED
    bing_lang_to:
    google_API_key: REDACTED
    genius_api_key: REDACTED
    local: no
    dist_thresh: 0.1
directory: /home/kinspappy/Desktop/unraid/data/media/kinspappy's music/
# --------------- Main ---------------

library: /home/kinspappy/.config/beets/musiclibrary.db
pluginpath: /usr/lib/python3.12/site-packages/beetsplug/

# --------------- Plugins ---------------

plugins: albumtypes artistcountry badfiles bpmanalyser convert copyartifacts discogs edit embedart fetchart ftintitle info inline lastgenre lastimport lyrics mbsync missing permissions scrub yearfixer zero
replace:
    '[\\]': ''
    '[_]': '-'
    '[/]': '-'
    ^\.: ''
    '[\x00-\x1f]': ''
    '[<>:"\?\*\|]': ''
    \.$: ''
    \s+$: ''
    ^\s+: ''
    ^-: ''
    "\u2019": ''''
    "\u2032": ''''
    "\u2033": ''
    "\u2010": '-'
art_filename: $albumartist - ($original_year) $album%aunique{} - Cover Art

# --------------- Performance ---------------

threaded: yes
original_date: yes

# --------------- Tagging ---------------

per_disc_numbering: yes

aunique:
    keys: albumartist album
    disambiguators: albumtype year label catalognum albumdisambig releasegroupdisambig
    bracket: ()

sunique:
    keys: artist title
    disambiguators: trackdisambig
    bracket: ()

# --------------- Import ---------------

clutter: [Thumbs.DB, .DS_Store]
va_name: Various Artists

ui:
    color: yes
    colors:
        text_success: [bold, green]
        text_warning: [bold, yellow]
        text_error: [bold, red]
        text_highlight: [bold, red]
        text_highlight_minor: lightgray
        action_default: [bold, blue]
        action: blue
        text: [normal]
        text_faint: [faint]
        import_path: [bold, blue]
        import_path_items: [bold, blue]
        added: [green]
        removed: [red]
        changed: [yellow]
        added_highlight: [bold, green]
        removed_highlight: [bold, red]
        changed_highlight: [bold, yellow]
        text_diff_added: [bold, red]
        text_diff_removed: [bold, red]
        text_diff_changed: [bold, red]
        action_description: [white]
        length_diff_thresh: 3.0

import:
    write: yes
    copy: no
    move: yes
    resume: ask
    incremental: no
    incremental_skip_later: yes
    from_scratch: yes
    quiet: no
    quiet_fallback: skip
    none_rec_action: ask
    timid: yes
    log: /home/kinspappy/.config/beets/beets.log
    detail: yes
    group_albums: no
    autotag: yes
    duplicate_action: ask
    bell: yes
musicbrainz:
    external_ids:
        discogs: yes
        spotify: no

match:
    enabled: no
    strong_rec_thresh: 0.01
    ignore_data_tracks: no
    ignore_video_tracks: no
    preferred:
        media: [CD, Digital Media|File, Vinyl]
    ignored_media:
    - Data CD
    - DVD
    - DVD-Video
    - Blu-ray
    - HD-DVD
    - VCD
    - SVCD
    - UMD
    - VHS
paths:
    albumtype:soundtrack: Soundtracks/%if{$original_year,($original_year) }$album%if{$albumdisambig, ($albumdisambig)}%if{$country, ($country)}%aunique{} [%if{{$media_type,$media_type$, }$format%if{$is_1644,,%if{$is_flac, $bitdepth-$album_samplerate}}]/%if{$multidisc,(Disc $disc)} %if{$disctitle,- $disctitle}/$artist - $title %if{$trackdisambig,($trackdisambig)}
    comp: Compilations/%if{$original_year,($original_year) }$album%if{$albumdisambig, ($albumdisambig)}%if{$country, ($country)}%aunique{} [%if{{$media_type,$media_type$, }$format%if{$is_1644,,%if{$is_flac, $bitdepth-$album_samplerate}}]/%if{$multidisc,(Disc $disc)} %if{$disctitle,- $disctitle}/$artist - $title %if{$trackdisambig,($trackdisambig)}
    albumtype:compilation: '%title{$genre}/$albumartist %upper{($artist_country)}/Compilations/%if{$original_year,($original_year) }$album%if{$albumdisambig, ($albumdisambig)}%if{$country, ($country)}%aunique{} [%if{$media_type,$media_type$, }$format%if{$is_1644,,%if{$is_flac, $bitdepth-$album_samplerate}}]/%if{$multidisc,(Disc $disc)} %if{$disctitle,- $disctitle}/$artist - $title %if{$trackdisambig,($trackdisambig)}'
    albumtype:ep: '%title{$genre}/$albumartist %upper{($artist_country)}/EPs/%if{$original_year,($original_year) }$album%if{$albumdisambig, ($albumdisambig)}%if{$country, ($country)}%aunique{} [%if{{$media_type,$media_type$, }$format%if{$is_1644,,%if{$is_flac, $bitdepth-$album_samplerate}}]/%if{$multidisc,(Disc $disc)} %if{$disctitle,- $disctitle}/$artist - $title %if{$trackdisambig,($trackdisambig)}'
    albumtype:single: '%title{$genre}/$albumartist %upper{($artist_country)}/Singles/%if{$original_year,($original_year) }$album%if{$albumdisambig, ($albumdisambig)}%if{$country, ($country)}%aunique{} [%if{{$media_type,$media_type$, }$format%if{$is_1644,,%if{$is_flac, $bitdepth-$album_samplerate}}]/%if{$multidisc,(Disc $disc)} %if{$disctitle,- $disctitle}/$artist - $title %if{$trackdisambig,($trackdisambig)}'
    albumtype:remix: '%title{$genre}/$albumartist %upper{($artist_country)}/Remixes/%if{$original_year,($original_year) }$album%if{$albumdisambig, ($albumdisambig)}%if{$country, ($country)}%aunique{} [%if{{$media_type,$media_type$, }$format%if{$is_1644,,%if{$is_flac, $bitdepth-$album_samplerate}}]/%if{$multidisc,(Disc $disc)} %if{$disctitle,- $disctitle}/$artist - $title %if{$trackdisambig,($trackdisambig)}'
    default: '%title{$genre}/$albumartist %upper{($artist_country)}/Albums/%if{$original_year,($original_year) }$album%if{$albumdisambig, ($albumdisambig)}%if{$country, ($country)}%aunique{} [%if{$media_type,$media_type$, }$format%if{$is_1644,,%if{$is_flac, $bitdepth-$album_samplerate}}]/%if{$multidisc,(Disc $disc)} %if{$disctitle,- $disctitle}/$artist - $title %if{$trackdisambig,($trackdisambig)}'
    albumtype:live: '%title{$genre}/$albumartist %upper{($artist_country)}/Lives/%if{$original_year,($original_year) }$album%if{$albumdisambig, ($albumdisambig)}%if{$country, ($country)}%aunique{} [%if{$media_type,$media_type$, }$format%if{$is_1644,,%if{$is_flac, $bitdepth-$album_samplerate}}]/%if{$multidisc,(Disc $disc)} %if{$disctitle,- $disctitle}/$artist - $title %if{$trackdisambig,($trackdisambig)}'
    ext:cue: $albumpath/$albumartist - $album
    ext:log: $albumpath/$albumartist - $album
    ext:jpg: $albumpath/$albumartist - $album
    ext:m3u8: $albumpath/$albumartist - $album
    ext:nfo: $albumpath/$albumartist - $album
    ext:m3u: $albumpath/$albumartist - $album
bpmanalyser:
    auto: yes
    dry-run: no
    write: yes
    threads: AUTO
    force: yes
    quiet: no
chroma:
    auto: yes
discogs:
    index_tracks: yes
    source_weight: 0.2
    apikey: REDACTED
    apisecret: REDACTED
    tokenfile: discogs_token.json
    user_token: REDACTED
    separator: ', '
    append_style_genre: no
embedart:
    auto: yes
    ifemtpy: yes
    quality: 100
    remove_art_file: yes
    maxwidth: 0
    compare_threshold: 0
    ifempty: no
fetchart:
    auto: yes
    cautious: yes
    cover_names: cover front art album folder
    quality: 100
    sources:
    - filesystem
    -   coverart: release
    -   coverart: releasegroup
    - amazon
    - albumart
    - '*'
    google_key: REDACTED
    google_engine:
    high_resolution: yes
    lastfm_key: REDACTED
    minwidth: 0
    maxwidth: 0
    max_filesize: 0
    enforce_ratio: no
    store_source: no
    deinterlace: no
    cover_format:
    fanarttv_key: REDACTED
ftintitle:
    auto: yes
    drop: no
    format: feat. {0}
lastgenre:
    auto: yes
    count: 1
    force: no
    source: artist
    whitelist: yes
    title_case: yes
    min_weight: 10
    fallback:
    canonical: no
    separator: ', '
    prefer_specific: no
lastfm:
    user: Kinspappy
    api_key: REDACTED
permissions:
    file: 666
    dir: 777
replaygain:
    auto: no
scrub:
    auto: yes
zero:
    fields: comments images
    comments:
    - EAC
    - LAME
    - from.+collection
    - ripped by
    update database: no
    auto: yes
    keep_fields: []
    update_database: no
albumtypes:
    types:
    -   ep: EPs
    -   single: Singles
    -   soundtrack: Soundtracks
    -   live: Lives
    -   compilation: Compilations
    -   remix: Remixes
    ignore_va: compilation
    bracket: ''
item_fields:
    multidisc: 1 if disctotal > 1 else 0
    is_flac: 1 if format == "FLAC" else 0
album_fields:
    format: "formatList = []\nfor item in items:\n    formatList.append(item.format)\nreturn formatList\n"
    bitdepth: "maxbitdepth = 0\nfor item in items:\n    if item.bitdepth > maxbitdepth:\n        maxbitdepth = item.bitdepth\nreturn round(maxbitdepth)\n"
    album_samplerate: "maxsamplerate = 0\nfor item in items:\n    if item.samplerate > maxsamplerate:\n        maxsamplerate = item.samplerate\nreturn round(maxsamplerate / 1000)\n"
    is_1644: "bd = 0\nsr = 0\nfor item in items:\n    bd += item.bitdepth\n    sr += item.samplerate\nbd = round(bd / len(items))\nsr = round(sr / len(items) / 1000)\nreturn 1 if bd == 16 and sr == 44 else 0\n"
    source: "media = set([i.media.lower() for i in items])\n\n# Handle media aliases\nfor m in media:\n    if any(t in m for t in ('digital', 'file')):\n        o.append('WEB')\n    elif 'vinyl' in m:\n        o.append('Vinyl')\n    elif 'cd' in m:\n        o.append('CD')\n    elif m != '':\n        o.append(m)\n\nreturn \", \".join(o)\n"
    media_type: "# https://musicbrainz.org/doc/Release/Format\n# Lets Merge the variations of the same medium into the main\n# medium name (Opinonated)\nmedia_list = {\n '12\" Vinyl':     'Vinyl',\n '10\" Vinyl':     'Vinyl',\n '7\" Vinyl':      'Vinyl',\n 'Vinyl':         'Vinyl',\n 'CDr':           'CDR',\n 'CD-R':          'CDR',\n 'Cassette':      'Cassette',\n 'Digital Media': 'Web',\n 'CD':            'CD',\n 'File':          'Web',\n 'DVD':           'DVDA',\n}\n# Lets omit these instead of converging them under a similar label like above (Opinonated)\nmedia_types_to_omit = ['Blu-spec CD']\nif items[0].media in media_list:\n  return str(media_list[items[0].media]) + ''\nelif items[0].media in media_types_to_omit:\n  return None\nelif items[0].media == '':\n  return None\nelse:\n  return str(items[0].media) + ''\n"
badfiles:
    check_on_import: yes
    commands:
        flac: flac --test --warnings-as-errors --silent
        fla: flac --test --warnings-as-errors --silent
convert:
    auto: yes
    embed: yes
    id3v23: no
    max_bitrate: 2000
    no_convert: flac
    never_convert_lossy_files: yes
    delete_originals: no
    format: flac
    command: ffmpeg -i -y -vn -acodec
    extension: flac
    ffmpeg: /usr/bin/ffmpeg
    opts: -ab 320k -ac 2 -ar 48000
    dest:
    pretend: no
    link: no
    hardlink: no
    threads: 6
    formats:
        aac:
            command: ffmpeg -i $source -y -vn -acodec aac -aq 1 $dest
            extension: m4a
        alac:
            command: ffmpeg -i $source -y -vn -acodec alac $dest
            extension: m4a
        flac: ffmpeg -i $source -y -vn -acodec flac $dest
        mp3: ffmpeg -i $source -y -vn -aq 2 $dest
        opus: ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest
        ogg: ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest
        wma: ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest
    auto_keep: no
    tmpdir:
    quiet: no
    paths: {}
    copy_album_art: no
    album_art_maxwidth: 0
    playlist:
web:
    host: 0.0.0.0
    port: 8337
copyartifacts:
    extensions: .cue .log .m3u8 .nfo .m3u .rtf .md5 .ffp
    print_ignored: no
edit:
    itemfields: genre track title artist album year
    albumfields: track title artist albumartist album year
    ignore_fields: id path
yearfixer: yes
pathfields: {}
missing:
    count: no
    total: no
    album: no
lastimport:
    per_page: 500
    retry_limit: 3

My plugin version (output of beet bpmanalyser -v) is:

bpmanalyser: Bpm Analyser(beets-bpmanalyser) plugin for Beets: v1.5.9

@arogl
Copy link

arogl commented Nov 17, 2024

I am having similar issues with mp3 files, I suspect v2 of numpy may be the issue.

I'll try downgrading to the latest in the v1 series.

@arogl
Copy link

arogl commented Nov 18, 2024

Downgrade to v1 fixed the error

pip install numpy==1.26.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants