ValueError: Expected object or value
Cathay2017 opened this issue · comments
I encounter ValueError when I try to use it.
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
import geosearch
locations = geosearch.geoSearch ('China, England, India,Japan')
Traceback (most recent call last):
File "<pyshell#5>", line 1, in
locations = geosearch.geoSearch ('China, England, India,Japan')
File "C:\Python27\lib\site-packages\geosearch\geosearch.py", line 88, in init
self.locations = search_locations(text, alpha)
File "C:\Python27\lib\site-packages\geosearch\geosearch.py", line 65, in search_locations
total_string = get_total_regions(alpha=alpha)
File "C:\Python27\lib\site-packages\geosearch\geosearch.py", line 22, in get_total_regions
df = pd.DataFrame(pd.read_json(infile))
File "C:\Python27\lib\site-packages\pandas\io\json\json.py", line 366, in read_json
return json_reader.read()
File "C:\Python27\lib\site-packages\pandas\io\json\json.py", line 467, in read
obj = self._get_object_parser(self.data)
File "C:\Python27\lib\site-packages\pandas\io\json\json.py", line 484, in _get_object_parser
obj = FrameParser(json, **kwargs).parse()
File "C:\Python27\lib\site-packages\pandas\io\json\json.py", line 576, in parse
self._parse_no_numpy()
File "C:\Python27\lib\site-packages\pandas\io\json\json.py", line 793, in _parse_no_numpy
loads(json, precise_float=self.precise_float), dtype=None)
ValueError: Expected object or value
Can anyone help me out? Thank you very much in advance!