carpedm20 / emoji

emoji terminal output for Python
Other
1.9k stars 279 forks source link

AttributeError someone can help me #232

Closed jfreitas123 closed 2 years ago

jfreitas123 commented 2 years ago

I've imported the library "emoji" to a code and appear this error

Traceback (most recent call last): File "C:\Users\jpf_l\PycharmProjects\CursoemVideo\aula 08\emoji.py", line 1, in import emoji File "C:\Users\jpf_l\PycharmProjects\CursoemVideo\aula 08\emoji.py", line 2, in print(emoji.emojize('Python is :thumbsup:', language='alias')) AttributeError: partially initialized module 'emoji' has no attribute 'emojize' (most likely due to a circular import). Did you mean: 'emoji'?

my email jp752749@gmail.com

WhatsApp Image 2022-09-25 at 4 49 56 PM WhatsApp Image 2022-09-25 at 4 49 47 PM

cvzi commented 2 years ago

I think you have to change the name of your file. If the filename is emoji.py then import emoji may try to import the file emoji.py and not the library. Try something like my_emoji.py

jfreitas123 commented 2 years ago

I think you have to change the name of your file. If the filename is emoji.py then import emoji may try to import the file emoji.py and not the library. Try something like my_emoji.py

Thank you men, it worked!