jorgealmerio / QEsg

QEsg - Sewer Network Design Plugin for Qgis
17 stars 3 forks source link

float() argument must be a string or a number, not 'QVariant' #5

Closed tveinot closed 4 years ago

tveinot commented 5 years ago

I get a python error when I try to run the profile tool. float() argument must be a string or a number, not 'QVariant' It seems to be a value or field property

jorgealmerio commented 5 years ago

I would need more details, is there any NULL value in the attribute table fields? Profile tool only works after sewer network is full calculated. If you want, send me the files (qgis project file and the network shapefile).

tveinot commented 5 years ago

It is because I thought PVM and PVJ fields were elevation fields but they require the Node Start/End value respectively. Now when I run the profile it says; KeyError: 'DIAMETER' Traceback (most recent call last): File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QEsg\QEsg_00Settings.py", line 738, in DesenhaPerfil self.PerfilClasse.run() File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QEsg\QEsg_05Perfil.py", line 90, in run self.Desenha_Perfil(vLayer,Coletor) File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QEsg\QEsg_05Perfil.py", line 114, in Desenha_Perfil lstIds,lstTr_inter=self.DimensClasse.Lista_Interferencias(vLayer) File "C:/Users/tveinot/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QEsg\QEsg_03Dimensionamento.py", line 410, in Lista_Interferencias diamInt=feat['DIAMETER'] KeyError: 'DIAMETER'

Do you have an example dataset with everything filled in I can look over? I am just trying to setup a small portion of our network to see how things fit together and work.

jorgealmerio commented 5 years ago

A simple example can be loaded directly from menu Plugins/QEsg/Examples/Finished

I think this error is because you did not checked the mandatory fields (i.e: DIAMETER) for the Interferences Layer.

You can check QEsg fields by clicking '01 check Fields' (second button from left). You can also Fill in all fields with default values by clicking '04 Fill Fields' (fifth from left)

By the way Interferences layer is optional for model execution. You can clear it by selecting nothing in the settings Dialog (see below) image

tveinot commented 5 years ago

I do have all the fields and the diameters are in (150 to 250 mm) as integer. Check fields reports all fields "ok" for all layers. I do not have any nodes, this might be the issue; I tried making them using 03 Create Node Layer and got a python error. I didn't mention it yet because I wanted to see if it was something missing in my data first.

jorgealmerio commented 5 years ago

Nodes layers is not mandatory for running QEsg!

jorgealmerio commented 4 years ago

Is this is issue solved? If NOT, please send the files and tell me how the reproduce this error. If YES, Can I close this issue?