Waterboy1602 / Addarr

Telegram Bot for adding series/movies to Sonarr/Radarr or for changing the download speed of Transmission/Sabnzbd
MIT License
236 stars 58 forks source link

Docker not starting #141

Closed pedropalencia closed 1 year ago

pedropalencia commented 1 year ago

Since the latest docker image, pushed 2 days ago on the 24th of September, the container doesn't start. I can see the following error: Traceback (most recent call last): File "/app/src/addarr.py", line 6, in <module> from telegram import InlineKeyboardButton, InlineKeyboardMarkup, Update, ParseMode ImportError: cannot import name 'ParseMode' from 'telegram' (/usr/local/lib/python3.11/site-packages/telegram/__init__.py)

Do you know what could be the problem here?

Thanks in advance!

Waterboy1602 commented 1 year ago

I see that there were a lot of breaking changes in the latest version of Python Telegram Bot. I'll need to make some changes in the code to let it work with the latest version

pedropalencia commented 1 year ago

Thank you! Maybe useful for others in the same situation. It is still possible to access the previous docker image: waterboy1602/addarr@sha256:7b8e178ec9c3a69f3799963f35a65c6ee06c97339110da3551bdbf7280bfc27b

Waterboy1602 commented 1 year ago

I've released a new version of Addarr (V0.7). With this release I hope that all the breaking changes that brought V20 of the Python Telegram Bot with it, are fixed.

Let me know, if it still isn't working. Hereby I'll also close this issue.

ANS-spb commented 1 year ago

The other error causes with new release:

AttributeError: module 'logging' has no attribute 'handlers'. Did you mean: '_handlers'?
Traceback (most recent call last):
  File "/app/src/addarr.py", line 19, in <module>
    import delete as delete
  File "/app/src/delete.py", line 11, in <module>
    from addarr import getService, clearUserData, stop
  File "/app/src/addarr.py", line 29, in <module>
    logger = logger.getLogger("addarr", logLevel, config.get("logToConsole", False))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/logger.py", line 19, in getLogger
    fileHandler = logging.handlers.TimedRotatingFileHandler(
                  ^^^^^^^^^^^^^^^^
Waterboy1602 commented 1 year ago

There were some problems with the latest Python version (3.11.5) that I didn't notice. I've made some changes to the code and think that these now are resolved.

Could you try it on your machine? The latest Docker image already contains the bugfixes.

ANS-spb commented 1 year ago

It works, thank you very much!