python中routes.mapper包的问题-出于某种原因,generate是否返回None?

python中routes.mapper包的问题-出于某种原因,generate是否返回None?,python,routing,mapping,routes,Python,Routing,Mapping,Routes,我正在使用python路由包(http://routes.groovie.org/modules/mapper.html#routes.mapper.Mapper.connect) 我将代码简化为以下内容: from routes import Mapper m = Mapper() m.connect('upnp/:udn/:sid/:action', controller='upnp', action='desc', sid=None) a = m.generate(controller='

我正在使用python路由包(http://routes.groovie.org/modules/mapper.html#routes.mapper.Mapper.connect)

我将代码简化为以下内容:

from routes import Mapper
m = Mapper()
m.connect('upnp/:udn/:sid/:action', controller='upnp', action='desc', sid=None)
a = m.generate(controller='upnp', action='desc', udn='uuid:1234', sid=None)
print '---'
print a
print '---'
现在,我认为它应该打印出“/upnp/uuid:1234/None/desc”,但生成的返回值为None

你知道怎么回事吗


非常感谢

找出了原因:生成行中的sid=None