Musicbot: Can not longer start the docker version

Created on 20 Apr 2019  路  5Comments  路  Source: Just-Some-Bots/MusicBot

Please tick all applicable boxes.

  • [ ] I am using Python 3.5.3 or higher (run python --version on the command line) <-- Not sure
  • [x ] I have followed the official guides to install the bot for my system
  • [ ] I have updated my dependencies to the latest version using the appropriate update script

Which version are you using?

  • [x ] The latest master version (1.9.8_4) Docker
  • [ ] The latest review version

What type of issue are you creating?

  • [x ] Bug
  • [ ] Feature request
  • [ ] Question

Description of issue

Since yesterday the docker version does not start

Steps to reproduce

  1. Launch the docker instance from the master tag. This will result in the following error:

Log file

[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
resolved bug

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

All 5 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noirscape picture noirscape  路  6Comments

FireFrostLike picture FireFrostLike  路  4Comments

Player808 picture Player808  路  4Comments

TylerTCBB picture TylerTCBB  路  3Comments

Dani064g picture Dani064g  路  6Comments