DarwinAwardWinner / rganalysis

A script for adding replaygain tags to music files
31 stars 4 forks source link

unreadable attribute/problems running the script #10

Closed spoo333 closed 5 years ago

spoo333 commented 5 years ago

When I run the script, I get the following error messages (this is after a system reinstall, Linux Mint 19.2). Is this an installation problem or down to the script? Thanks.

unreadable attribute 2019-08-10 23:57:46,502 ERROR: Failed to analyze [album x] in directory [directory y] of type [MP3/FLAC]. Skipping this track set. The exception was:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/rganalysis/main.py", line 51, in call super(TrackSetHandler, self).call(track_set) File "/usr/local/lib/python3.6/dist-packages/rganalysis/main.py", line 34, in call return getattr(obj, self.method_name)(*self.args, **self.kwargs) File "/usr/local/lib/python3.6/dist-packages/rganalysis/init.py", line 463, in do_gain if self.has_valid_rgdata(): File "/usr/local/lib/python3.6/dist-packages/rganalysis/init.py", line 510, in has_valid_rgdata if not t.has_valid_rgdata(): File "/usr/local/lib/python3.6/dist-packages/rganalysis/init.py", line 97, in has_valid_rgdata return self.gain is not None and self.peak is not None AttributeError: unreadable attribute

Thanks

DarwinAwardWinner commented 5 years ago

I have pushed a potential fix to the "prop" branch. Can you test it out by installing using

pip install https://github.com/DarwinAwardWinner/rganalysis/archive/prop.zip

and see if that fixes things?

spoo333 commented 5 years ago

Thanks for the update. Analysis of flac files appears to be working now, mp3 analysis gives the following error message:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/rganalysis/main.py", line 52, in call super(TrackSetHandler, self).call(track_set) File "/usr/local/lib/python3.6/dist-packages/rganalysis/main.py", line 35, in call return getattr(obj, self.method_name)(*self.args, **self.kwargs) File "/usr/local/lib/python3.6/dist-packages/rganalysis/init.py", line 462, in do_gain (track.gain, track.peak) = (track_rginfo["replaygain_track_gain"], track_rginfo["replaygain_track_peak"]) File "/usr/local/lib/python3.6/dist-packages/rganalysis/init.py", line 164, in _set_peak self.track['replaypeak_track_peak'] = format_peak(value) File "/usr/local/lib/python3.6/dist-packages/mutagen/_file.py", line 75, in setitem self.tags[key] = value File "/usr/local/lib/python3.6/dist-packages/mutagen/easyid3.py", line 229, in setitem raise EasyID3KeyError("%r is not a valid key" % key) mutagen.easyid3.EasyID3KeyError: "'replaypeak_track_peak' is not a valid key"

I tried both audiotools and bs1770gain

DarwinAwardWinner commented 5 years ago

Whoops, that's a search and replace mistake on my part. I'll push a new version in a few minutes.

DarwinAwardWinner commented 5 years ago

Ok, please try again now.

spoo333 commented 5 years ago

:) thanks, will do

spoo333 commented 5 years ago

looking good so far, thank you. Happy to be able to use this script again. Much appreciated

spoo333 commented 5 years ago

I'll close this now as the matter seems resolved :)