Skip to content
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

module 'duolingo' has no attribute 'Duolingo' #124

Open
m-herzberg opened this issue Sep 7, 2022 · 4 comments
Open

module 'duolingo' has no attribute 'Duolingo' #124

m-herzberg opened this issue Sep 7, 2022 · 4 comments

Comments

@m-herzberg
Copy link

Please help me with this problem :((

"AttributeError: module 'duolingo' has no attribute 'Duolingo'" when I run the sample code from Your repository...

@igorskh
Copy link
Contributor

igorskh commented Sep 7, 2022

Please help me with this problem :((

"AttributeError: module 'duolingo' has no attribute 'Duolingo'" when I run the sample code from Your repository...

Can it be that you named your file duolingo.py? In this case import duolingo line imports your local file instead of the duolingo library.

@m-herzberg
Copy link
Author

thanks!

@NielsDotGithub
Copy link

NielsDotGithub commented Dec 28, 2022

Hi, love the work you have put in to this, would like to use it in my personal projects.

But I have the same problem, i have checkt to not have my file named like he does.

When i try: from duolingo import Duolingo
it references to the path as aspected as shown in the error text:
ImportError: cannot import name 'Duolingo' from 'duolingo' (/Users/Niels/anaconda3/lib/python3.8/site-packages/duolingo/init.Python)
So its not the problem Igorskh had.

When i just do it like in the documentation i get the same error as above:
AttributeError: module 'duolingo' has no attribute 'Duolingo'

Could you please tell me what im doing wrong here..

Many thanks!

@rhlee
Copy link

rhlee commented Jan 4, 2023

For me it was because I had a pip package installed under the name duolingo, which took precedence over the package duolingo-api when importing the module with name duolingo. Removing the package fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants