gustavowillam / SmartMapPlugin

Plugin Qgis3.10.x para interpolação utilizando Krigagem Ordinária (OK), Machine Learning (ML) e Geração de Zonas de Manejo
https://github.com/gustavowillam/SmartMapPlugin
GNU General Public License v3.0
53 stars 14 forks source link

Python error #2

Closed DCGuser closed 3 years ago

DCGuser commented 3 years ago

Ola, e obrigado pelo codigo. Tentei usa-lo hoje mas por algum motivo tive um erro de Python. A interpolacao que estou tentando usar tem coordenadas geograficas (lat/long) nao se se esse eh o problema. E' basicamente o nome do ponto, long, lat, numero a interpolar. A Menssagem de erro esta abaixo. Obrigado pela ajuda! Daniel, de Denver, CO.

An error has occurred while executing Python code:

ValueError: range() arg 3 must not be zero Traceback (most recent call last): File "C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\Smart_Map.py", line 1604, in pushButton_ImportQGIS_clicked xmarks=[i for i in range(int(self.Cord_X_min),int(self.Cord_X_max) , int((self.Cord_X_max-self.Cord_X_min)/5))] ValueError: range() arg 3 must not be zero

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS version: 3.10.2-A Coruña A Coruña, d4cd3cfe5a

Python Path: C:/PROGRA~1/QGIS 3.10/apps/qgis/./python C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/PROGRA~1/QGIS 3.10/apps/qgis/./python/plugins C:\PROGRA~1\QGIS 3.10\apps\Python37 C:\PROGRA~1\QGIS 3.10\apps\Python37\Scripts C:\Program Files\QGIS 3.10\bin\python37.zip C:\PROGRA~1\QGIS 3.10\apps\Python37\DLLs C:\PROGRA~1\QGIS 3.10\apps\Python37\lib C:\Program Files\QGIS 3.10\bin C:\PROGRA~1\QGIS 3.10\apps\Python37\lib\site-packages C:\PROGRA~1\QGIS 3.10\apps\Python37\lib\site-packages\win32 C:\PROGRA~1\QGIS 3.10\apps\Python37\lib\site-packages\win32\lib C:\PROGRA~1\QGIS 3.10\apps\Python37\lib\site-packages\Pythonwin C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\qgis_resource_sharing C:\Users\Daniel\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\qgis_resource_sharing C:\Users\Daniel\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\qgis_resource_sharing\ext_libs C:/Projects/AEROJET/BOU_ChemPlant2/QGIS C:/Users/Daniel/AppData/Roaming/QGIS/QGIS3/profiles/default/python/site-packages

gustavowillam commented 3 years ago

Olá Daniel! O sistema de referências geográficas do seu projeto no QGIS devem estar em UTM. Provavelmente pode ser esse o erro que está acontecendo. Converta suas coordenadas lat/long para o sistema de projeção em UTM. Estou a disposição.

tiagootanii commented 3 years ago

Boa noite,

Como estão? Espero que bem.

Ao instalar tb recebi esse erro.

Couldn't load plugin 'Smart_Map' due to an error when calling its classFactory() method

ModuleNotFoundError: No module named 'sklearn' Traceback (most recent call last): File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 334, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/Users/tiagootani/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Smart_Map/init.py", line 36, in classFactory from .Smart_Map import smart_map File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/tiagootani/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Smart_Map/Smart_Map.py", line 86, in from .utils import functions #Utility functions -> file functions.py File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/tiagootani/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Smart_Map/utils/functions.py", line 26, in from sklearn import svm File "/Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'sklearn'

Python version: 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)] QGIS version: 3.10.7-A Coruña A Coruña, 7b4ca4c8d0

Python Path: /Users/tiagootani/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/planet_explorer/extlibs /Applications/QGIS3.10.app/Contents/MacOS/../Resources/python /Users/tiagootani/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/tiagootani/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins /Applications/QGIS3.10.app/Contents/MacOS/../Resources/python/plugins /Applications/QGIS3.10.app/Contents/Resources/python /Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7 /Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages/geos /Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python37.zip /Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages /Applications/QGIS3.10.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/lib-dynload /Users/tiagootani/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/tiagootani/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/INDE-master /Users/tiagootani/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/mmqgis/forms

gustavowillam commented 3 years ago

Olá Tiago!

O plugin durante a sua instalação, faz uma tentativa de instalar a biblioteca Python sklearn.

No seu erro reportado, apresenta a seguinte mensagem: "ModuleNotFoundError: No module named 'sklearn'"

Isso indica que o plugin não obteve sucesso na instalação do sklearn. Sendo assim ela deve ser instalada via Terminal ou pelo OSGeo4 Shell do QGIS.

Na página do GitHub: https://github.com/gustavowillam/SmartMapPlugin contém um breve tutorial de como instalar o sklearn no QGIS.

Qualquer dúvida, estou a disposição.