Hello,
I would like to use PythonOmekaApiToCsv script to export items from Omeka to csv.
The script works fine on a Omeka test installation with few items but fails to export another omeka site with a lot more items. I have the following error:
$ ./omekacsv.py
Enter your Omeka API endpoint
http://myomeka/api
If you are using an API key, please enter it now. Otherwise press Enter.
Exporting items
Getting results page 1 of 25 ...
Traceback (most recent call last):
File "./omekacsv.py", line 65, in <module>
get_all_pages(pages)
File "./omekacsv.py", line 54, in get_all_pages
data.extend(json.loads(content))
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
I am using Python 2.7.13. I also tested omekadd script which offers the same functionality with omekacsv.py (PythonOmekaApiToCsv is a fork of omekacsv) with the same error.