1

I have some layers that i want to publish after creating html / open layers format web maps using leaflets. Every time i try, i get this error. in fact i am unable to use pluggins. Please suggest. Error as below:

I am new on this stack exchange and i could not figure out where to post my next question to Mr Evan. I am an Architect and an Urban Planner by profession. I use QGIS for urban planning projects with government of Jharkhand, Inida. basically i dont understand python scripts.... Is there a way to fix my problem so that i can use qgis2web for publishing maps on our government website please?

An error has occurred while executing Python code: 

ValueError: invalid literal for int() with base 10: '' 
Traceback (most recent call last):
  File "C:/Users/HP/.qgis2/python/plugins\qgis2web\qgis2web.py", line 58, in run
    self.dlg = MainDialog(self.iface)
  File "C:/Users/HP/.qgis2/python/plugins\qgis2web\maindialog.py", line 149, in __init__
    self.autoUpdatePreview()
  File "C:/Users/HP/.qgis2/python/plugins\qgis2web\maindialog.py", line 310, in autoUpdatePreview
    (auto_preview, message) = self.shouldAutoPreview()
  File "C:/Users/HP/.qgis2/python/plugins\qgis2web\maindialog.py", line 294, in shouldAutoPreview
    if total_features > int(self.previewFeatureLimit.text()):
ValueError: invalid literal for int() with base 10: ''


Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] 
QGIS version: 2.18.20 Las Palmas, e8e15d5b1e 

Python Path:
C:\Users\HP\.qgis2\python\plugins\GeoCoding\libs
C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins\processing
C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python
C:/Users/HP/.qgis2/python
C:/Users/HP/.qgis2/python/plugins
C:/PROGRA~1/QGIS2~1.18/apps/qgis-ltr/./python/plugins
C:\PROGRA~1\QGIS2~1.18\bin\python27.zip
C:\PROGRA~1\QGIS2~1.18\apps\Python27\DLLs
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\plat-win
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\lib-tk
C:\PROGRA~1\QGIS2~1.18\bin
C:\PROGRA~1\QGIS2~1.18\apps\Python27
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Pythonwin
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\wx-2.8-msw-unicode
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg
C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg
C:/Users/HP/.qgis2//python
C:\Users\HP\.qgis2\python\plugins
C:\Users\HP\.qgis2\python\plugins
C:/Users/HP/.qgis2/python/plugins\qgis_resource_sharing
C:\Users\HP\.qgis2\python\plugins\qgis_resource_sharing
C:\Users\HP\.qgis2\python\plugins\qgis_resource_sharing\ext_libs
.
C:\Users\HP\.qgis2\python\plugins\DigitizingTools\tools
E:/GISmp/NF Infratech/Final_Amrut_Formulation_20180402/Saraikela/udhdcheck
1
  • I am new on this stack exchange and i could not figure out where to post my next question to Mr Evan. I am an Architect and an Urban Planner by profession. I use QGIS for urban planning projects with government of Jharkhand, Inida. basically i dont understand python scripts.... Is there a way to fix my problem so that i can use qgis2web for publishing maps on our government website please? Jun 20, 2018 at 10:56

1 Answer 1

1

In QGIS, open the Python console by pressing CTRL + ALT + P - it should appear below your map. Type the following into the Python console (or ideally, copy and paste it), and press Enter:

from PyQt4.QtCore import QSettings

The copy and paste the following code into the Python console and press Enter:

QSettings().setValue("qgis2web/previewFeatureLimit", "1000")

That should solve your problem.

5
  • Hello Tom, I followed the steps and now the pluggin opens. this time there is a new problem and that is the circular wait sign is continuously playing and the Error is as below Jun 22, 2018 at 10:59
  • Error qgis2web produced an error: Traceback (most recent call last): File "C:/Users/HP/.qgis2/python/plugins\qgis2web\maindialog.py", line 318, in previewMap preview_file = self.createPreview() File "C:/Users/HP/.qgis2/python/plugins\qgis2web\maindialog.py", line 280, in createPreview dest_folder=utils.tempFolder()).index_file File "C:/Users/HP/.qgis2/python/plugins\qgis2web\olwriter.py", line 89, in write folder=dest_folder) File "C:/Users/HP/.qgis2/python/plugins\qgis2web\olwriter.py", line 112, in writeOL ......more that cant fit Jun 22, 2018 at 11:01
  • I'll need the whole error, I'm afraid. Can you edit your question, and paste it at the end (make that clear in the question). Thanks! Jun 22, 2018 at 11:24
  • May i please have your email address? I would like to send you print screen. Now the error has gone, but it only publishes one layer out of 3 layers. I have an urban land use layer, roads and point layer. i only see point layers in html format. Jun 22, 2018 at 11:31
  • Please visit github.com/tomchadwin/qgis2web. You log this as an issue there, and upload a screenshot. Jun 22, 2018 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.