Traceback (most recent call last): File "/var/local/allura/Allura/allura/tasks/export_tasks.py", line 68, in _bulk_export app.bulk_export(f) File "/var/local/allura/ForgeTracker/forgetracker/tracker_main.py", line 424, in bulk_export json.dump(ticket, f, cls=jsonify.GenericJSON, indent=2) File "/usr/lib64/python2.7/json/__init__.py", line 181, in dump for chunk in iterable: File "/var/local/env-allura/lib/python2.7/site-packages/simplejson-2.2.1-py2.7-linux-x86_64.egg/simplejson/encoder.py", line 528, in _iterencode o = _default(o) File "/var/local/env-allura/lib/python2.7/site-packages/TurboGears2-2.1.5-py2.7.egg/tg/jsonify.py", line 37, in default return obj.__json__() File "/var/local/allura/ForgeTracker/forgetracker/model/ticket.py", line 1009, in __json__ parents_json.update(parent.__json__(self)) File "/var/local/allura/Allura/allura/model/artifact.py", line 104, in __json__ related_artifacts=[a.url() for a in self.related_artifacts()], File "/var/local/allura/Allura/allura/model/artifact.py", line 179, in related_artifacts if artifact.type_s == 'Commit' and not artifact.repo: AttributeError: 'NoneType' object has no attribute 'type_s'
This must occur when artifact.primary()
returns a None, and that is only possible in discuss.py:Thread.primary
And that must mean index.py:ArtifactReference.artifact
is returning a None. We should handle that situation.
Also, when an error like this happens, we log it ("Something went wrong during export of...") but the partial file is left there, and it gets zipped up. This means we're delivering a partial file to the project admin. I think it'd be better if we removed the file at that point, so it doesn't get zipped and shipped.
Closed #509.
je/42cc_6949