8-Bit Borges
8-Bit Borges

Reputation: 10033

Tagging mp3 files in python 2.7 using eyeD3

I am trying go create a taste profile for a directory of mp3 files using python 2.7 script, but it seems there's something wrong with my eyed3 module.

first I had to import it with 'd' instead of 'D'

import eyed3 

then I had to change deprecated playlist method to catalog.get_item_dicts().

but now it seems that there's something wrong with THIS method:

 tag = eyed3.Tag()

I know pythonis case sensitive, and have tried several syntaxes: eyeD3, tag().

but terminal logs:

 >>'module' object has no attribute 'Tag'

I have followed this thread: How to get detail (Title,Artist) from .mp3 files in python using eyed3 with a similar question, but it wasn't resolved.

when script runs: python personal_catalog_scanner.py -c soup -t song mp3,

an Echonest song catalog is created, mp3 files are found, but no idis created.

what could be wrong?

Upvotes: 2

Views: 749

Answers (1)

Thomas Pritchard
Thomas Pritchard

Reputation: 449

The Tag class is actually eyed3.ID3.Tag, not eyed3.Tag, so you can use the following:

tag = eyed3.ID3.Tag()

...or import it beforehand:

from eyed3.id3.tag import Tag
tag = Tag()

Upvotes: 1

Related Questions