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

import error #8

Open
zimler opened this issue Jun 13, 2018 · 3 comments
Open

import error #8

zimler opened this issue Jun 13, 2018 · 3 comments

Comments

@zimler
Copy link

zimler commented Jun 13, 2018

I'm trying to use your bot and am getting the following error: Traceback (most recent call last):
File "bot.py", line 8, in
from telegram import Emoji, ParseMode, TelegramError, Update
ImportError: cannot import name 'Emoji'

I did a pip install of python-telegram-bot. Any thoughts?

@allbinmani
Copy link

allbinmani commented Jul 10, 2018

I am having the same problem..

  • Created virtualenv for python3.6 with virtualenv -p `which python3.6`
  • Activated virtualenv with . ./bin/activate
  • Ran pip install telegram
  • ./bin/python bot.py gives
  File "bot.py", line 8, in <module>
    from telegram import Emoji, ParseMode, TelegramError, Update
ImportError: cannot import name 'Emoji'```

@allbinmani
Copy link

Solution found!
It seems the Emoji support was deprecated in python-telegram-bot V5.1, so in order to make it work you have to install V5.0 using
pip install python-telegram-bot==5.0

@zimler
Copy link
Author

zimler commented Jul 10, 2018

Well, how about that. Good detective work. I'll try that later this week and report back. Depreciated on purpose? But why...

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