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

Broken Install #384

Open
kingjin94 opened this issue Jun 19, 2023 · 2 comments · May be fixed by #385
Open

Broken Install #384

kingjin94 opened this issue Jun 19, 2023 · 2 comments · May be fixed by #385

Comments

@kingjin94
Copy link

Describe the bug
One of the dependencies (colored) seems to have changed and breaks the import of parts of the toolbox (e.g. from roboticstoolbox import mstraj on pythono >= 3.9)

Version information

Installed with PyPI

$ pip list

Package                Version
---------------------- -------
ansitable              0.9.7
colored                1.5.0
contourpy              1.1.0
cycler                 0.11.0
fonttools              4.40.0
kiwisolver             1.4.4
matplotlib             3.7.1
numpy                  1.25.0
packaging              23.1
pgraph-python          0.6.2
Pillow                 9.5.0
pip                    22.3.1
progress               1.6
pyparsing              3.1.0
python-dateutil        2.8.2
roboticstoolbox-python 1.1.0
rtb-data               1.0.1
scipy                  1.10.1
setuptools             65.5.0
six                    1.16.0
spatialgeometry        1.1.0
spatialmath-python     1.1.8
swift-sim              1.1.0
typing_extensions      4.6.3
websockets             11.0.3
wheel                  0.38.4

To Reproduce

docker run -ti python:3.10 bash
pip install roboticstoolbox-python
python
from roboticstoolbox import mstraj

Results in:

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.10/site-packages/roboticstoolbox/init.py", line 5, in
from roboticstoolbox.mobile import *
File "/usr/local/lib/python3.10/site-packages/roboticstoolbox/mobile/init.py", line 6, in
from roboticstoolbox.mobile.PlannerBase import PlannerBase
File "/usr/local/lib/python3.10/site-packages/roboticstoolbox/mobile/PlannerBase.py", line 24, in
from colored import fg, attr
ImportError: cannot import name 'fg' from 'colored' (/usr/local/lib/python3.10/site-packages/colored/init.py)

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):
Linux (standard python docker image) with:

$ cat /etc/os-release 

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
@kingjin94
Copy link
Author

Hotfix could be to downgrade dependency: pip install -U "colored<1.5"

@sdiebolt
Copy link

This is a problem of colored: they introduced breaking API changes in 1.5.0 and renamed functions fg to fore and attr to style.

@sdiebolt sdiebolt linked a pull request Jun 19, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants