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

xtractor crashes with error, complains about expected '}' when parsing JSON #12

Open
CartoonFan opened this issue Oct 4, 2021 · 14 comments
Labels
question Further information is requested unclear documentation Issue caused by possibly not adequate documentation.

Comments

@CartoonFan
Copy link

Problem

Running your command in verbose (-vv) mode:

$ beet -vv xtractor "Talk Talk"
user configuration: /home/jeremiah/.config/beets/config.yaml
data directory: /home/jeremiah/.config/beets
plugin paths: 
/usr/lib/python3.9/site-packages/beets/util/confit.py:19: UserWarning: beets.util.confit is deprecated; use confuse instead
  warnings.warn("beets.util.confit is deprecated; use confuse instead")
/usr/lib/python3.9/site-packages/beets/mediafile.py:19: UserWarning: beets.mediafile is deprecated; use mediafile instead
  warnings.warn("beets.mediafile is deprecated; use mediafile instead")
Sending event: pluginload
library database: /home/jeremiah/.config/beets/library.db
library directory: /home/jeremiah/Music/music_collection
Sending event: library_opened
xtractor: Combined query: AndQuery([AndQuery([AnyFieldQuery('Talk', ('artist', 'title', 'comments', 'album', 'albumartist', 'genre'), SubstringQuery), AnyFieldQuery('Talk', ('artist', 'title', 'comments', 'album', 'albumartist', 'genre'), SubstringQuery)]), OrQuery([MatchQuery('bpm', None, True), MatchQuery('average_loudness', None, False), MatchQuery('danceable', None, False), MatchQuery('gender', None, False), MatchQuery('genre_rosamerica', None, False), MatchQuery('voice_instrumental', None, False), MatchQuery('mood_acoustic', None, False), MatchQuery('mood_aggressive', None, False), MatchQuery('mood_electronic', None, False), MatchQuery('mood_happy', None, False), MatchQuery('mood_sad', None, False), MatchQuery('mood_party', None, False), MatchQuery('mood_relaxed', None, False), MatchQuery('mood_mirex', None, False)])])
xtractor: Number of items to be processed: 1
xtractor: Running analysis for: /home/jeremiah/Music/music_collection/Essential - Talk Talk/Essential - 01 - 07 - Talk Talk - It’s My Life.flac
xtractor: Extractor: /usr/bin/streaming_extractor_music
xtractor: Input: /home/jeremiah/Music/music_collection/Essential - Talk Talk/Essential - 01 - 07 - Talk Talk - It’s My Life.flac
xtractor: Output: /home/jeremiah/Downloads/workshop/beets/xtraction_data/455420aa-f092-4bf7-9eda-bda5fd2036ea.json
xtractor: Profile: /home/jeremiah/Downloads/workshop/beets/xtraction_data/profile.yml
xtractor: The process exited with code: 0
xtractor: Process stdout: 
xtractor: Process stderr: [   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/danceability.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/gender.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/genre_rosamerica.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_acoustic.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_aggressive.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_electronic.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_happy.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_sad.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_party.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_relaxed.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/voice_instrumental.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/moods_mirex.history
skipping /home/jeremiah/Music/music_collection/Essential - Talk Talk/Essential - 01 - 07 - Talk Talk - It’s My Life.flac due to error: YamlInput: error during parsing: Error parsing json dictionary: expected '}'


xtractor: File not found: Output file(/home/jeremiah/Downloads/workshop/beets/xtraction_data/455420aa-f092-4bf7-9eda-bda5fd2036ea.json) not found!
Sending event: cli_exit

Led to this problem:

xtractor crashes without modifying files or producing output

Setup

  • OS: Arch Linux
  • Python version: 3.9.7
  • Beets version: 1.5.1 (git)
  • Turning off other plugins made problem go away (yes/no): no

My configuration (output of beet config) is:

directory: /home/jeremiah/Music/music_collection
library: /home/jeremiah/.config/beets/library.db

import:
    move: yes
    write: yes
    log: beetslog.txt

plugins: chroma discogs fromfilename absubmit acousticbrainz mbsync parentwork the xtractor alternatives artistcountry autofix bandcamp bpmanalyser check copyartifacts describe goingrunning summarize usertag wlg ydl yearfixer

ui:
    color: yes

musicbrainz:
    extra_tags:
    - year
    - catalognum
    - country
    - media
    - label

paths:
    default: $album%aunique{} - $albumartist/$album%aunique{} - $disc - $track - $artist - $title
    singleton: $album%aunique{} - $albumartist/$album%aunique{} - $disc - $track - $artist - $title
    comp: $album%aunique{} - $albumartist/$album%aunique{} - $disc - $track - $artist - $title
xtractor:
    auto: no
    dry-run: no
    write: yes
    threads: 16
    force: no
    quiet: no
    keep_output: no
    keep_profiles: yes
    output_path: /home/jeremiah/Downloads/workshop/beets/xtraction_data
    essentia_extractor: /usr/bin/streaming_extractor_music
    extractor_profile:
        highlevel:
            svm_models:
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/danceability.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/gender.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/genre_rosamerica.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_acoustic.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_aggressive.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_electronic.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_happy.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_sad.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_party.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_relaxed.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/voice_instrumental.history
            - /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/moods_mirex.history
            compute: 1
        outputFormat: json
        outputFrames: 0
        lowlevel:
            frameSize: 2048
            hopSize: 1024
        chromaprint:
            compute: 0
    low_level_targets:
        bpm:
            path: rhythm.bpm
            type: integer
            required: yes
        danceability:
            path: rhythm.danceability
            type: float
        beats_count:
            path: rhythm.beats_count
            type: integer
        average_loudness:
            path: lowlevel.average_loudness
            type: float
            required: yes
    high_level_targets:
        danceable:
            path: highlevel.danceability.all.danceable
            type: float
            required: yes
        gender:
            path: highlevel.gender.value
            type: string
            required: yes
        is_male:
            path: highlevel.gender.all.male
            type: float
        is_female:
            path: highlevel.gender.all.female
            type: float
        genre_rosamerica:
            path: highlevel.genre_rosamerica.value
            type: string
            required: yes
        voice_instrumental:
            path: highlevel.voice_instrumental.value
            type: string
            required: yes
        is_voice:
            path: highlevel.voice_instrumental.all.voice
            type: float
        is_instrumental:
            path: highlevel.voice_instrumental.all.instrumental
            type: float
        mood_acoustic:
            path: highlevel.mood_acoustic.all.acoustic
            type: float
            required: yes
        mood_aggressive:
            path: highlevel.mood_aggressive.all.aggressive
            type: float
            required: yes
        mood_electronic:
            path: highlevel.mood_electronic.all.electronic
            type: float
            required: yes
        mood_happy:
            path: highlevel.mood_happy.all.happy
            type: float
            required: yes
        mood_sad:
            path: highlevel.mood_sad.all.sad
            type: float
            required: yes
        mood_party:
            path: highlevel.mood_party.all.party
            type: float
            required: yes
        mood_relaxed:
            path: highlevel.mood_relaxed.all.relaxed
            type: float
            required: yes
        mood_mirex:
            path: highlevel.moods_mirex.value
            type: string
            required: yes
        mood_mirex_cluster_1:
            path: highlevel.moods_mirex.all.Cluster1
            type: float
        mood_mirex_cluster_2:
            path: highlevel.moods_mirex.all.Cluster2
            type: float
        mood_mirex_cluster_3:
            path: highlevel.moods_mirex.all.Cluster3
            type: float
        mood_mirex_cluster_4:
            path: highlevel.moods_mirex.all.Cluster4
            type: float
        mood_mirex_cluster_5:
            path: highlevel.moods_mirex.all.Cluster5
            type: float
acousticbrainz:
    auto: yes
    force: no
    tags: []
describe:
    auto: no
parentwork:
    auto: no
    force: no
goingrunning:
    targets: {}
    trainings:
        fallback:
            increment_play_count: no
            favour_unplayed: no
            ordering_strategy: score_based_linear
            pick_strategy: random_from_bins
    flavours: {}
copyartifacts:
    extensions: .*
    print_ignored: no
bpmanalyser:
    auto: no
    dry-run: no
    write: yes
    threads: 16
    force: no
    quiet: no
yearfixer:
    auto: no
    force: no
bandcamp:
    preferred_media: Digital Media
    include_digital_only_tracks: yes
    search_max: 10
    lyrics: no
    art: no
    exclude_extra_fields: []
chroma:
    auto: yes
the:
    the: yes
    a: yes
    format: '{0}, {1}'
    strip: no
    patterns: []
absubmit:
    extractor: ''
    force: no
    pretend: no
discogs:
    apikey: REDACTED
    apisecret: REDACTED
    tokenfile: discogs_token.json
    source_weight: 0.5
    user_token: REDACTED
    separator: ', '
    index_tracks: no
check:

    import: yes
    write-check: yes
    write-update: yes
    integrity: yes
    convert-update: yes
    threads: 16
    external:
        mp3val:
            cmdline: mp3val {0}
            formats: MP3
            error: '^WARNING: .* \(offset 0x[0-9a-f]+\): (.*)$'
            fix: mp3val -nb -f {0}
        flac:
            cmdline: flac --test --silent {0}
            formats: FLAC
            error: '^.*: ERROR,? (.*)$'
        oggz-validate:
            cmdline: oggz-validate {0}
            formats: OGG
autofix:
    max_exec_time: 0
    tasks:
        missing_file_checker:
            enabled: no
        year_fixer:
            enabled: no
        audio_conversion:
            enabled: no
        tag_cleaner:
            enabled: no
        ab_data_fetcher:
            enabled: no
        xtractor:
            enabled: no
        genre_finder:
            enabled: no

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

xtractor: Xtractor(beets-xtractor) plugin for Beets: v0.3.0

Hello, there! After a fair amount of wrangling with the dependencies, I've been unable to run the xtractor plugin successfully. It seems to crash after complaining about an expected '}' when parsing JSON. PyYaml 5.4.1 is installed, but my Arch install is relatively recent, so maybe I've just forgotten to install something, maybe. Let me know if you need any more information. Thanks!

@adamjakab
Copy link
Owner

Hi @CartoonFan. Inteersting issue. Looking at your config I cannot point to the cause of the error so it needs a bit more investigation. Can you try the following to see if the results are the same:

  • Update your Xractor to the latest: 0.3.1
  • Set threads: 1
  • Try some different music files
  • Install the extractor by using pip install essentia

Run the extraction again. With your config keep_profiles: yes after you run the extraction you should find the profile.yml profile in the extraction folder (even if it fails). Post the content here.

...some miuntes later... Now that I look at it better it looks like that you have a badly indented compute: 1 line inside the svm_models section in you config. And also a lot of other keys not required or documented for this plugin:

This is how mine looks like:

xtractor:
    write: no
    threads: 1
    force: no
    quiet: no
    keep_output: yes
    keep_profiles: no
    output_path: ~/Projects/Python/BeetsConfig/XTraction/
    essentia_extractor: /usr/local/bin/essentia_streaming_extractor_music
    extractor_profile:
        highlevel:
            compute: 1
            svm_models:
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/danceability.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/gender.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/genre_rosamerica.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/mood_acoustic.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/mood_aggressive.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/mood_electronic.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/mood_happy.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/mood_sad.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/mood_party.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/mood_relaxed.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/voice_instrumental.history
                - /home/jackisback/Projects/Music/extractor-svm-models-v2.1_beta5/moods_mirex.history
        chromaprint:
            compute: 0

