not all arguments converted during string formatting when assign values
<p>I have a define to create network via network openstack api:</p>

<pre><code>def CreateNetwork(self, course_id, network_name, subnets):
    data = {'network' : {'name' : utils.NET_NAME % (course_id, network_name), 
                             'admin_state_up' : True}}
   netw = self.neutron.create_network(body = data)
   net_dict = netw['network']
   network_id = net_dict['id']

        #Create subnets
   subnet_data = {'subnets' : []}
   subnet_data['subnets'].append({'cidr' : subnets,
                                   'ip_version' : 4,
                                   'network_id' : network_id})
   self.neutron.create_subnet(body = subnet_data)                     
   return network_id
</code></pre>

<p>And I assign values: </p>

<pre><code>network = net.CreateNetwork(course_id = course.id, network_name = name, subnets = subnet)
</code></pre>

<p>then I receive error:</p>

<pre><code> "network = net.CreateNetwork(course_id = course.id, network_name = name, subnets = subnet)
 File "/web/lab/*****b/cnetworks.py", line 114, in CreateNetwork
 data = {'network' : {'name' : utils.NET_NAME % (course_id, network_name),
TypeError: not all arguments converted during string formatting"
</code></pre>

<p>Please teach me how to fix this. tks</p>