Tutor dev launch failed with Python 3.12.12

I am doing fresh install of tutor openedx on my WSL Ubuntu.

tutor dev launch

got crashed with python error while start Building image openedx-dev:20.0.1

System:

Python 3.12.12

tutor, version 20.0.1

Docker Desktop 4.46.0 (204649)

few last lines from logs:

File “/home/waqar/openedx/env/lib/python3.12/site-packages/tutor/utils.py”, line 217, in execute

click.echo(fmt.command(shlex.join(command)))

                    ^^^^^^^^^^^^^^^^^^^

File “/home/waqar/.pyenv/versions/3.12.12/lib/python3.12/shlex.py”, line 318, in

join

return ’ '.join(quote(arg) for arg in

            split_command)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File “/home/waqar/.pyenv/versions/3.12.12/lib/python3.12/shlex.py”, line 318, in

return ’ '.join(quote(arg) for arg in split_command)

            ^^^^^^^^^^^^^^^^^^^^^

File “/home/waqar/.pyenv/versions/3.12.12/lib/python3.12/shlex.py”, line 327, in quote

if \_find_unsafe(s) is None:

^^^^^^^^^^^^^^^          

TypeError: expected string or bytes-like object, got ‘Sentinel’

There is a bug from latest version of click.
Here is an issue for the same and also a temporary solution too:

thanks for the reply. I will check it out.

The issue occurs because Tutor isn’t compatible with click v8.3.0, which changed how optional parameters are handled and causes a TypeError during tutor dev launch.
Temporary fix: downgrade click by running pip install click==8.1.8.

1 Like