gisquick / gisquick-qgis-plugin-old

DEPRECATED Gisquick QGIS Plugin - tool for publishing QGIS projects in Gisquick platform
http://gisquick.readthedocs.io
GNU General Public License v3.0
6 stars 4 forks source link

ValueError: No JSON object could be decoded #12

Open janekT opened 5 years ago

janekT commented 5 years ago

hi all, I have problem to create project in my QGIS (win 8 pro, 64x). Maybe problem will be related to utf8? Jan

Traceback (most recent call last): File "C:/Users/M�stostarostaFL/.qgis2/python/plugins\gisquick-qgis-plugin\webgisplugin.py", line 423, in show_publish_dialog self.last_metadata = self._last_metadata() or {} File "C:/Users/M�stostarostaFL/.qgis2/python/plugins\gisquick-qgis-plugin\webgisplugin.py", line 400, in _last_metadata return json.load(f) File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\json__init.py", line 291, in load **kw) File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\json\init__.py", line 339, in loads return _default_decoder.decode(s) File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\json\decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

Verze Pythonu: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] QGIS verze: 2.18.28 Las Palmas, 6551c2a73e

jachym commented 5 years ago

First try: yes, that could be the problem. Using the software in folder, with no spaces and local characters could help.

I'm not sure, if we tested on windows and I assume that no. But it is django-based so it should be possible

landam commented 5 years ago

@janekT Please could you share sample QGIS project to reproduce the issue? Are you using localized OS (Czech)?

janekT commented 5 years ago

Yes I use localized version. I change all directories to be in good format (no spaces, no specieal characters) and stil no luck. Here is project file with some shapefiles. mapy.zip

janekT commented 5 years ago

Hi all, I removed all paths with local chracters and spaces and still no luck. So i am not sure where to look next?

An error has occurred while executing Python code:

ValueError: No JSON object could be decoded Traceback (most recent call last): File "D:\qgis_config/python/plugins\gisquick-qgis-plugin\webgisplugin.py", line 423, in show_publish_dialog self.last_metadata = self._last_metadata() or {} File "D:\qgis_config/python/plugins\gisquick-qgis-plugin\webgisplugin.py", line 400, in _last_metadata return json.load(f) File "C:\OSGeo\apps\Python27\lib\json__init.py", line 291, in load **kw) File "C:\OSGeo\apps\Python27\lib\json\init__.py", line 339, in loads return _default_decoder.decode(s) File "C:\OSGeo\apps\Python27\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\OSGeo\apps\Python27\lib\json\decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

Verze Pythonu: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] QGIS verze: 2.18.28 Las Palmas, aa30730ac6

Python cesta: C:/OSGeo/apps/qgis-ltr/./python/plugins\processing C:/OSGeo/apps/qgis-ltr/./python D:\qgis_config/python D:\qgis_config/python/plugins C:/OSGeo/apps/qgis-ltr/./python/plugins C:\OSGeo\bin\python27.zip C:\OSGeo\apps\Python27\DLLs C:\OSGeo\apps\Python27\lib C:\OSGeo\apps\Python27\lib\plat-win C:\OSGeo\apps\Python27\lib\lib-tk C:\OSGeo\bin C:\OSGeo\apps\Python27 C:\OSGeo\apps\Python27\lib\site-packages C:\OSGeo\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg C:\OSGeo\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg D:\qgis_config/python D:/mapy

janekT commented 5 years ago

Ok so I removed file from project pasport_komunikace_1549015301.meta and now it seem to work. but at the end I haev another problem with unicode but not sure where it comes from.

An error has occurred while executing Python code:

UnicodeDecodeError: 'utf8' codec can't decode byte 0xed in position 1: invalid continuation byte Traceback (most recent call last): File "D:\qgis_config/python/plugins\gisquick-qgis-plugin\publish.py", line 333, in validate self.publish_project() File "D:\qgis_config/python/plugins\gisquick-qgis-plugin\publish.py", line 280, in publish_project json.dump(metadata, f, indent=2, default=decimal_default) File "C:\OSGeo\apps\Python27\lib\json__init__.py", line 189, in dump for chunk in iterable: File "C:\OSGeo\apps\Python27\lib\json\encoder.py", line 434, in _iterencode for chunk in _iterencode_dict(o, _current_indent_level): File "C:\OSGeo\apps\Python27\lib\json\encoder.py", line 390, in _iterencode_dict yield _encoder(value) UnicodeDecodeError: 'utf8' codec can't decode byte 0xed in position 1: invalid continuation byte

Verze Pythonu: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] QGIS verze: 2.18.28 Las Palmas, aa30730ac6

Python cesta: C:/OSGeo/apps/qgis-ltr/./python/plugins\processing C:/OSGeo/apps/qgis-ltr/./python D:\qgis_config/python D:\qgis_config/python/plugins C:/OSGeo/apps/qgis-ltr/./python/plugins C:\OSGeo\bin\python27.zip C:\OSGeo\apps\Python27\DLLs C:\OSGeo\apps\Python27\lib C:\OSGeo\apps\Python27\lib\plat-win C:\OSGeo\apps\Python27\lib\lib-tk C:\OSGeo\bin C:\OSGeo\apps\Python27 C:\OSGeo\apps\Python27\lib\site-packages C:\OSGeo\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg C:\OSGeo\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg D:\qgis_config/python D:/mapy .