gbiggs / rtshell

Shell commands for managing RT-Middleware running on OpenRTM-aist.
http://openrtm.org
GNU Lesser General Public License v3.0
10 stars 17 forks source link

rtcon: 'module' object has no attribute 'any' #28

Open bchretien opened 8 years ago

bchretien commented 8 years ago

After upgrading rtctree/rtshell to 4.1.0, rtcon fails with the following error:

$ rtcon /localhost/Foo0.rtc:qOut /localhost/Bar0.rtc:qIn
rtcon: 'module' object has no attribute 'any'

Tested with Python 2.7.10 on Arch Linux.

gbiggs commented 8 years ago

Please run with -v and post the output.

bchretien commented 8 years ago
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/rtshell/rtcon.py", line 117, in main
    connect_ports(paths, options, tree=tree)
  File "/usr/lib/python2.7/site-packages/rtshell/rtcon.py", line 66, in connect_ports
    props=options.properties)
  File "/usr/lib/python2.7/site-packages/rtctree/ports.py", line 316, in connect
    props=new_props)
  File "/usr/lib/python2.7/site-packages/rtctree/ports.py", line 115, in connect
    props = utils.dict_to_nvlist(props)
  File "/usr/lib/python2.7/site-packages/rtctree/utils.py", line 166, in dict_to_nvlist
    result.append(SDOPackage.NameValue(item, omniORB.any.to_any(dict[item])))
AttributeError: 'module' object has no attribute 'any'
rtcon: 'module' object has no attribute 'any'

I use omniorb 4.1.7 and omniorbpy 3.7. The source of the error seems to be that commit.

y-masutani commented 8 years ago

I have met the very same problem on Windows.

C:\Users\masutani>rtcon -v /localhost/masutani-desk.host_cxt/ConsoleIn0.rtc:out /localhost/masutani-desk.host_cxt/ConsoleOut0.rtc:in Traceback (most recent call last): File "C:\Python27\lib\site-packages\rtshell\rtcon.py", line 117, in main connect_ports(paths, options, tree=tree) File "C:\Python27\lib\site-packages\rtshell\rtcon.py", line 66, in connect_ports props=options.properties) File "C:\Python27\lib\site-packages\rtctree\ports.py", line 316, in connect props=new_props) File "C:\Python27\lib\site-packages\rtctree\ports.py", line 115, in connect props = utils.dict_to_nvlist(props) File "C:\Python27\lib\site-packages\rtctree\utils.py", line 166, in dict_to_nvlist result.append(SDOPackage.NameValue(item, omniORB.any.to_any(dict[item]))) AttributeError: 'module' object has no attribute 'any' rtcon: 'module' object has no attribute 'any'

Please help ...

y-masutani commented 8 years ago

I fixed the problem by changing "import omniORB" into "import omniORB.any" in rtctree/utils.py.