ImportError: cannot import name 'unicode_codes' from partially initialized module 'emoji'
envgap__carpedm20__emoji-147
01 / FAILURE SIGNATURE
As reported upstream
ImportError: cannot import name 'unicode_codes' from partially initialized module 'emoji' (most likely due to a circular import) (/usr/local/lib/python3.8/site-packages/emoji/__init__.py)
Not scored yet.
- The failure reproduces in a clean container and the known fix makes the project run; it has not been scored yet.
02 / ENVIRONMENT RECIPE
- Base commit
b3b70368b86e269f1e53079862a708e1e377cfbb- Manifest
setup.py- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
carpedm20/emoji #147 · read the original issue
Importing emoji fails due to a invalid input within `emoji/__init__.py`.
Using `python -m pip install emoji --upgrade`.
## Ubuntu
```
File "/app/automod/emotes.py", line 4, in <module>
import emoji
from emoji.core import *
File "/usr/local/lib/python3.8/site-packages/emoji/core.py", line 16, in <module>
from emoji import unicode_codes
ImportError: cannot import name 'unicode_codes' from partially initialized module 'emoji' (most likely due to a circular import) (/usr/local/lib/python3.8/site-packages/emoji/__init__.py)
```
Or via CLI:
```
$ python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import emoji
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/zaanposni/.local/lib/python3.8/site-packages/emoji/__init__.py", line 18, in <module>
from emoji.core import *
File "/home/zaanposni/.local/lib/python3.8/site-packages/emoji/core.py", line 16, in <module>
from emoji import unicode_codes
ImportError: cannot import name 'unicode_codes' from partially initialized module 'emoji' (most likely due to a circular import) (/home/zaanposni/.local/lib/python3.8/site-packages/emoji/__init__.py)
```
## Windows
```
> python
Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import emoji
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\zaanposni\AppData\Local\Programs\Python\Python37\lib\site-packages\emoji\__init__.py", line 18, in <module>
from emoji.core import *
File "C:\Users\zaanposni\AppData\Local\Programs\Python\Python37\lib\site-packages\emoji\core.py", line 16, in <module>
from emoji import unicode_codes
ImportError: cannot import name 'unicode_codes' from 'emoji' (C:\Users\zaanposni\AppData\Local\Programs\Python\Python37\lib\site-packages\emoji\__init__.py)
```
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]