matthew-brett / transforms3d

3 dimensional spatial transformations
http://matthew-brett.github.io/transforms3d/
Other
467 stars 83 forks source link

transforms3d: object has no attribute 'euler’ #13

Closed genemiller closed 8 years ago

genemiller commented 8 years ago

Attached file shows failure case transforms3d.euler.txt :

  1. Install transforms3d (0.3)
  2. Launch python 2.7.11
  3. Import transforms3d
  4. transforms3d.euler.quat2euler fails with “object has no attribute 'euler’”
  5. dir(transforms3d) does not appear to contain ‘euler’ !!
  6. Yet help(transforms3d) says it contains ’euler’
genemiller commented 8 years ago

Thanks for super fast response!!! Will reinstall and try again.

matthew-brett commented 8 years ago

This is because the transforms3d top-level init does not import all its submodules automatically. I added imports for this - can you confirm that the current code fixes your issue?

genemiller commented 8 years ago

Hi mattthew- I am using "pip install" which is probably getting it from https://pypi.python.org/pypi/transforms3d. But this does not seem to contain the fix. I assume I should install from this repository in github. Right?

matthew-brett commented 8 years ago

Yes, right. Try: pip install git+https://github.com/matthew-brett/transforms3d

genemiller commented 8 years ago

Yes. It worked.

angles = transforms3d.euler.quat2euler([0.99810947, 0.06146124, 0, 0]) angles (0.12300000158143692, -0.0, 0.0) Thanks so much!!

yw5aj commented 7 years ago

Hi Matthew,

Thank you for the fix, as well as enhancing this great tool! As of today (6/9/2017) the pypi version still cannot do the following:

In [1]: import transforms3d

In [2]: transforms3d.euler
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-1d30ad26a4a3> in <module>()
----> 1 transforms3d.euler

AttributeError: module 'transforms3d' has no attribute 'euler'

Would you mind updating the pypi version when you get a chance, if possible?

Thanks :)

matthew-brett commented 7 years ago

Sure - I have made a new release - does it work for you now?

mnauf commented 2 years ago

hello @matthew-brett, I am getting the following for doing pip install git+https://github.com/matthew-brett/transforms3d:

Cloning https://github.com/matthew-brett/transforms3d to c:\users\mnauf\appdata\local\temp\pip-req-build-lwlthp
  Running command git clone -q https://github.com/matthew-brett/transforms3d 'c:\users\mnauf\appdata\local\temp\pip-req-build-lwlthp'
    ERROR: Command errored out with exit status 1:
         cwd: c:\users\mnauf\appdata\local\temp\pip-req-build-lwlthp\
    Complete output (8 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\mnauf\appdata\local\temp\pip-req-build-lwlthp\setup.py", line 8, in <module>
        import versioneer
      File "versioneer.py", line 370
        LONG_VERSION_PY: Dict[str, str] = {}
                       ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
matthew-brett commented 2 years ago

@mnauf - yes - I'm sorry - I accidentally broke Python 2.7 compatibility - because Versioneer, that we use, hasn't had Python 2.7 compatibility for a while. Is there any chance you can update to Python 3?

mnauf commented 2 years ago

@matthew-brett I am not sure if I can. Can you please give me commit till when it worked? I will try to install this by checking out in history

mnauf commented 2 years ago

Thanks I did it! git checkout ccec1878a13a786f7ca3d465a81eb6b865f0ddd6 and then pip install -e [PATH OF LOCAL PACKAGE]

matthew-brett commented 2 years ago

I guess you could also usepip install git+https://github.com/matthew-brett/transforms3d@bb2c0a9, or even pip install transforms3d==0.3.1

mnauf commented 2 years ago

I see! Thanks. Really appreciate it