Closed marcopaganini closed 4 years ago
Hi,
Here is some ideas:
Are you sure that the installed python-telegram-bot library is last stable version (the one in requirements file), 11.1.0?
pip3 freeze | grep -e "python-telegram-bot"
python3 -c "import telegram; print(telegram.__version__)"
Are you sure that you have installed the requeriments into python 3.7? May your pip3 point to another remaining python3 version (i.e. 3.4)?
pip3 -V
Is "MessageEntity" imported in Telegram lib init file?
cat -n /usr/local/lib/python3.7/dist-packages/telegram/__init__.py | grep -e "MessageEntity"
You have tried a basic import test of python-telegram-bot library without joincaptchabot, have you try importing that submodule and importing full telegram module?
python3 -c "from telegram import MessageEntity"
python3 -c "import telegram; print(telegram.MessageEntity)"
So, I ended up making it work by removing the "telegram" library completely. Everything seems to be working fine now. Why do we need both telegram and python_telegram_bot libraries? Note that in my case, /usr/local/lib/python3.7/dist-packages/telegram/__init__.py
was just a placeholder with a "not implemented" print in the init class.
BTW, if you're interested, I can submit a PR with the Dockerfile and the instructions to create a container, plus some other project contributions.
Nice to hear that it is working.
Not sure why there is two telegram libraries in requirements file, maybe I have install "telegram" for some reason time ago, and won't notice that it is not part of python-telegram-bot library when generate requirements file. I have test installation and bot usage without it and it is working, so I'm going to remove "telegram==0.0.1" line from requirements file.
Any contibution will be appreciated, maybe you can add Docker container usage in a new README file section or create a new "docs" directory with that info and point to the file in the readme file. And maybe take a look if there is a good way to set Bot token without manual entering the container...
Hello,
I'm trying to create a Docker for TLG_JoinCaptchaBot. I've followed all instructions on the README.md (with the change of changing libjpeg8 to libjpeg62-turbo, as libjpeg8 is not available on Debian). I've installed the requirements with pip3 (Debian's python3 version of pip). When I try to run the bot, I get:
Running python3 by hand and attempting to import the library above gives me the same result, as expected.
The curious thing is that I don't see this module under the "telegram" library. Any ideas?