bdaiinstitute / spatialmath-python

Create, manipulate and convert representations of position and orientation in 2D or 3D using Python
MIT License
519 stars 84 forks source link

AttributeError: module 'spatialmath' has no attribute 'base' #66

Closed fatemeh-mohseni-AI closed 1 year ago

fatemeh-mohseni-AI commented 1 year ago

the issue comes from this line

import spatialmath.base as smb

in the file :

spatialmath-python/spatialmath/base/transforms2d.py", line 20 .

this line gives the following error :

import spatialmath.base as smb AttributeError: module 'spatialmath' has no attribute 'base'

the solution is to change import model from above to below :

:+1: from spatialmath import base as smb

petercorke commented 1 year ago

this is odd. that code runs on Python 3.7 to 3.11 on Mac/Win/Linux. what are you running it on?

fatemeh-mohseni-AI commented 1 year ago

pyhton 3.8 . ubuntu 22

petercorke commented 1 year ago

I have no idea what is going on. The existing version works find for me, and as I mentioned it passes unit tests on lots of python/os combos including the one you are running. If more folk flag this I'll make changes, but for now I'm closing this.