You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A quick check shows that this might be an upstream issue at, or the fact that unicode strings are not supposed to be passed to the rosservice tool. Some examples are below.
Changing the above line of code from:
service_type = get_service_type(service)
to
service_type = get_service_type(str(service))
should solve the problem.
@dirk-thomas: Do you think this is an upstream issue?
Examples:
piyushk@robot-devil:~/catkin_ws/src/bwi_guidance/bwi_guidance/www$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from rosservice import get_service_type
>>> get_service_type('/services/bwi_guidance_server_service/person/camera/rgb/image_raw/compressed/set_parameters')
'dynamic_reconfigure/Reconfigure'
>>> get_service_type(u'/services/bwi_guidance_server_service/person/camera/rgb/image_raw/compressed/set_parameters')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 147, in get_service_type
return get_service_headers(service_name, service_uri).get('type', None)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 123, in get_service_headers
rosgraph.network.write_ros_handshake_header(s, header)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosgraph/network.py", line 415, in write_ros_handshake_header
s = encode_ros_handshake_header(header)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosgraph/network.py", line 401, in encode_ros_handshake_header
return struct.pack('<I', len(s)) + s
UnicodeDecodeError: 'ascii' codec can't decode byte 0x96 in position 0: ordinal not in range(128)
>>> get_service_type(u'/services/bwi_guidance_server_service/person/camera/rgb/image_raw/compressed/set_parameters')
KeyboardInterrupt
>>> get_service_type(u'/services/bwi_guidance_server_service/person/camera/rgb/image_raw/compressed/set_parameters')
KeyboardInterrupt
>>> get_service_type('/services/bwi_guidance_server_service/rosapi/service_request_details')
'rosapi/ServiceRequestDetails'
>>> get_service_type(u'/services/bwi_guidance_server_service/rosapi/service_request_details')
'rosapi/ServiceRequestDetails'
>>> get_service_type(u'/services/bwi_guidance_server_service/rosapi/service_response_details')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 147, in get_service_type
return get_service_headers(service_name, service_uri).get('type', None)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosservice/__init__.py", line 123, in get_service_headers
rosgraph.network.write_ros_handshake_header(s, header)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosgraph/network.py", line 415, in write_ros_handshake_header
s = encode_ros_handshake_header(header)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rosgraph/network.py", line 401, in encode_ros_handshake_header
return struct.pack('<I', len(s)) + s
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)
'/services/bwi_guidance_server_service/rosapi/service_request_details' was the longest service name I was able to process succesfully.
The text was updated successfully, but these errors were encountered:
piyushk
added a commit
to piyushk/rosbridge_suite
that referenced
this issue
May 2, 2014
https://github.com/RobotWebTools/rosbridge_suite/blob/develop/rosbridge_library/src/rosbridge_library/internal/services.py#L100 throws an exception for me when the full service name is too long. I believe this happens because a unicode string is passed to the rosservice tool to obtain the service type.
A quick check shows that this might be an upstream issue at, or the fact that unicode strings are not supposed to be passed to the rosservice tool. Some examples are below.
Changing the above line of code from:
to
should solve the problem.
@dirk-thomas: Do you think this is an upstream issue?
Examples:
'/services/bwi_guidance_server_service/rosapi/service_request_details' was the longest service name I was able to process succesfully.
The text was updated successfully, but these errors were encountered: