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

ImportError: cannot import name 'UNICODE_EMOJI' from 'emoji' #3139

Open
chansonzhang opened this issue Oct 26, 2023 · 1 comment
Open

ImportError: cannot import name 'UNICODE_EMOJI' from 'emoji' #3139

chansonzhang opened this issue Oct 26, 2023 · 1 comment

Comments

@chansonzhang
Copy link

chansonzhang commented Oct 26, 2023

Describe the bug
ImportError: cannot import name 'UNICODE_EMOJI' from 'emoji'

To Reproduce
Steps to reproduce the behavior:

  1. pip install emoji==2.8.0
  2. pip install recognizers-text-date-time==1.0.2a2
  3. python -c "from recognizers_date_time import DateTimeRecognizer"

Expected behavior
No error occurred.

Sample input/output
N/A

Platform (please complete the following information):

  • Platform: Python
  • Environment: Windows
  • Version of package: 1.0.2a2

Additional context
ImportError: cannot import name 'UNICODE_EMOJI' from 'emoji'

@aymenkrifa
Copy link

aymenkrifa commented Dec 1, 2023

Hello @chansonzhang, I had a similar issue, and the 'solution' I found was to downgrade the emoji package to version 1.7.0.

pip install emoji==1.7.0

The problem stems from the fact that the latest version of the recognizers-text-date-time package, along with its dependency recognizers-text, was released in November 2019 and hasn't been updated since then. Additionally, recognizers-text relies on the emoji package.

The issue arises because the emoji package made significant changes starting from version 2.0.0, leading to the ImportError you mentioned.

I hope this solution proves helpful to you! 😃

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