ValueError: No JSON object could be decoded in python

妖精的绣舞 提交于 2019-12-24 09:49:18

问题


I followed the instruction on the post to convert the shape file into a jvector map, I have downloaded the shape file from this site.

Below is the content of my bat file.

python converter.py ^
New_South_Wales.shp ^
test-map.js ^
--width 400 ^
--where "ISO_3166_2 = 'AU-' and code_hasc!=''" ^
--country_name_index 12 ^
--country_code_index 18 ^
--minimal_area 4000000 ^
--buffer_distance -0.5 ^
--simplify_tolerance 10000 ^
--longitude0 25.2744 ^
--name nsw

My folder contains the below files

I am getting the below error in command prompt when executing the bat file.

D:\POC\research\converter>makemap

D:\POC\research\converter>python converter.py  New_South_Wales.shp test-map.js -
-width 400 --where "ISO_3166_2 = 'AU-' and code_hasc!=''" --country_name_index 1
2 --country_code_index 18 --minimal_area 4000000 --buffer_distance -0.5 --simpli
fy_tolerance 10000 --longitude0 25.2744 --name nsw
Traceback (most recent call last):
  File "converter.py", line 296, in <module>
    paramsJson = json.loads(paramsJson)
  File "C:\OSGEO4~1\apps\Python27\lib\json\__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "C:\OSGEO4~1\apps\Python27\lib\json\decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\OSGEO4~1\apps\Python27\lib\json\decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

D:\POC\research\converter>

Can anyone help me how to resolve this?

来源:https://stackoverflow.com/questions/42520807/valueerror-no-json-object-could-be-decoded-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!