ImportError: cannot import name 'UNICODE_EMOJI' from 'emoji'
Describe the bug ImportError: cannot import name 'UNICODE_EMOJI' from 'emoji'
To Reproduce Steps to reproduce the behavior:
- pip install emoji==2.8.0
- pip install recognizers-text-date-time==1.0.2a2
- 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'
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! 😃