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

[On fresh install] ImportError: cannot import name 'UNICODE_EMOJI' from 'emoji' #59

Open
thamin-i opened this issue Oct 12, 2022 · 1 comment

Comments

@thamin-i
Copy link

thamin-i commented Oct 12, 2022

Hi !

When I install streamdeckfs on a brand new virtual environment i get the error below:

Traceback (most recent call last):
  File "/tmp/venv/bin/streamdeckfs", line 5, in <module>
    from streamdeckfs.commands import main
  File "/tmp/venv/lib/python3.9/site-packages/streamdeckfs/commands/__init__.py", line 17, in <module>
    from .make_dirs import make_dirs  # noqa: F401
  File "/tmp/venv/lib/python3.9/site-packages/streamdeckfs/commands/make_dirs.py", line 14, in <module>
    from ..entities import Key, Page
  File "/tmp/venv/lib/python3.9/site-packages/streamdeckfs/entities/__init__.py", line 41, in <module>
    from .text import KeyTextLine
  File "/tmp/venv/lib/python3.9/site-packages/streamdeckfs/entities/text.py", line 14, in <module>
    from emoji import UNICODE_EMOJI, emojize
ImportError: cannot import name 'UNICODE_EMOJI' from 'emoji' (/tmp/venv/lib/python3.9/site-packages/emoji/__init__.py)

It seems that the emoji library made a major change in their 2.0.0 version and that streamdeckfs needs to install a version below.
Indeed, after installing emoji==1.7.0 manually, this error disappeared.

Could we force emoji<2.0.0 on the setup.cfg file ?

[edit] It should be fixed if we merge the #60 pull request

@davekempe
Copy link

davekempe commented Dec 21, 2022

on debian 11 this worked for me:

pip3 install emoji==1.7
Collecting emoji==1.7
  Downloading emoji-1.7.0.tar.gz (175 kB)
     |################################| 175 kB 16.4 MB/s 
Building wheels for collected packages: emoji
  Building wheel for emoji (setup.py) ... done
  Created wheel for emoji: filename=emoji-1.7.0-py3-none-any.whl size=171029 sha256=8e57e39942a7882aadac4c895331c72257b6ac864dc8b63cbe22292881a69fb1
  Stored in directory: /root/.cache/pip/wheels/fa/7a/e9/22dd0515e1bad255e51663ee513a2fa839c95934c5fc301090
Successfully built emoji
Installing collected packages: emoji
  Attempting uninstall: emoji
    Found existing installation: emoji 2.2.0
    Uninstalling emoji-2.2.0:
      Successfully uninstalled emoji-2.2.0
Successfully installed emoji-1.7.0

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

2 participants