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

[BUG] Activate script is failing due to python dependencies to prompt_toolkit #30981

Closed
GabrielCouturier opened this issue Dec 13, 2023 · 3 comments · Fixed by #30987
Closed
Labels
bug Something isn't working needs triage

Comments

@GabrielCouturier
Copy link
Contributor

GabrielCouturier commented Dec 13, 2023

Reproduction steps

Hello,

When running the ./script/activate.sh after cloning the repos we have the following issue :
see build example of this job https://github.com/project-chip/connectedhomeip/actions/runs/7196189624/job/19600480143

Checking the environment:

Traceback (most recent call last):
File "/__w/connectedhomeip/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_cli/plugins.py", line 96, in from_name
module = importlib.import_module(module_name)
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 855, in exec_module
File "", line 228, in _call_with_frames_removed
File "/__w/connectedhomeip/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_watch/watch.py", line 88, in
import pw_console.python_logging
File "/__w/connectedhomeip/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_console/init.py", line 16, in
from pw_console.embed import PwConsoleEmbed
File "/__w/connectedhomeip/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_console/embed.py", line 23, in
from pw_console.console_app import ConsoleApp
File "/__w/connectedhomeip/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/pw_console/console_app.py", line 59, in
from ptpython.layout import CompletionVisualisation # type: ignore
File "/__w/connectedhomeip/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/ptpython/init.py", line 3, in
from .repl import embed
File "/__w/connectedhomeip/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/ptpython/repl.py", line 23, in
from prompt_toolkit.formatted_text import OneStyleAndTextTuple
ImportError: cannot import name 'OneStyleAndTextTuple' from 'prompt_toolkit.formatted_text' (/__w/connectedhomeip/connectedhomeip/.environment/pigweed-venv/lib/python3.9/site-packages/prompt_toolkit/formatted_text/init.py)

It seems to be linked to :
https://github.com/project-chip/connectedhomeip/blob/master/examples/common/pigweed/rpc_console/py/setup.cfg
Where the prompt_toolkit version is not fixed.

The prompt_toolkit has been updated this morning :
https://pypi.org/project/prompt-toolkit/#history

Bug prevalence

always

GitHub hash of the SDK that was being used

a9ad2c4

Platform

All

Platform Version(s)

No response

Anything else?

@caipiblack
Copy link
Contributor

Is it possible to fix it for the tag v1.2.0.1 ? Or create a new tag ?

@agners
Copy link
Contributor

agners commented Dec 20, 2023

So it seems something changed in Pigweed which made this suddenly fail? Is it maybe possible to pin to a stable Pigweed version? 🤔

@andy31415
Copy link
Contributor

So it seems something changed in Pigweed which made this suddenly fail? Is it maybe possible to pin to a stable Pigweed version? 🤔

We are pinning pigweed in submodules - I am not sure about the actual root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants