Comments (6)
I stumbled upon this same error in Python 3.8 when I accidentally installed the python-telegram-bot
alongside the telegram
-package. Uninstalling both and reinstallong only the required one did the trick.
from telegram-stats-bot.
I stumbled upon this same error in Python 3.8 when I accidentally installed the
python-telegram-bot
alongside thetelegram
-package. Uninstalling both and reinstallong only the required one did the trick.
This really solved the problem for me, we only need the package python-telegram-bot
from telegram-stats-bot.
Interesting, there may have been a change in python-telegram-bot or something, though if you used poetry, it should use the poetry.lock file to use the specific versions. When I get a chance I will take a peek and see if I can reproduce it, though if you could give me the full traceback and what OS you're using, that might be helpful. As a quick stop-gap to get you back up and running, you might want to try the Docker version. If you use the 0.6.3
tag from my repository, that version was definitely working and should not have had any packages updated.
from telegram-stats-bot.
thanks! alright the bot is running again via docker ... i totally forgot that there is a docker image.
My Homeserver runs latest and fully updated Debian. As i said before i tested under Python 3.8 and Python 3.9.
Here is the complete Output:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/hendrik/.local/lib/python3.8/site-packages/telegram_stats_bot/main.py", line 31, in
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackContext, JobQueue
File "/home/hendrik/.local/lib/python3.8/site-packages/telegram/ext/init.py", line 21, in
from .dispatcher import Dispatcher, DispatcherHandlerStop, run_async
File "/home/hendrik/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 33, in
from telegram import TelegramError
ImportError: cannot import name 'TelegramError' from 'telegram' (/home/hendrik/.local/lib/python3.8/site-packages/telegram/init.py)
from telegram-stats-bot.
I have not been able to reproduce this on either Ubuntu or Windows with any Python version between 3.8 and 3.10, installing with either pip or Poetry, so I'm not sure what happened. Just in case, I have updated the python-telegram-bot requirement to the latest, in case some old version of it in your environment was causing the problem, and updated the poetry lock file to the latest compatible version of everything, in v0.6.4.
from telegram-stats-bot.
I stumbled upon this same error in Python 3.8 when I accidentally installed the
python-telegram-bot
alongside thetelegram
-package. Uninstalling both and reinstallong only the required one did the trick.
Ah, this makes sense. The telegram
package seems to be some other defunct project with packages still on pypi and they share the same import names. I don't think there is any reason to use this package for anything, but I guess if you do, then it should be isolated from telegram-stats-bot by using a different venv/conda environment/etc.
from telegram-stats-bot.
Related Issues (19)
- Importing historical stats HOT 4
- Are you planning to update it to work in the newly implemented "topics" feature? HOT 3
- I GET THIS ERROR WHILE CREATING A TELEGRAM BOT. SOMEONE PLEASE HELP ME 😭 HOT 1
- Titles plot fails for some image dimensions
- import script causes db issues HOT 4
- json import: Pandas error HOT 1
- json import: ignore bot messages
- Not working when connecting to my cloud db
- /stats user doesnt work no more HOT 3
- shorten usernames in /stats view (or display the displayname instead)? HOT 1
- Question: how can i use this for multiple chats? HOT 4
- [IMPROVEMENT] Use short, not parameterized, commands to be able to setup BotFather bot commands shortcuts HOT 1
- Usernames issue (not updating on import causing duplicated userID entries) HOT 4
- 2 bugs HOT 5
- Can it get messages from past? HOT 3
- Make tests for db insertions/updates
- Somehow some words are changed in /stats words HOT 2
- Why is this program that enjoyable? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram-stats-bot.