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

Where did I go wrong? #10

Open
xhackermanx opened this issue Jan 9, 2023 · 2 comments
Open

Where did I go wrong? #10

xhackermanx opened this issue Jan 9, 2023 · 2 comments

Comments

@xhackermanx
Copy link

xhackermanx commented Jan 9, 2023

Попробовал и под win и под Ubuntu 20.04.5

docker-compose create --force-recreate --build app && docker-compose run app python ./src/monitor.py auth

WARNING: The create command is deprecated. Use the up command with the --no-start flag instead.
Building app
Step 1/6 : FROM python:3-alpine
---> 426bd32e71b2
Step 2/6 : WORKDIR /usr/src/app
---> Using cache
---> 5771f4159a1c
Step 3/6 : COPY requirements.txt ./
---> Using cache
---> bf553143d65a
Step 4/6 : RUN pip install --no-cache-dir -r requirements.txt
---> Using cache
---> 78dac69834f7
Step 5/6 : COPY . .
---> 44be1b9dd737
Step 6/6 : CMD [ "python", "./monitor.py" ]
---> Running in 7324020cc08e
Removing intermediate container 7324020cc08e
---> 1b9d15bab2b7
Successfully built 1b9d15bab2b7
Successfully tagged tg-notify-deleted-messages-100_app:latest
Creating tg-notify-deleted-messages-100_app_1 ... done
Traceback (most recent call last):
File "/usr/src/app/./src/monitor.py", line 49, in
with TelegramClient('db/user', os.getenv("TELEGRAM_API_ID"), os.getenv("TELEGRAM_API_HASH")) as client:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/telethon/client/telegrambaseclient.py", line 337, in init
self._sender = MTProtoSender(
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/telethon/network/mtprotosender.py", line 58, in init
self._connect_lock = asyncio.Lock(loop=loop)
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Lock.init() got an unexpected keyword argument 'loop'

@camalouu
Copy link

camalouu commented Nov 6, 2023

I have the same problem.

@JonasSchatz
Copy link

The loop parameter in many asyncio functions has been deprecated and was scheduled to be removed in Python 3.10. The dockerfile however uses the latest version of Python 3. You might want to edit the first line to FROM python:3.9.16-alpine3.17 or use the fork @henry701 created at https://github.com/henry701/tg-notify-deleted-messages

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

3 participants