(@wva of @toon)
What steps will reproduce the problem?
1. Running test amcat.TestCSV
2013-10-08 15:50:06,752 [INFO amcat.scraping.controller:153] adding articles to
set 13
2013-10-08 15:50:06,910 [INFO amcat.scripts.article_upload.upload:105]
Importing CSV from /tmp/tmpyuJVov.txt into
2013-10-08 15:50:06,910 [INFO amcat.scraping.controller:131] RobustController
starting CSV for date 'datum'
2013-10-08 15:50:06,911 [INFO amcat.scripts.article_upload.fileupload:136]
Guessed encoding: ascii
2013-10-08 15:50:06,917 [INFO amcat.scraping.controller:81] Saving article kop1
2013-10-08 15:50:06,920 [ERROR amcat.scraping.controller:145] exception on
scrape_unit
Traceback (most recent call last):
File "/home/martijn/code/amcat/amcat/scraping/controller.py", line 142, in _scrape
for article in self.scrape_unit(scraper, unit):
File "/home/martijn/code/amcat/amcat/scraping/controller.py", line 157, in scrape_unit
scrapedunits = list(scraper.scrape_unit(unit))
File "/home/martijn/code/amcat/amcat/scraping/scraper.py", line 137, in scrape_unit
articles = list(self._scrape_unit(unit))
File "/home/martijn/code/amcat/amcat/scripts/article_upload/upload.py", line 138, in _scrape_unit
result = self.parse_document(document)
File "/home/martijn/code/amcat/amcat/scripts/article_upload/csv_import.py", line 156, in parse_document
elif is_nullable(fieldname):
File "/home/martijn/code/amcat/amcat/scripts/article_upload/csv_import.py", line 60, in is_nullable
return Article._meta.get_field(field_name).null
File "/home/martijn/code/amcat-env/local/lib/python2.7/site-packages/django/db/models/options.py", line 333, in get_field
raise FieldDoesNotExist('%s has no field named %r' % (self.object_name, name))
FieldDoesNotExist: Article has no field named u'parent_externalid'
2013-10-08 15:50:06,921 [INFO amcat.scraping.controller:148] Scraping CSV for
datum finished, 1 articles
2013-10-08 15:50:06,921 [INFO amcat.scraping.controller:153] adding articles to
set 14
Error
Traceback (most recent call last):
File "/home/martijn/code/amcat/amcat/scripts/article_upload/csv_import.py", line 265, in test_parents
externalid='id', parent_externalid='parent', author='van')
File "/home/martijn/code/amcat/amcat/scripts/article_upload/csv_import.py", line 214, in _run_test_csv
medium_name=options.pop("medium_name", 'testmedium'), **options)).run()
File "/home/martijn/code/amcat/amcat/scripts/article_upload/csv_import.py", line 130, in run
return super(CSV, self).run(*args, **kargs)
File "/home/martijn/code/amcat/amcat/scripts/article_upload/upload.py", line 112, in run
self.postprocess(arts)
File "/home/martijn/code/amcat/amcat/scripts/article_upload/csv_import.py", line 184, in postprocess
doc.parent = self.articles[parent_id]
KeyError: 12
2013-10-08 15:50:07,112 [INFO amcat.scripts.article_upload.upload:105]
Importing CSV from /tmp/tmpe8sSH6.txt into
2013-10-08 15:50:07,112 [INFO amcat.scraping.controller:131] RobustController
starting CSV for date 'datum'
2013-10-08 15:50:07,113 [INFO amcat.scripts.article_upload.fileupload:136]
Guessed encoding: ascii
2013-10-08 15:50:07,123 [INFO amcat.scraping.controller:81] Saving article kop1
2013-10-08 15:50:07,126 [INFO amcat.scraping.controller:148] Scraping CSV for
datum finished, 1 articles
2013-10-08 15:50:07,127 [INFO amcat.scraping.controller:153] adding articles to
set 15
Original issue reported on code.google.com by Martijn....@gmail.com on 8 Oct 2013 at 1:57
Original issue reported on code.google.com by
Martijn....@gmail.com
on 8 Oct 2013 at 1:57