PiBrewing/craftbeerpi4

cannot import name 'ParamSpec'

Btazbt opened this issue · 3 comments

After a new Bullseye image and install of cbpi4 I get the following error on startup

Traceback (most recent call last):
File "/usr/local/bin/cbpi", line 5, in
from cbpi.cli import main
File "/usr/local/lib/python3.9/dist-packages/cbpi/cli.py", line 6, in
from cbpi.craftbeerpi import CraftBeerPi
File "/usr/local/lib/python3.9/dist-packages/cbpi/craftbeerpi.py", line 38, in
from cbpi.controller.satellite_controller import SatelliteController
File "/usr/local/lib/python3.9/dist-packages/cbpi/controller/satellite_controller.py", line 5, in
from asyncio_mqtt import Client, MqttError, Will, client
File "/usr/local/lib/python3.9/dist-packages/asyncio_mqtt/init.py", line 2, in
from .client import Client, ProtocolVersion, TLSParameters, Will
File "/usr/local/lib/python3.9/dist-packages/asyncio_mqtt/client.py", line 35, in
from typing_extensions import ParamSpec
ImportError: cannot import name 'ParamSpec' from 'typing_extensions' (/usr/lib/python3/dist-packages/typing_extensions.py)

I found online a suggestion to try the following and it seems to have worked. I'm not sure the first line was necessary and I got an interesting warning.

sudo pip install -U pip
supo pip install typing-extensions==4.3.0

:: sudo pip install typing-extensions==4.3.0
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting typing-extensions==4.3.0
Downloading https://www.piwheels.org/simple/typing-extensions/typing_extension s-4.3.0-py3-none-any.whl (25 kB)
Installing collected packages: typing-extensions
Attempting uninstall: typing-extensions
Found existing installation: typing-extensions 3.7.4.3
Not uninstallng typing-extensions at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'typing-extensions'. No files were found to uninstall.
Successfully installed typing-extensions-4.3.0

Can confirm and need to look into it:

sudo pip install typing-extensions -U

will also help

should be fixed: f38697d