Spatialmath import broken
See original GitHub issueTrying to import the “base” attribute of the “spatialmath” module gives me an error message.
I am trying to import it using the following statement at the beginning of a jupyter notebook:
import spatialmath.base as tr
The error message is: `--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-3-96508624d92a> in <module> ----> 1 import spatialmath.base
~/test_prep_sem_3/viewpoints_generation/automated-part-inspection/.venv/lib/python3.6/site-packages/spatialmath/init.py in <module> ----> 1 from spatialmath.pose2d import SO2, SE2 2 from spatialmath.pose3d import SO3, SE3 3 from spatialmath.baseposematrix import BasePoseMatrix 4 from spatialmath.geom2d import Line2, Polygon2 5 from spatialmath.geom3d import Line3, Plane3
~/test_prep_sem_3/viewpoints_generation/automated-part-inspection/.venv/lib/python3.6/site-packages/spatialmath/pose2d.py in <module> 24 import numpy as np 25 —> 26 from spatialmath.base import argcheck 27 from spatialmath import base as base 28 from spatialmath.baseposematrix import BasePoseMatrix
~/test_prep_sem_3/viewpoints_generation/automated-part-inspection/.venv/lib/python3.6/site-packages/spatialmath/base/init.py in <module> 6 from spatialmath.base.quaternions import * # lgtm [py/polluting-import] 7 from spatialmath.base.transforms2d import * # lgtm [py/polluting-import] ----> 8 from spatialmath.base.transforms3d import * # lgtm [py/polluting-import] 9 from spatialmath.base.transformsNd import * # lgtm [py/polluting-import] 10 from spatialmath.base.vectors import * # lgtm [py/polluting-import]
~/test_prep_sem_3/viewpoints_generation/automated-part-inspection/.venv/lib/python3.6/site-packages/spatialmath/base/transforms3d.py in <module> 22 23 from spatialmath import base as smb —> 24 import spatialmath.base.symbolic as sym 25 26 _eps = np.finfo(np.float64).eps
AttributeError: module ‘spatialmath’ has no attribute ‘base’`
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
I think the issue here is not complicated. The current master branch already contains the patch #53 that should resolve the import problem, but the current version on pypi doesn’t yet.
In my opinion, maybe publishing a new version to pypi can make users easier to use this project with Python 3.6.
sorry to have been slow here. A version of current master branch is now on PyPI.