Try to substitute the entire xtractor key with this substituting your paths but keeping the format.

@adamjakab adamjakab added question Further information is requested unclear documentation Issue caused by possibly not adequate documentation. labels Mar 6, 2022
@CartoonFan
Copy link
Author

Sorry for the delay, @adamjakab! Essentia doesn't build for me with the current ffmpeg git, and the pip wheel wouldn't build either, so I had to build essentia without ffmpeg support from the 2.1_beta5 source tarball. I switched my extractor key for yours (updated config.yaml.gz) and tried with different music files (results below). I also have the profile (profile.yml.gz) as you requested. Hope this helps!

$ beet -vvv xt "Yes"
user configuration: /home/jeremiah/.config/beets/config.yaml
data directory: /home/jeremiah/.config/beets
plugin paths: 
/home/jeremiah/.local/lib/python3.10/site-packages/beets/util/confit.py:19: UserWarning: beets.util.confit is deprecated; use confuse instead
  warnings.warn("beets.util.confit is deprecated; use confuse instead")
/home/jeremiah/.local/lib/python3.10/site-packages/beets/mediafile.py:19: UserWarning: beets.mediafile is deprecated; use mediafile instead
  warnings.warn("beets.mediafile is deprecated; use mediafile instead")
Sending event: pluginload
library database: /home/jeremiah/.config/beets/library.db
library directory: /home/jeremiah/Music/music_collection
Sending event: library_opened
xtractor: Combined query: AndQuery([AndQuery([AnyFieldQuery('Yes', ('artist', 'title', 'comments', 'album', 'albumartist', 'genre'), SubstringQuery)]), OrQuery([MatchQuery('bpm', None, True), MatchQuery('average_loudness', None, False), MatchQuery('danceable', None, False), MatchQuery('gender', None, False), MatchQuery('genre_rosamerica', None, False), MatchQuery('voice_instrumental', None, False), MatchQuery('mood_acoustic', None, False), MatchQuery('mood_aggressive', None, False), MatchQuery('mood_electronic', None, False), MatchQuery('mood_happy', None, False), MatchQuery('mood_sad', None, False), MatchQuery('mood_party', None, False), MatchQuery('mood_relaxed', None, False), MatchQuery('mood_mirex', None, False)])])
xtractor: Number of items to be processed: 3
xtractor: Running analysis for: /home/jeremiah/Music/music_collection/Parasite Eve Original Soundtrack - 下村陽子/Parasite Eve Original Soundtrack - 01 - 01 - 下村陽子 - Primal Eyes.flac
xtractor: Extractor: /home/jeremiah/Downloads/workshop/beets/extractors/beta5/essentia_streaming_extractor_music_svm
xtractor: Input: /home/jeremiah/Music/music_collection/Parasite Eve Original Soundtrack - 下村陽子/Parasite Eve Original Soundtrack - 01 - 01 - 下村陽子 - Primal Eyes.flac
xtractor: Output: /home/jeremiah/Downloads/workshop/beets/xtraction_data/f199b0ca-4e44-4226-824d-466f1bbcdaaf.json
xtractor: Profile: /home/jeremiah/Downloads/workshop/beets/xtraction_data/profile.yml
xtractor: The process exited with code: 0
xtractor: Process stdout: 
xtractor: Process stderr: [   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/danceability.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/gender.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/genre_rosamerica.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_acoustic.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_aggressive.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_electronic.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_happy.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_sad.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_party.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_relaxed.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/voice_instrumental.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/moods_mirex.history
skipping /home/jeremiah/Music/music_collection/Parasite Eve Original Soundtrack - 下村陽子/Parasite Eve Original Soundtrack - 01 - 01 - 下村陽子 - Primal Eyes.flac due to error: YamlInput: error during parsing: Error parsing json dictionary: expected '}'


xtractor: File not found: Output file(/home/jeremiah/Downloads/workshop/beets/xtraction_data/f199b0ca-4e44-4226-824d-466f1bbcdaaf.json) not found!
xtractor: Running analysis for: /home/jeremiah/Music/music_collection/Dark Cloud Original Soundtrack - Tomohito Nishiura/Dark Cloud Original Soundtrack - 01 - 06 - Tomohito Nishiura - Open Your Eyes.flac
xtractor: Extractor: /home/jeremiah/Downloads/workshop/beets/extractors/beta5/essentia_streaming_extractor_music_svm
xtractor: Input: /home/jeremiah/Music/music_collection/Dark Cloud Original Soundtrack - Tomohito Nishiura/Dark Cloud Original Soundtrack - 01 - 06 - Tomohito Nishiura - Open Your Eyes.flac
xtractor: Output: /home/jeremiah/Downloads/workshop/beets/xtraction_data/13273952-6.json
xtractor: Profile: /home/jeremiah/Downloads/workshop/beets/xtraction_data/profile.yml
xtractor: The process exited with code: 0
xtractor: Process stdout: 
xtractor: Process stderr: [   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/danceability.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/gender.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/genre_rosamerica.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_acoustic.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_aggressive.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_electronic.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_happy.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_sad.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_party.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_relaxed.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/voice_instrumental.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/moods_mirex.history
skipping /home/jeremiah/Music/music_collection/Dark Cloud Original Soundtrack - Tomohito Nishiura/Dark Cloud Original Soundtrack - 01 - 06 - Tomohito Nishiura - Open Your Eyes.flac due to error: YamlInput: error during parsing: Error parsing json dictionary: expected '}'


xtractor: File not found: Output file(/home/jeremiah/Downloads/workshop/beets/xtraction_data/13273952-6.json) not found!
xtractor: Running analysis for: /home/jeremiah/Music/music_collection/Fragile - Yes/Fragile - 01 - 01 - Yes - Roundabout.flac
xtractor: Extractor: /home/jeremiah/Downloads/workshop/beets/extractors/beta5/essentia_streaming_extractor_music_svm
xtractor: Input: /home/jeremiah/Music/music_collection/Fragile - Yes/Fragile - 01 - 01 - Yes - Roundabout.flac
xtractor: Output: /home/jeremiah/Downloads/workshop/beets/xtraction_data/1e9f6674-7c86-46af-8b96-d752faa1865b.json
xtractor: Profile: /home/jeremiah/Downloads/workshop/beets/xtraction_data/profile.yml
xtractor: The process exited with code: 0
xtractor: Process stdout: 
xtractor: Process stderr: [   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/danceability.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/gender.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/genre_rosamerica.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_acoustic.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_aggressive.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_electronic.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_happy.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_sad.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_party.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_relaxed.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/voice_instrumental.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/moods_mirex.history
skipping /home/jeremiah/Music/music_collection/Fragile - Yes/Fragile - 01 - 01 - Yes - Roundabout.flac due to error: YamlInput: error during parsing: Error parsing json dictionary: expected '}'


xtractor: File not found: Output file(/home/jeremiah/Downloads/workshop/beets/xtraction_data/1e9f6674-7c86-46af-8b96-d752faa1865b.json) not found!
Sending event: cli_exit

@CartoonFan
Copy link
Author

Forgot to add my extractor version 😳

$ beet xt -v  
/home/jeremiah/.local/lib/python3.10/site-packages/beets/util/confit.py:19: UserWarning: beets.util.confit is deprecated; use confuse instead
  warnings.warn("beets.util.confit is deprecated; use confuse instead")
/home/jeremiah/.local/lib/python3.10/site-packages/beets/mediafile.py:19: UserWarning: beets.mediafile is deprecated; use mediafile instead
  warnings.warn("beets.mediafile is deprecated; use mediafile instead")
xtractor: Xtractor(beets-xtractor) plugin for Beets: v0.3.1

@adamjakab
Copy link
Owner

I think I get it now... ref.
can you pls try to change the configuration key from
essentia_extractor: /home/jeremiah/Downloads/workshop/beets/extractors/beta5/essentia_streaming_extractor_music_svm
to
essentia_extractor: /home/jeremiah/Downloads/workshop/beets/extractors/beta5/essentia_streaming_extractor_music
and try again?

@CartoonFan
Copy link
Author

Hmm...no change on my end.

beet_xtractor_wip2.log
config_wip2.yaml.tar.gz

@adamjakab
Copy link
Owner

the attached config shows that you are still using
essentia_extractor: /home/jeremiah/Downloads/workshop/beets/extractors/beta5/essentia_streaming_extractor_music_svm

Please change the binary from essentia_streaming_extractor_music_svm to essentia_streaming_extractor_music and try again.

@CartoonFan
Copy link
Author

Hmm...not sure what happened there, but this should be the correct one:
config.yaml.tar.gz

@adamjakab
Copy link
Owner

adamjakab commented Mar 7, 2022

Ok, the config is now pointing to the correct binary.

Please try this from the console:
essentia_streaming_extractor_music INPUT OUTUT PROFILE

  • INPUT is your music file
  • OUTPUT is the json file where the extracted data will be stored
  • PROFILE is your yml profile (you should have one in your output_path if you set keep_profiles to yes or you can just use the profile.yml you attached above.

ex.: essentia_streaming_extractor_music music.mp3 out.json profile.yml

Let's see if your extractor is sane. (reference)

@CartoonFan
Copy link
Author

Same error. Any ideas?

$ /home/jeremiah/Downloads/workshop/beets/extractors/beta5/essentia_streaming_extractor_music "/home/jeremiah/Music/music_collection/Fragile - Yes/Fragile - 01 - 01 - Yes - Roundabout.flac" /home/jeremiah/Downloads/workshop/beets/xtraction_data/Roundabout_test_json.json "/home/jeremiah/Downloads/workshop/beets/xtraction_data/profile.yml"
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/danceability.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/gender.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/genre_rosamerica.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_acoustic.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_aggressive.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_electronic.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_happy.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_sad.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_party.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/mood_relaxed.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/voice_instrumental.history
[   INFO   ] MusicExtractorSVM: adding SVM model /home/jeremiah/Downloads/workshop/beets/extractors/beta5/svm_models/moods_mirex.history
skipping /home/jeremiah/Music/music_collection/Fragile - Yes/Fragile - 01 - 01 - Yes - Roundabout.flac due to error: YamlInput: error during parsing: Error parsing json dictionary: expected '}'

@adamjakab
Copy link
Owner

Something has gone haywire with your binary. Not sure TBH.
I would remove it fully, install all dependencies and recompile essentia from scratch.
I suggest you ask for some help here: https://github.com/MTG/essentia/issues

@CartoonFan
Copy link
Author

All right. I'll give them a holler and see how it goes. Thanks for the help!

@JOJ0
Copy link
Collaborator

JOJ0 commented Sep 7, 2022

A tiny feature was merged recently that should help debugging issues like this one: #20

@JOJ0
Copy link
Collaborator

JOJ0 commented Sep 7, 2022

@CartoonFan Where you able to solve your issue back then?

@CartoonFan
Copy link
Author

@CartoonFan Where you able to solve your issue back then?

Well, essentia had problems building with ffmpeg 5, so I never really got around to posting this particular issue over there, IIRC. I suppose I could give things a try to see if it's fixed for me now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested unclear documentation Issue caused by possibly not adequate documentation.
Projects
None yet
Development

No branches or pull requests

3 participants