I'm trying to export all requests for user GeoCen into files/folders in the way that Shawn has provided them to me in the past (cf http://cl.ly/image/3B0Z3x1d3z2m) so I don't have to bother him! I downloaded the repo and tried to run some of the scripts but am getting weird undocumented errors. e.g.
chris$ python export_users_requests_as_files.py
Username: GeoCen
Password:
Username to export (case sensitive):GeoCen
URL I'm using is https://www.muckrock.com/api_v1/foia/?user=GeoCen
hey rob. check out <Response [500]>
There was an error of unkown origin
URL I'm using is https://www.muckrock.com/api_v1/foia/?user=GeoCen
hey rob. check out <Response [500]>
There was an error of unkown origin
chris$ python export_all_user_requests.py
Username: GeoCen
Password:
Username: GeoCen
Traceback (most recent call last):
File "export_all_user_requests.py", line 19, in <module>
data = r.json()
File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 819, in json
return json.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
chris$ python export_as_files.py
Username: GeoCen
Password:
Working on request 6996
Traceback (most recent call last):
File "export_as_files.py", line 19, in <module>
request_data = request.json()
File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 819, in json
return json.loads(self.text, **kwargs)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Am I fundamentally misunderstanding how these ought to work? Is there something broken w/ my configuration/python? Or is this broken on the API end?