Recognizers-Text icon indicating copy to clipboard operation
Recognizers-Text copied to clipboard

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

Open chansonzhang opened this issue 2 years ago • 1 comments

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'

chansonzhang avatar Oct 26 '23 01:10 chansonzhang

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! 😃

aymenkrifa avatar Dec 01 '23 10:12 aymenkrifa