mirrormanager causes python error

Thomas Lenggenhager lenggenhager at switch.ch
Wed Mar 14 08:02:15 UTC 2007


Hi

I succeeded in adding my host. However, now I can no longer access 
mirror.switch.ch I added. When I request
   https://admin.fedoraproject.org/mirrormanager/host/14
I always get the following error page:
500 Internal error

The server encountered an unexpected condition which prevented it from 
fulfilling the request.

Page handler: <function _wrapper at 0x2dc6398>
Traceback (most recent call last):
   File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", 
line 105, in _run
     self.main()
   File "/usr/lib/python2.4/site-packages/cherrypy/_cphttptools.py", 
line 254, in main
     body = page_handler(*virtual_path, **self.params)
   File 
"/usr/lib/python2.4/site-packages/turbogears/identity/conditions.py", 
line 275, in _wrapper
     return fn( *args, **kw )
   File "<string>", line 3, in default
   File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", 
line 334, in expose
     output = database.run_with_transaction(
   File "<string>", line 5, in run_with_transaction
   File "/usr/lib/python2.4/site-packages/turbogears/database.py", line 
352, in sa_rwt
     retval = dispatch_exception(e,args,kw)
   File "/usr/lib/python2.4/site-packages/turbogears/database.py", line 
341, in sa_rwt
     retval = func(*args, **kw)
   File "<string>", line 5, in _expose
   File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", 
line 351, in <lambda>
     mapping, fragment, args, kw)))
   File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", 
line 378, in _execute_func
     output = errorhandling.try_call(func, *args, **kw)
   File "/usr/lib/python2.4/site-packages/turbogears/errorhandling.py", 
line 73, in try_call
     return func(self, *args, **kw)
   File 
"/home/fedora/mdomsch/mirrormanager/mirrors/mirrors/controllers.py", 
line 62, in default
     return action(item['values'], **params)
   File 
"/usr/lib/python2.4/site-packages/turbogears/identity/conditions.py", 
line 275, in _wrapper
     return fn( *args, **kw )
   File "<string>", line 3, in read
   File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", 
line 330, in expose
     output = func._expose(func, accept, func._allow_json,
   File "<string>", line 5, in _expose
   File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", 
line 351, in <lambda>
     mapping, fragment, args, kw)))
   File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", 
line 391, in _execute_func
     return _process_output(output, template, format, content_type, 
mapping, fragment)
   File "/usr/lib/python2.4/site-packages/turbogears/controllers.py", 
line 82, in _process_output
     fragment=fragment)
   File "/usr/lib/python2.4/site-packages/turbogears/view/base.py", line 
131, in render
     return engine.render(**kw)
   File "/usr/lib/python2.4/site-packages/turbokid/kidsupport.py", line 
174, in render
     return t.serialize(encoding=self.defaultencoding, output=format, 
fragment=fragment)
   File "/usr/lib/python2.4/site-packages/kid/__init__.py", line 299, in 
serialize
     raise_template_error(module=self.__module__)
   File "/usr/lib/python2.4/site-packages/kid/__init__.py", line 297, in 
serialize
     return serializer.serialize(self, encoding, fragment, format)
   File "/usr/lib/python2.4/site-packages/kid/serialization.py", line 
105, in serialize
     text = ''.join(self.generate(stream, encoding, fragment, format))
   File "/usr/lib/python2.4/site-packages/kid/serialization.py", line 
630, in generate
     for ev, item in self.apply_filters(stream, format):
   File "/usr/lib/python2.4/site-packages/kid/serialization.py", line 
163, in format_stream
     for ev, item in stream:
   File "/usr/lib/python2.4/site-packages/kid/parser.py", line 219, in 
_coalesce
     for ev, item in stream:
   File "/usr/lib/python2.4/site-packages/kid/serialization.py", line 
478, in inject_meta_tags
     for ev, item in stream:
   File "/usr/lib/python2.4/site-packages/kid/parser.py", line 177, in 
_track
     for p in stream:
   File "/usr/lib/python2.4/site-packages/kid/filter.py", line 30, in 
apply_matches
     item = stream.expand()
   File "/usr/lib/python2.4/site-packages/kid/parser.py", line 106, in 
expand
     for ev, item in self._iter:
   File "/usr/lib/python2.4/site-packages/kid/parser.py", line 177, in 
_track
     for p in stream:
   File "/usr/lib/python2.4/site-packages/kid/parser.py", line 219, in 
_coalesce
     for ev, item in stream:
   File 
"/home/fedora/mdomsch/mirrormanager/mirrors/mirrors/templates/host.py", 
line 295, in _pull
AttributeError: 'NoneType' object has no attribute 'name'
Error location in template file 
'/home/fedora/mdomsch/mirrormanager/mirrors/mirrors/templates/host.kid'
between line 69, column 55 and line 70, column 53:
... <span
     py:replace="c.category.name">Category Name</span> ...

Thanks for fixing it.

For the Country field, some guidance would be helpful. Full English 
Name, two letter ISO code or what to use?

In addition to allowed countries you could also add something like 
world-region or continent to group the entries, when the list grows. 
Africa, Asia - Pacific, Europe, Middle East, North America, South America.

Otherwise, the interface is pretty straight forward to use.

Regards,
Thomas

BTW: I tried to use an accented character in the comments field. That 
caused also a Python error. So I removed it again.
I wanted to write 'On Internet2 & GÉANT2' and now I only wrote 'On 
Internet2 & GEANT' without accent on the E. That works.

-- 
Thomas Lenggenhager           http://www.switch.ch/
SWITCH       The Swiss Education & Research Network
Zurich, Switzerland            Tel: +41 44 268 1505




More information about the Fedora-infrastructure-list mailing list