start-jsk / openhrp3

This package does not only wrap OpenHRP3 but actually provides the built artifact from the code from its mainstream repository. Being ROS-agnostic by itself, you can also use this via ROS together with the packages in rtmros_common that bridge between two framework.
1 stars 5 forks source link

KeyError: 'OpenHRP' with 3.1.7 #57

Closed 130s closed 9 years ago

130s commented 9 years ago
$ dpkg -p ros-hydro-openhrp3|grep Vers
Version: 3.1.7-1precise-20150211-1248-+0000

$ dpkg -p ros-indigo-openhrp3 |grep Ver
Version: 3.1.7-13trusty-20150210-1856-+0000
$ ipython
:
In [1]: from OpenHRP3
OpenHRP3

In [1]: from OpenHRP3 import *
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/mnt/hgfs/Dropbox_host/ROS/hydro_precise/cws_hiro_nxo/src/tork-a/rtmros_nextage/<ipython-input-1-b93eb2b16f2b> in <module>()
----> 1 from OpenHRP3 import *

/opt/ros/hydro/lib/python2.7/dist-packages/OpenHRP3/__init__.py in <module>()
     16 import ViewSimulator_idl
     17 import OnlineViewer_idl
---> 18 import ClockGenerator_idl
     19 
     20 # ** 2. Sub-modules

/opt/ros/hydro/lib/python2.7/dist-packages/OpenHRP3/ClockGenerator_idl.py in <module>()
      8 
      9 # #include "SDOPackage.idl"

---> 10 import SDOPackage_idl
     11 _0_SDOPackage = omniORB.openModule("SDOPackage")
     12 _0_SDOPackage__POA = omniORB.openModule("SDOPackage__POA")

ImportError: No module named SDOPackage_idl

In [4]: import OpenHRP3
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/mnt/hgfs/Dropbox_host/ROS/hydro_precise/cws_hiro_nxo/src/tork-a/rtmros_nextage/<ipython-input-4-988e21ac8f3c> in <module>()
----> 1 import OpenHRP3

/opt/ros/hydro/lib/python2.7/dist-packages/OpenHRP3/__init__.py in <module>()
      4 
      5 import omniORB
----> 6 omniORB.updateModule("OpenHRP")
      7 
      8 # ** 1. Stub files contributing to this module

/usr/lib/python2.7/dist-packages/omniORB/__init__.pyc in updateModule(mname)
    618     if _partialModules.has_key(mname):
    619         pmod = _partialModules[mname]
--> 620         mod  = sys.modules[mname]
    621         mod.__dict__.update(pmod.__dict__)
    622         del _partialModules[mname]

KeyError: 'OpenHRP'
k-okada commented 9 years ago

move to https://github.com/fkanehiro/openhrp3/issues/42, since these dep is now directly released from upstream package

k-okada commented 9 years ago

