carpedm20 / emoji

emoji terminal output for Python
Other
1.87k stars 273 forks source link

AttributeError: module 'emoji' has no attribute 'analyze' #261

Closed pedrobuenoxs closed 1 year ago

pedrobuenoxs commented 1 year ago

Hi everyone, just found this package. Im working with texts and emojis and it was very helpful.

I've been away from this project for a while and now i cant make the package work.

requirements.txt

beautifulsoup4==4.12.2
bs4==0.0.1
certifi==2023.5.7
charset-normalizer==3.1.0
emoji==2.5.0
idna==3.4
lxml==4.9.2
numpy==1.24.3
pandas==2.0.2
python-dateutil==2.8.2
pytz==2023.3
requests==2.31.0
six==1.16.0
soupsieve==2.4.1
tzdata==2023.3
urllib3==2.0.3
import emoji
# also tryied from emoji import analyze
print(emoji.analyze("0️⃣0️⃣0️⃣"))
~/dev/project main*
.venv ❯ python3 script2.py
Traceback (most recent call last):
  File "/home/pedro/dev/project/script2.py", line 3, in <module>
    print(emoji.analyze("0️⃣0️⃣0️⃣"))
AttributeError: module 'emoji' has no attribute 'analyze'

What im missing here?

cvzi commented 1 year ago

Could you check if you have the latest version:

import emoji
print(emoji.__version__)   # 2.5.0
pedrobuenoxs commented 1 year ago

hey @cvzi thanks for quick response.

on my venv:

~/dev/project main*
.venv ❯ pip show emoji
Name: emoji
Version: 2.5.0
Summary: Emoji for Python
Home-page: https://github.com/carpedm20/emoji/
Author: Taehoon Kim, Kevin Wurster
Author-email: carpedm20@gmail.com
License: New BSD
Location: /home/pedro/dev/freela/emoji-writer-v2/.venv/lib/python3.10/site-packages
Requires: 
Required-by: 

outside my env

~/dev/project main*
❯ pip show emoji
Name: emoji
Version: 2.5.0
Summary: Emoji for Python
Home-page: https://github.com/carpedm20/emoji/
Author: Taehoon Kim, Kevin Wurster
Author-email: carpedm20@gmail.com
License: New BSD
Location: /home/pedro/.local/lib/python3.10/site-packages
Requires: 
Required-by: 

when i ran the python file:

❯ python3 script2.py
Traceback (most recent call last):
  File "/home/pedro/dev/project/script2.py", line 2, in <module>
    print(emoji.__version__)   # 2.5.0
AttributeError: module 'emoji' has no attribute '__version__'
cvzi commented 1 year ago

Is there a file or folder named emoji or emoji.py in your project? That could cause Python to load the wrong file.

pedrobuenoxs commented 1 year ago

ok i need some sleep, thanks and sorry

cvzi commented 1 year ago

No problem 😂 Please close the issue