We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I encountered a compatibility issue while trying to use mplib 0.2.1 with Python 3.9.19. The following error occurs during the import:
TypeError: unsupported operand type(s) for |: 'type' and 'type'
Error Traceback:
Traceback (most recent call last): File ~/anaconda3/envs/py39/lib/python3.9/site-packages/mplib/__init__.py:3 from .planner import Planner File ~/anaconda3/envs/py39/lib/python3.9/site-packages/mplib/planner.py:16 from .urdf_utils import generate_srdf, replace_urdf_package_keyword File ~/anaconda3/envs/py39/lib/python3.9/site-packages/mplib/urdf_utils.py:136 urdf_path: str | Path, TypeError: unsupported operand type(s) for |: 'type' and 'type'
The library should be compatible with Python 3.9 and should not raise a TypeError when importing.
To ensure compatibility with Python 3.9 and earlier versions, I suggest modifying the type hint in urdf_utils.py:
from typing import Union
urdf_path: str | Path
urdf_path: Union[str, Path]
This change should resolve the issue and allow the library to work correctly in Python 3.9.
Thank you!
The text was updated successfully, but these errors were encountered:
Yes that's a good point! We will fix it : )
Sorry, something went wrong.
it should be fixed in the nightly build. accidentally pushed main sorry @KolinGuo lol
main
No branches or pull requests
Description:
I encountered a compatibility issue while trying to use mplib 0.2.1 with Python 3.9.19. The following error occurs during the import:
TypeError: unsupported operand type(s) for |: 'type' and 'type'
Error Traceback:
Expected Behavior:
The library should be compatible with Python 3.9 and should not raise a TypeError when importing.
Proposed Solution:
To ensure compatibility with Python 3.9 and earlier versions, I suggest modifying the type hint in urdf_utils.py:
from typing import Union
Change this line:
urdf_path: str | Path
To:
urdf_path: Union[str, Path]
This change should resolve the issue and allow the library to work correctly in Python 3.9.
Environment:
Thank you!
The text was updated successfully, but these errors were encountered: