[OH-Dev] [issue773] Some oh-bugimporters importer is generating ParsedBug objects with no _tracker_name value
Asheesh Laroia
bugs at openhatch.org
Wed Sep 26 05:15:42 UTC 2012
New submission from Asheesh Laroia <asheesh at asheesh.org>:
I am running "python import_bugimporter_data /tmp/results.jsonlines".
What I expect is that it should import JSON data from the file specified without
printing any warnings.
What I'm seeing instead is this error:
File "/home/deploy/milestone-a/mysite/customs/management/commands/import_bugi
mporter_data.py", line 49, in handle
mysite.customs.core_bugimporters.import_one_bug_item(bug_dict)
File "/home/deploy/milestone-a/mysite/customs/core_bugimporters.py", line 79,
in import_one_bug_item
tracker_name=d['_tracker_name'])
KeyError: '_tracker_name'
I believe we should adjust oh-bugimporters so that it refuses to export any
ParsedBug item that doesn't have a _tracker_name value.
(My guess for the root cause here is that there's probably a bug in one of the
bugimporter classes where it's not filling in the _tracker_name value.)
We can possibly do this with the help of an undocumented property of the scrapy
Field class: "required". You can see that here:
http://pydoc.net/s01.scrapy/0.12.3/s01.scrapy.fieldproperty
An alternative is to add some of our own machinery that insists ParsedBug has
this field set to a value.
----------
messages: 3430
nosy: paulproteus
priority: bug
status: unread
title: Some oh-bugimporters importer is generating ParsedBug objects with no _tracker_name value
__________________________________________
Roundup issue tracker <bugs at openhatch.org>
<https://openhatch.org/bugs/issue773>
__________________________________________
More information about the Devel
mailing list