lectroidmarc/SacTraffic — Issue #47: Missing LogTypeID breaks ATOM... I think
Author: lectroidmarc
Created: 2011-12-15 17:27:34+00:00
State: open
Labels: Bug

If the LogTypeID is missing then the ATOM feed throws something like:

```python
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 701, in __call__
handler.get(*groups)
File "/base/data/home/apps/lectroid-sactraffic/2.355383633112231395/handlers/atom.py", line 123, in get
self.response.out.write(ElementTree.tostring(feed))
File "/base/python_runtime/python_dist/lib/python2.5/xml/etree/ElementTree.py", line 1009, in tostring
ElementTree(element).write(file, encoding)
File "/base/python_runtime/python_dist/lib/python2.5/xml/etree/ElementTree.py", line 663, in write
self._write(file, self._root, encoding, {})
File "/base/python_runtime/python_dist/lib/python2.5/xml/etree/ElementTree.py", line 707, in _write
self._write(file, n, encoding, namespaces)
File "/base/python_runtime/python_dist/lib/python2.5/xml/etree/ElementTree.py", line 707, in _write
self._write(file, n, encoding, namespaces)
File "/base/python_runtime/python_dist/lib/python2.5/xml/etree/ElementTree.py", line 698, in _write
_escape_attrib(v, encoding)))
File "/base/python_runtime/python_dist/lib/python2.5/xml/etree/ElementTree.py", line 830, in _escape_attrib
_raise_serialization_error(text)
File "/base/python_runtime/python_dist/lib/python2.5/xml/etree/ElementTree.py", line 777, in _raise_serialization_error
"cannot serialize %r (type %s)" % (text, type(text).__name__)
TypeError: cannot serialize None (type NoneType)
```

I think this is due to the category stuff in the atom handler.