ValueError: No JSON object could be decoded in python
Asked Answered
A

0

1

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

enter image description here

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?

Archilochus answered 28/2, 2017 at 23:47 Comment(2)
did you solved this? it would be nice if you could share your solution...Bratton
sorry deblocker, I could not able to resolve error, I found a link to convert an svg file to jvectormap, but it does not gives the b-block coordinates, so, unable to plot the markers in the map. It would be great If some one posts a full tutorial/video about the steps to generate the map.Archilochus

© 2022 - 2024 — McMap. All rights reserved.