Please tick all applicable boxes.
python --version on the command line) <-- Not sureupdate scriptWhich version are you using?
master version (1.9.8_4) Dockerreview versionWhat type of issue are you creating?
Since yesterday the docker version does not start
[INFO] launcher: Ensuring we're in the right environment
Traceback (most recent call last):
File "run.py", line 438, in <module>
main()
File "run.py", line 345, in main
sanity_checks()
File "run.py", line 206, in sanity_checks
req_check_deps()
File "run.py", line 268, in req_check_deps
import discord
File "/usr/lib/python3.7/site-packages/discord/__init__.py", line 23, in <module>
from .client import Client
File "/usr/lib/python3.7/site-packages/discord/client.py", line 35, in <module>
import websockets
File "/usr/lib/python3.7/site-packages/websockets/__init__.py", line 3, in <module>
from .client import *
File "/usr/lib/python3.7/site-packages/websockets/client.py", line 20, in <module>
from .protocol import WebSocketCommonProtocol
File "/usr/lib/python3.7/site-packages/websockets/protocol.py", line 18, in <module>
from .compatibility import asyncio_ensure_future
File "/usr/lib/python3.7/site-packages/websockets/compatibility.py", line 15
asyncio_ensure_future = asyncio.async # Python < 3.5
^
SyntaxError: invalid syntax
Python 3.7 reserves the async keyword:
https://github.com/Rapptz/discord.py/issues/1249
Edit: I was able to work around this by specifying
FROM python:3.6-alpine
as the first line of my Dockerfile
It is also worth mentioning that dependencies (e.g. discord.py and websockets, the screenshot that is shown suggest that it is using websockets earlier than or equal to version 4.0 which have issue with Python 3.7 like @Rhynri stated where the current version of discord.py is requiring version 6.0) are not automatically upgraded with each tag release. You can append -update when starting (docker run repo/tag -update) to update dependencies.
For people using docker compose I was able to add the following to my docker-compose file which updated the dependencies correctly:
command: -update
Closing because the author's issue seems to be resolved.
If it isn't, you can reopen this issue.
I just attempted to run the Docker container with master tag and this is what I get
[INFO] launcher: Starting sanity checks
[INFO] launcher: Checking for Python 3.5+
[INFO] launcher: Checking console encoding
[INFO] launcher: Ensuring we're in the right environment
Traceback (most recent call last):
File "run.py", line 438, in <module>
main()
File "run.py", line 345, in main
sanity_checks()
File "run.py", line 206, in sanity_checks
req_check_deps()
File "run.py", line 268, in req_check_deps
import discord
File "/usr/lib/python3.8/site-packages/discord/__init__.py", line 23, in <module>
from .client import Client
File "/usr/lib/python3.8/site-packages/discord/client.py", line 35, in <module>
import websockets
File "/usr/lib/python3.8/site-packages/websockets/__init__.py", line 3, in <module>
from .client import *
File "/usr/lib/python3.8/site-packages/websockets/client.py", line 20, in <module>
from .protocol import WebSocketCommonProtocol
File "/usr/lib/python3.8/site-packages/websockets/protocol.py", line 18, in <module>
from .compatibility import asyncio_ensure_future
File "/usr/lib/python3.8/site-packages/websockets/compatibility.py", line 15
asyncio_ensure_future = asyncio.async # Python < 3.5
^
SyntaxError: invalid syntax
The container just stops after.
Most helpful comment
For people using docker compose I was able to add the following to my docker-compose file which updated the dependencies correctly:
command: -update