Menu

#38 AttributeError with Python Code that I can't solve

GHydraulics 2.1.8
open
nobody
1
2022-01-10
2022-01-10
No

Hello, everyone!

I'm trying to make an EPANET model, run the simulation and "Write EPANET INP file"; however, after many (many) times, I'm still getting that error below, according to the log:

"An error occurred while running the Python code:

AttributeError: 'NoneType' object has no attribute 'type'
Traceback (most recent call last):
File "C:/Users/Roque/.qgis2/python/plugins\ghydraulic\ghydraulicsplugin.py", line 376, in runEpanet
writer = GHydraulicsInpWriter(template, self.iface)
File "C:/Users/Roque/.qgis2/python/plugins\ghydraulic\GHydraulicsInpWriter.py", line 420, in init
self.getNodes(section)
File "C:/Users/Roque/.qgis2/python/plugins\ghydraulic\GHydraulicsInpWriter.py", line 122, in getNodes
if geometry.type() == QGis.Point:
AttributeError: 'NoneType' object has no attribute 'type'

Versão do Python: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
Versão do QGIS: 2.18.11 Las Palmas, 29548e7

Python Path:
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python/plugins\processing
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python
C:/Users/Roque/.qgis2/python
C:/Users/Roque/.qgis2/python/plugins
C:/PROGRA~1/QGIS2~1.18/apps/qgis/./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/Roque/.qgis2//python
C:\Users\Roque.qgis2\python\plugins\gearthview\ext-libs
C:\Users\Roque.qgis2\python\plugins\mmqgis/forms
C:/Users/Roque/OneDrive/CadHouse/Projetos/Embasa/Contratos/460017875/6-ProjetoHidraulico/2-Desenhos/7-RedeDistribuicao/QGIS"

I've seen some similar errors here, although I still can't solve the problem.

Can you help me to solve that, please?

1 Attachments

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB