DTOcean / dtocean

Download the DTOcean installation wizard, get help and report issues here.
GNU General Public License v3.0
4 stars 6 forks source link

Logistics Module "invalid type comparison" Error #11

Closed WavEC closed 7 years ago

WavEC commented 7 years ago

I was trying to test the Logistics/Installation module. When i try to run the tool, it says PASSED on the inputs and gives green light for the run but however, returns an error shortly after. The error is the following:

CRITICAL - dtocean_gui.main - A TypeError occurred: invalid type comparison
CRITICAL - dtocean_gui.main -   File "C:\Users\wazec\dtocean\lib\site-packages\dtocean_gui\main.py", line 185, in run
    self._project)
  File "C:\Users\wazec\dtocean\lib\site-packages\dtocean_core\menu.py", line 457, in execute_current
    allow_unavailable=allow_unavailable)
  File "C:\Users\wazec\dtocean\lib\site-packages\dtocean_core\menu.py", line 168, in _execute
    allow_unavailable=allow_unavailable)
  File "C:\Users\wazec\dtocean\lib\site-packages\dtocean_core\core.py", line 1769, in execute_interface
    interface = core.connect_interface(project, interface)
  File "C:\Users\wazec\dtocean\lib\site-packages\dtocean_gui\core.py", line 267, in connect_interface
    interface = super(GUICore, self).connect_interface(project, interface)
  File "C:\Users\wazec\dtocean\lib\site-packages\dtocean_core\core.py", line 1244, in connect_interface
    interface.connect()
  File "C:\Users\wazec\dtocean\lib\site-packages\dtocean_core\interfaces\installation.py", line 603, in connect
    zone)
  File "C:\Users\wazec\dtocean\lib\site-packages\dtocean_core\interfaces\installation.py", line 1702, in get_input_dict
    cable_burial_df['Jetting capability [yes/no]'] == 'yes'])
  File "C:\Users\wazec\dtocean\lib\site-packages\pandas\core\ops.py", line 763, in wrapper
    res = na_op(values, other)
  File "C:\Users\wazec\dtocean\lib\site-packages\pandas\core\ops.py", line 718, in na_op
    raise TypeError("invalid type comparison")

I tried to have a look at the different scripts it mentions but could not trace the source of the error. Just for testing, I commented out the part of the cable burial but the same error appeared.

H0R5E commented 7 years ago

Hi, I'm having a little trouble validating this one because of issue #16.

Is the "Jetting capability [yes/no]" column set in the "Installation Equipment: Cable Burial Data" table? We don't check for completeness of tables, just that some data has been entered.

It might be something to consider validating that the entered data is complete.

WavEC commented 7 years ago

This column was set in the Equipment database. If it was implemented in the end in the core, we cannot say...

H0R5E commented 7 years ago

How were you testing it then?

H0R5E commented 7 years ago

OK, so assuming this test proceeded using the example database, the values for "Jetting capability [yes/no]" are stored as a boolean, whereas the interface is expecting a string.

This highlights the issue with type mismatch in blank tables, so I think its important to try and define and implement column types as a long term goal.