I got the following exception when I ran the datastorer recently:
$ paster datastore_upload -c ../ckan/development.ini
2013-04-10 11:03:07,221 WARNI [ckanext.datastore.plugin] Legacy mode active. The sql search will not be available.
2013-04-10 11:03:07,784 DEBUG [ckanext.spatial.model.package_extent] Spatial tables defined in memory
2013-04-10 11:03:07,821 DEBUG [ckanext.spatial.model.package_extent] Spatial tables already exist
2013-04-10 11:03:42,685 WARNI [root] Resource downloaded: id=dc1da03a-e870-4b69-aec4-7ad3866ada9c url=u'http://localhost/data/ati.csv' cache_filename=/tmp/tmpJXwJ5D length=55939 hash=2d94118a3733319f94b1c3b55bf2809eb9265774
Traceback (most recent call last):
File "/var/www/ckan/env/ckan20/bin/paster", line 9, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/var/www/ckan/env/ckan20/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/var/www/ckan/env/ckan20/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/var/www/ckan/env/ckan20/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/var/www/ckan/env/ckan20/local/lib/python2.7/site-packages/ckanext_datastorer-0.1-py2.7.egg/ckanext/datastorer/commands.py", line 224, in command
self.push_to_datastore(context, resource)
File "/var/www/ckan/env/ckan20/local/lib/python2.7/site-packages/ckanext_datastorer-0.1-py2.7.egg/ckanext/datastorer/commands.py", line 265, in push_to_datastore
strict=True
File "/var/www/ckan/env/ckan20/local/lib/python2.7/site-packages/messytables-0.5.0-py2.7.egg/messytables/types.py", line 148, in type_guess
for row in rows:
File "/var/www/ckan/env/ckan20/local/lib/python2.7/site-packages/messytables-0.5.0-py2.7.egg/messytables/core.py", line 176, in __iter__
row = processor(self, row)
File "/var/www/ckan/env/ckan20/local/lib/python2.7/site-packages/ckanext_datastorer-0.1-py2.7.egg/ckanext/datastorer/commands.py", line 348, in datetime_convert
if isinstance(cell.value, datetime.datetime):
AttributeError: type object 'datetime.datetime' has no attribute 'datetime'
I was able to fix this by changing line 348 in commands.py from
if isinstance(cell.value, datetime.datetime):
to
if isinstance(cell.value, datetime):
Could this be something particular to my environment?
I got the following exception when I ran the datastorer recently:
I was able to fix this by changing line 348 in commands.py from
to
Could this be something particular to my environment?