instapy-docs icon indicating copy to clipboard operation
instapy-docs copied to clipboard

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

Open codeclinic opened this issue 3 years ago • 7 comments

If I run python3 quickstart.py InstaPy fails to run and returns the following trace: (Debian Bullseye on Rpi4)

Traceback (most recent call last):
  File "/home/ha-server-pi/.local/lib/python3.9/site-packages/instapy/InstaPyScripts/quickstart.py", line 2, in <module>
    from instapy import InstaPy
  File "/home/ha-server-pi/.local/lib/python3.9/site-packages/instapy/__init__.py", line 6, in <module>
    from .instapy import InstaPy
  File "/home/ha-server-pi/.local/lib/python3.9/site-packages/instapy/instapy.py", line 34, in <module>
    from .browser import close_browser, set_selenium_local_session
  File "/home/ha-server-pi/.local/lib/python3.9/site-packages/instapy/browser.py", line 14, in <module>
    from .util import interruption_handler
  File "/home/ha-server-pi/.local/lib/python3.9/site-packages/instapy/util.py", line 27, in <module>
    from emoji.unicode_codes import UNICODE_EMOJI
ImportError: cannot import name 'UNICODE_EMOJI' from 'emoji.unicode_codes' (/home/ha-server-pi/.local/lib/python3.9/site-packages/emoji/unicode_codes/__init__.py)

If I pip3 install emoji it says that "Requirement already satisfied: emoji in /home/ha-server-pi/.local/lib/python3.9/site-packages (2.0.0)"

codeclinic avatar Jul 17 '22 10:07 codeclinic

#from emoji import UNICODE_EMOJI import emoji

in isntapy/util.py

sqoshi avatar Jul 23 '22 11:07 sqoshi

t ofix

sqoshi avatar Jul 23 '22 11:07 sqoshi

Any solution? I am still getting this issue

sachhu avatar May 06 '23 20:05 sachhu

venv/bin/pip install "emoji<=1.7.0"

delameter avatar Jul 21 '23 03:07 delameter

btw thats not the only failing dependency, at least on python 3.10. the second one is clarifai, downgrade it too if you encounter problems:

venv/bin/pip install "clarifai<9"

this should install clarifai 2.6.2

also these:

venv/bin/pip install "instapy-chromedriver==2.36.post0"
venv/bin/pip install "selenium<=4.9"

delameter avatar Jul 21 '23 03:07 delameter

here is a setup which successfully runs on my system (ubuntu 20):

requirements.txt

logging in doesn't work though, but I'll fork the project and try to do smth about it

delameter avatar Jul 21 '23 03:07 delameter

here is a setup which successfully runs on my system (ubuntu 20):

requirements.txt

logging in doesn't work though, but I'll fork the project and try to do smth about it

WARNING [2023-07-26 11:39:57] [ ] - Hide Selenium Extension: error INFO [2023-07-26 11:40:02] [ ] - Cookie file not found, creating cookie... WARNING [2023-07-26 11:40:12] [ ] Login A/B test detected! Trying another string... WARNING [2023-07-26 11:40:17] [ ] Could not pass the login A/B test. Trying last string... ERROR [2023-07-26 11:40:22] [ ] Login A/B test failed!

Everything stops at the login page. What can be done?

ai9anya avatar Jul 26 '23 15:07 ai9anya