I'm new to Python and I've played around with multiple Python Telegram RSS scripts, this one I believe is the best in the world if it can actually work.
I've confirmed communications with the Telegram Channel I've created using another Python script to send messages to it.
When I run bot.py I'm getting the following error on any action from /help, /list /add feed, etc.
2022-03-16 22:18:06,653 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 442, in process_update
handler.handle_update(update, self, check, context)
File "/usr/local/lib/python3.6/site-packages/telegram/ext/handler.py", line 160, in handle_update
return self.callback(update, context)
File "bot.py", line 68, in text
text_received = update.message.text
AttributeError: 'NoneType' object has no attribute 'text'
2022-03-16 22:18:06,657 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 442, in process_update
handler.handle_update(update, self, check, context)
File "/usr/local/lib/python3.6/site-packages/telegram/ext/handler.py", line 160, in handle_update
return self.callback(update, context)
File "bot.py", line 68, in text
text_received = update.message.text
AttributeError: 'NoneType' object has no attribute 'text'
Steps:
- Git cloned script.
- Ran install for requirements.
- Created SQLite DB named reader.db
- Executed SQL statement to create the table
- created .env and fill in all the variables.
- Gave all py files execution permisisons.
- Ran bot.py
- Recieved the following output:
- 2022-03-16 22:04:27,410 - apscheduler.scheduler - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts
2022-03-16 22:04:27,418 - apscheduler.scheduler - INFO - Added job "fetch_feeds" to job store "default"
2022-03-16 22:04:27,418 - apscheduler.scheduler - INFO - Scheduler started
- When typing any command into Telegram Channel, the errors are produced in the logs.
- Adding a feed does not update the database, and throws the above error.
System
Rocky Linux 8.5
Python 3.6.8
Installed Modules:
[root@localhost telegram-rss-reader]# pip3 list
Package Version
appdirs 1.4.4
APScheduler 3.6.3
asgiref 3.4.1
async-lru 1.0.2
attrs 20.3.0
backports.zoneinfo 0.2.1
beautifulsoup4 4.9.3
bleach 3.3.0
cachetools 4.2.2
certifi 2020.12.5
chardet 3.0.4
click 7.1.2
configobj 5.0.6
cssselect 0.9.2
dbus-python 1.2.4
decorator 4.2.1
distlib 0.3.1
dj-database-url 0.5.0
Django 3.2.12
feedparser 6.0.2
filelock 3.0.12
gpg 1.13.1
html5lib 0.999999999
idna 2.5
importlib-metadata 3.7.0
importlib-resources 5.1.1
isc 2.0
Jinja2 2.11.3
lazy-object-proxy 1.5.2
libcomps 0.1.16
lxml 4.2.3
MarkupSafe 1.1.1
nftables 0.1
packaging 20.9
perf 0.1
pexpect 4.3.1
pip 21.3.1
pipenv 2022.1.8
platformdirs 2.4.0
ply 3.9
psutil 5.4.3
psycopg 3.0.10
psycopg2-binary 2.9.3
ptyprocess 0.5.2
pyaes 1.6.1
pyasn1 0.4.8
pycairo 1.16.3
pydbus 0.6.0
PyGObject 3.28.3
pyparsing 2.4.7
Pyrogram 1.0.1
PySocks 1.7.1
python-dateutil 2.8.1
python-dotenv 0.19.2
python-linux-procfs 0.6.3
python-telegram-bot 13.3
pytz 2021.1
pytz-deprecation-shim 0.1.0.post0
pyudev 0.21.0
PyYAML 3.12
regex 2020.11.13
requests 2.20.0
rpm 4.14.3
rsa 4.8
savepagenow 1.1.1
selinux 2.9
sepolicy 1.1
setools 4.3.0
setroubleshoot 1.1
setuptools 59.6.0
sgmllib3k 1.0.0
six 1.15.0
slip 0.6.4
slip.dbus 0.6.4
sos 4.1
soupsieve 2.2
SQLAlchemy 1.3.23
sqlparse 0.4.2
SSSDConfig 2.5.2
syspurpose 1.28.21
systemd-python 234
telebot 0.0.4
telegram-rss 0.8.1
Telethon 1.24.0
toml 0.10.2
tornado 6.1
typed-ast 1.4.2
typing_extensions 4.1.1
tzdata 2021.5
tzlocal 2.1
urllib3 1.24.2
virtualenv 20.4.2
virtualenv-clone 0.5.7
wcwidth 0.2.5
webencodings 0.5.1
wrapt 1.12.1
zipp 3.4.0
If you can provide a fix, I'll toss you a few dollars over PayPal.