-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
itunespy can't set attribute #84
Comments
@danimateo I just checked the code by exec it on console, it's working all right, why do you think it is failing there? >>> import itunespy
>>> s = itunespy.search_track('Psycho')
>>> s[0].track_time
221446
>>> s[0].track_time = round(s[0].track_time / 60000, 2)
>>> s[0].track_time
3.69 |
Is it possible that you have an older version of itunespy? I checked the source code from their repo and there's no setter for track_time. |
@danimateo I have the latest version. It is possible to update the vars without the setters. Since I am accessing those same variables in other places as well. The issue is probably something else. |
Maybe it's something else, but I get the "can't set attribute" error. Weird, I will investigate some more. |
So, here is the previous commit to the
The abovde code throws:
Could you please check again? Anyway, cool script :) I was looking for something like this for some time. |
@danimateo Is this code deployed in the latest version? I have the latest version that is available in PyPi. |
Can you try doing |
@danimateo I already did a pip freeze when I told you I'm using the latest version. |
Ok then, I tested this in docker so everything is clean and the error persists. You can try:
and then you can try doing what you suggested here Or if you downloading tensorflow just for this is too much, I think the point can be proven by just doing
and then go at it from the python shell. |
Hey @danimateo I just tried the code I shared with you earlier and I am getting the can't set attr error now. It's weird, I have not done anything different, no upgrades nothing, I had just turned on the computer and tried running the same code and now I'm getting the error. Thanks for pointing it out. Also, since a setter is not defined in the latest release and it is important for us to update that In the meantime, we can open an issue in Update: Just checked with the last version of |
Yeah I've seen that everything works fine without setting the |
@danimateo Sure, I'll raise a Feature request in the official repo to ask for a setter method in the next release. Also, when you want to throw exceptions, please do a check. Instead of using print, use the logger. That way if the exception is not major, you can just call the Please try to avoid using print's etc. |
Yes, my bad. I'll use the logger. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs for another 7 days. Thank you for your contributions. |
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.
The text was updated successfully, but these errors were encountered: