Ask Your Question
4

How to solve the error "annot marshal None unless allow_none is enabled ”

asked 2014-05-16 04:30:08 -0500

scopus gravatar image

In my launch file server_gateway.launch, it launch another file whose contents is as follows.

     <launch> 
        <!-- ******************************* Arguments ******************************* --> 
        <arg name="concert_name" default="multinav_concert_scopus"/>
        <arg name="concert_hub_uri" default="http://localhost:6380"/>
        <arg name="gateway_watch_loop_period" default="2"/>
        <arg name="disable_uuids" default="false"/> 

        <!-- ********************************* Hub *********************************** --> 
         <include file="$(find rocon_hub)/launch/hub.launch">  
         <arg name="hub_name" value="$(arg concert_name)" />
         <arg name="hub_port" value="6380" />  </include>  

        <!-- ******************************* Zeroconf ******************************** -->
        <node ns="zeroconf" pkg="zeroconf_avahi" type="zeroconf" name="zeroconf"/> 

        <!-- ******************************** Gateway ******************************** -->  
        <node pkg="rocon_gateway" type="gateway.py" name="gateway">    
          <rosparam command="load" file="$(find rocon_gateway)/param/default.yaml"/>  
          <rosparam command="load" file="$(find rocon_gateway)/param/default_blacklist.yaml"/>   
          <rosparam command="load" file="$(find scopus_gateway)/param/server_advertisements.yaml" />   
          <rosparam command="load" file="$(find scopus_gateway)/param/server_flips.yaml" /> 
          <param name="hub_uri" value="$(arg concert_hub_uri)"/>    
          <param name="name" value="$(arg concert_name)"/>  
          <param name="firewall" value="false"/>
          <param name="watch_loop_period" value="$(arg gateway_watch_loop_period)"/> 
          <param name="hub_whitelist" value=""/>  
          <param name="disable_uuids" value="$(arg disable_uuids)"/>  
        </node> 
</launch>

But when running roslaunch server_gateway.launch, it comes out error:

load_parameters: unable to set parameters (last param was [/concert/gateway/hub_uri=http://localhost:6380]): cannot marshal None unless allow_none is enabled

Traceback (most recent call last):  File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/__init__.py", line 279, in main    p.start()  

File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start    self.runner.launch()

File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/launch.py", line 644, in launch    self._setup()  

File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/launch.py", line 631, in _setup    self._load_parameters() 

File "/opt/ros/hydro/lib/python2.7/dist-packages/roslaunch/launch.py", line 328, in _load_parameters    r  = param_server_multi() 

File "/usr/lib/python2.7/xmlrpclib.py", line 997, in __call__    return MultiCallIterator(self.__server.system.multicall(marshalled_list))  

File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__    return self.__send(self.__name, args)  

File "/usr/lib/python2.7/xmlrpclib.py", line 1572, in __request    allow_none=self.__allow_none)  

File "/usr/lib/python2.7/xmlrpclib.py", line 1085, in dumps    data = m.dumps(params)  

File "/usr/lib/python2.7/xmlrpclib.py", line 632, in dumps    dump(v, write)  

File "/usr/lib/python2.7/xmlrpclib.py", line 654, in __dump    f(self, value, write)  

File "/usr/lib/python2.7/xmlrpclib.py", line 714, in dump_array    dump(v, write)  

File "/usr/lib/python2.7/xmlrpclib.py", line 654, in __dump    f(self, value, write)  

File "/usr/lib/python2.7/xmlrpclib.py", line 735, in dump_struct    dump(v, write)  

File "/usr/lib/python2.7/xmlrpclib.py", line 654, in __dump    f(self, value, write)  

File "/usr/lib/python2.7/xmlrpclib.py", line 714, in dump_array    dump(v, write)  

File "/usr/lib/python2.7/xmlrpclib.py", line 654, in __dump    f(self, value, write)  

File "/usr/lib/python2.7/xmlrpclib.py", line 658, in dump_nil    raise TypeError, "cannot marshal None unless 
allow_none is enabled"TypeError: cannot marshal None unless allow_none is enabled

Does anyone give me some advices, thank you!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
3

answered 2014-05-16 06:27:12 -0500

ahendrix gravatar image

In general, this occurs because you tried to set a parameter to None, which isn't allowed.

In your particular case, It looks like you're trying to set the hub_whitelist parameter to an empty string, which is probably getting transformed into a None somewhere in roslaunch.

In general, you should be able to troubleshoot this by commenting out lines in your launch file until you find the one that is causing the error.

edit flag offensive delete link more

Comments

Thank you very much! This problem has been solved by your advice

scopus gravatar imagescopus ( 2014-05-18 16:34:14 -0500 )edit
0

answered 2019-08-05 06:49:47 -0500

You can also check the indentation of the parameters in the yaml files that are included in the launch file for this problem as this method worked for me.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-05-16 04:30:08 -0500

Seen: 8,211 times

Last updated: May 16 '14