please check again if 315.1.7-2 is out (http://jenkins.ros.org/job/ros-hydro-openhrp3_binarydeb_precise_amd64/ )

130s commented 9 years ago

(Previously I included wrong output. Re-posting).

Thank you, I see it's fixed with Indigo.

$ env|grep ROS
ROS_ROOT=/opt/ros/indigo/share/ros
ROS_PACKAGE_PATH=/opt/ros/indigo/share:/opt/ros/indigo/stacks
ROS_MASTER_URI=http://localhost:11311
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=indigo
ROS_ETC_DIR=/opt/ros/indigo/etc/ros
$ env|grep PYTHONP
PYTHONPATH=/opt/ros/indigo/lib/python2.7/dist-packages
$ dpkg -p ros-indigo-openhrp3 | grep Ver
Version: 3.1.7-14trusty-20150212-0910-+0000
$ ipython
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import OpenHRP
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-daf0ea35e427> in <module>()
----> 1 import OpenHRP

ImportError: No module named OpenHRP

In [2]: import OpenHRP3

In [3]: from OpenHRP3 import *

In [4]: 
Do you really want to exit ([y]/n)? 
130s commented 9 years ago

I don't know what I was reporting, but the issue is not resolved yet in the log above. And I still see the same issue with the latest DEB.

$ dpkg -p ros-indigo-openhrp3 |grep Ver
Version: 3.1.7-14trusty-20150212-0910-+0000

$ ipython
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import OpenHRP
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-daf0ea35e427> in <module>()
----> 1 import OpenHRP

ImportError: No module named OpenHRP

In [2]: import OpenRTM_aist.RTM_IDL

In [3]: import OpenHRP
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-daf0ea35e427> in <module>()
----> 1 import OpenHRP

ImportError: No module named OpenHRP
k-okada commented 9 years ago

if you use 3.1.7, you have to import OpenHRP

related -> https://github.com/k-okada/rtmros_common/commit/04002f72865f7502857da18a5b26dba13d34d2ea

◉ Kei Okada

On Fri, Feb 13, 2015 at 7:51 PM, Isaac I.Y. Saito notifications@github.com wrote:

I don't know what I was reporting, but the issue is not resolved yet in the log above. And I still see the same issue with the latest DEB.

$ dpkg -p ros-indigo-openhrp3 |grep Ver Version: 3.1.7-14trusty-20150212-0910-+0000

$ ipython Python 2.7.6 (default, Mar 22 2014, 22:59:56) Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details.

In [1]: import OpenHRP

ImportError Traceback (most recent call last)

in () ----> 1 import OpenHRP ImportError: No module named OpenHRP In [2]: import OpenRTM_aist.RTM_IDL ## In [3]: import OpenHRP ImportError Traceback (most recent call last) in () ----> 1 import OpenHRP ImportError: No module named OpenHRP — Reply to this email directly or view it on GitHub https://github.com/start-jsk/openhrp3/issues/57#issuecomment-74236340.
k-okada commented 9 years ago

also check https://github.com/tork-a/hrpsys-release/blob/patches/release/indigo/hrpsys/0002-fix-for-old-OpenHRP3-that-uses-OpenHRP3-as-python-mo.patch

◉ Kei Okada

On Fri, Feb 13, 2015 at 11:05 PM, Kei Okada k-okada@jsk.t.u-tokyo.ac.jp wrote:

if you use 3.1.7, you have to import OpenHRP

related -> https://github.com/k-okada/rtmros_common/commit/04002f72865f7502857da18a5b26dba13d34d2ea

◉ Kei Okada

On Fri, Feb 13, 2015 at 7:51 PM, Isaac I.Y. Saito < notifications@github.com> wrote:

I don't know what I was reporting, but the issue is not resolved yet in the log above. And I still see the same issue with the latest DEB.

$ dpkg -p ros-indigo-openhrp3 |grep Ver Version: 3.1.7-14trusty-20150212-0910-+0000

$ ipython Python 2.7.6 (default, Mar 22 2014, 22:59:56) Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details.

In [1]: import OpenHRP

ImportError Traceback (most recent call last)

in () ----> 1 import OpenHRP ImportError: No module named OpenHRP In [2]: import OpenRTM_aist.RTM_IDL ## In [3]: import OpenHRP ImportError Traceback (most recent call last) in () ----> 1 import OpenHRP ImportError: No module named OpenHRP — Reply to this email directly or view it on GitHub https://github.com/start-jsk/openhrp3/issues/57#issuecomment-74236340.
130s commented 9 years ago

Ok https://github.com/k-okada/rtmros_common/commit/04002f72865f7502857da18a5b26dba13d34d2ea worked.

$ ipython
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 

In [2]: from rtm import *
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-720d89979fcc> in <module>()
----> 1 from rtm import *

ImportError: No module named rtm

In [3]: import hrpsys

In [4]: from rtm import *

In [5]: import imp

In [6]: try:
   ...:     imp.find_module('OpenHRP')
   ...:     from OpenHRP import *
   ...: except:
   ...:     from OpenHRP3 import *

In [7]: 
Do you really want to exit ([y]/n)? 
n130s@tork-kudu1:/var$ dpkg -p ros-indigo-openhrp3 ros-indigo-openrtm-aist ros-indigo-hrpsys | grep Ver
Version: 3.1.7-15trusty-20150213-1223-+0000
Version: 1.1.0-26trusty-20150213-0852-+0000
Version: 315.2.8-6trusty-20150213-1300-+0000
130s commented 9 years ago

No, that actually didn't solve the issue. Sorry for ups and downs.

$ ipython
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 

In [1]: import hrpsys
In [2]: import rtm
In [3]: from rtm import *
In [4]: import rtm
In [5]: try:                       
        imp.find_module('OpenHRP')
        from OpenHRP import *
except:
    from OpenHRP3 import *
    print('OpenHRP not found')
   ...:     
OpenHRP not found

In [7]: import imp
In [8]: imp.find_module('OpenHRP')
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-8-25b3b4ac4097> in <module>()
----> 1 imp.find_module('OpenHRP')

ImportError: No module named OpenHRP
k-okada commented 9 years ago

sorry, i was completely confused, now I think I'm fixed for source code : https://github.com/fkanehiro/hrpsys-base/pull/486 for release deb : https://github.com/tork-a/hrpsys-release/commit/600a6d21812670d5cac325a153b966480d5b503f

and now you just call

from OpenHRP import *

◉ Kei Okada

On Sat, Feb 14, 2015 at 4:25 AM, Isaac I.Y. Saito notifications@github.com wrote:

No, that actually didn't solve the issue. Sorry for ups and downs.

$ ipython Python 2.7.6 (default, Mar 22 2014, 22:59:56)

In [1]: import hrpsys In [2]: import rtm In [3]: from rtm import In [4]: import rtm In [5]: try: imp.find_module('OpenHRP') from OpenHRP import except: from OpenHRP3 import * print('OpenHRP not found') ...: OpenHRP not found

In [7]: import imp

In [8]: imp.find_module('OpenHRP')

ImportError Traceback (most recent call last)

in () ----> 1 imp.find_module('OpenHRP') ImportError: No module named OpenHRP — Reply to this email directly or view it on GitHub https://github.com/start-jsk/openhrp3/issues/57#issuecomment-74311210.
130s commented 9 years ago

Now it seems working. I'll also re-trigger travis tests I can think of.

$ ipython
:
In [1]: import hrpsys
In [2]: import rtm
In [4]: import imp
In [5]: try:
        imp.find_module('OpenHRP')
        from OpenHRP import *
except:
    from OpenHRP3 import *
    print('OpenHRP not found')
   ...:     

In [6]: 
Do you really want to exit ([y]/n)? 
$ dpkg -p ros-indigo-openhrp3 ros-indigo-openrtm-aist ros-indigo-hrpsys ros-indigo-hrpsys-ros-bridge | grep Ver
Version: 3.1.7-15trusty-20150213-1223-+0000
Version: 1.1.0-26trusty-20150213-0852-+0000
Version: 315.2.8-7trusty-20150215-0713-+0000
Version: 1.2.7-0trusty-20150215-0753-+0000
$ dpkg -p ros-hydro-openhrp3 ros-hydro-openrtm-aist ros-hydro-hrpsys ros-hydro-hrpsys-ros-bridge | grep Vers
Version: 3.1.7-3precise-20150213-1403-+0000
Version: 1.1.0-13precise-20150213-1339-+0000
Version: 315.2.8-4precise-20150214-2312-+0000
Version: 1.2.7-0precise-20150215-0023-+0000