Closed CartoonFan closed 4 months ago
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:
threads: 1
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.
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
Forgot to add my extractor version :flushed:
$ 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
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?
Hmm...no change on my end.
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.
Hmm...not sure what happened there, but this should be the correct one: config.yaml.tar.gz
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 fileOUTPUT
is the json file where the extracted data will be storedPROFILE
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)
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 '}'
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
All right. I'll give them a holler and see how it goes. Thanks for the help!
A tiny feature was merged recently that should help debugging issues like this one: https://github.com/adamjakab/BeetsPluginXtractor/pull/20
@CartoonFan Where you able to solve your issue back then?
@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.
Closing due to inactivity.
Problem
Running your command in verbose (
-vv
) mode:Led to this problem:
Setup
My configuration (output of
beet config
) is:My plugin version (output of
beet xtractor -v
) is: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!