itunespy can't set attribute
See original GitHub issuedef get_from_itunes(SONG_NAME):
"""Try to download the metadata using itunespy."""
# Try to get the song data from itunes
try:
SONG_INFO = itunespy.search_track(SONG_NAME)
# Before returning convert all the track_time values to minutes.
for song in SONG_INFO:
song.track_time = round(song.track_time / 60000, 2)
return SONG_INFO
except Exception:
pass
The code above tries to set the track_time, but that setter isn’t defined in the itunespy library, so it doesn’t work and doesn’t even throw an error. This is related to #77 as it only get songs from gaana. The solution would be to remove setting track_time, since something else is already implemented in the source library.
I made a pull request for this, also adding a print for exceptions instead of just pass.
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (14 by maintainers)
Top Results From Across the Web
setAttributes(_:ofItemAtPath:) | Apple Developer Documentation
A dictionary containing as keys the attributes to set for path and as values the corresponding value for the attribute. You can set...
Read more >AttributeError: can't set attribute in python - Stack Overflow
As I tried to overwrite it in my code, it caused AttributeError: can't set attribute . Just simply renaming my variable from self.hparams...
Read more >iTunes: Can't Change Song Name, Artist, or Album on Get Info ...
iTunes: Can't Change Song Name, Artist, or Album on Get Info Screen ... Select “OK“. Wait until the attributes are applied to your...
Read more >Python error saying "AttributeError: can't set attribute" - Intellipaat
I'm trying to execute the following python code: class C(object): def __init__(self): ... > c.x = 10 AttributeError: can't set attribute.
Read more >A Complete Guide to Data Attributes | CSS-Tricks
Syntax. It can be awfully handy to be able to make up your own HTML attributes and put your own information inside them....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, my bad. I’ll use the logger.
So, here is the previous commit to the
ResultItem
class in itunespy and here is the newest one. The old one uses normal python attributes and the new one uses@property
decorators, which are read only unless a setter is defined.The abovde code throws:
Could you please check again? Anyway, cool script 😃 I was looking for something like this for some time.