[GH-ISSUE #131] Module Error #59

Closed
opened 2026-02-27 23:20:38 +03:00 by kerem · 5 comments
Owner

Originally created by @jsclose on GitHub (Nov 17, 2016).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/131

After installing the spotipy package, I am still getting an error while trying to run the sample code

File "spotipy.py", line 1, in
import spotipy
File "/Users/jakeclose/Sites/personal/spotipy.py", line 10, in
sp = spotipy.Spotify()
AttributeError: 'module' object has no attribute 'Spotify'

Originally created by @jsclose on GitHub (Nov 17, 2016). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/131 After installing the spotipy package, I am still getting an error while trying to run the sample code File "spotipy.py", line 1, in <module> import spotipy File "/Users/jakeclose/Sites/personal/spotipy.py", line 10, in <module> sp = spotipy.Spotify() AttributeError: 'module' object has no attribute 'Spotify'
kerem closed this issue 2026-02-27 23:20:38 +03:00
Author
Owner

@yu-zou commented on GitHub (Jan 4, 2017):

Hi jsclose.

I got the same error. Did you fixt it?

Thanks.

<!-- gh-comment-id:270289181 --> @yu-zou commented on GitHub (Jan 4, 2017): Hi jsclose. I got the same error. Did you fixt it? Thanks.
Author
Owner

@yu-zou commented on GitHub (Jan 4, 2017):

Okay, I got the problem.
Change the name. You could not name it as spotipy.py. Otherwise, the attribute 'Spotify' will be searched within your spotipy.py file. Obviously, you don't have any object defined in your code.

<!-- gh-comment-id:270289623 --> @yu-zou commented on GitHub (Jan 4, 2017): Okay, I got the problem. Change the name. You could not name it as spotipy.py. Otherwise, the attribute 'Spotify' will be searched within your spotipy.py file. Obviously, you don't have any object defined in your code.
Author
Owner

@umar-farooq-khan commented on GitHub (Sep 10, 2019):

i dont have the file name as spotipy or spotipy both,but i still got this error

<!-- gh-comment-id:529904486 --> @umar-farooq-khan commented on GitHub (Sep 10, 2019): i dont have the file name as spotipy or spotipy both,but i still got this error
Author
Owner

@YuxiaoLuo commented on GitHub (Nov 18, 2021):

I got the same error... Did you solve it @umar-farooq-khan?

<!-- gh-comment-id:973264258 --> @YuxiaoLuo commented on GitHub (Nov 18, 2021): I got the same error... Did you solve it @umar-farooq-khan?
Author
Owner

@stephanebruckert commented on GitHub (Nov 18, 2021):

@YuxiaoLuo can you please share a stacktrace?

<!-- gh-comment-id:973266149 --> @stephanebruckert commented on GitHub (Nov 18, 2021): @YuxiaoLuo can you please share a stacktrace?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#59
No description provided.