knime-geospatial-extension icon indicating copy to clipboard operation
knime-geospatial-extension copied to clipboard

Location Analysis nodes e.g. p-median solver fail on macOS and Linux

Open ddelano34 opened this issue 2 years ago • 5 comments

I am trying to run the Geospatial Allocation based on Vaccine Distribution example and the P-Median node fails to execute and returns an error with the solver. I installed the Geospatial Analytics Extension for KNIME using the extensions installation interface and did not see any other setup instructions to use this extension.

Versions: macOS Ventura 13.0.1, M1 Pro Knime 4.7.0 Geospatial Analytics Extension for KNIME 1.0.0.202212100353 KNIME Geospatial Extension 4.7.0.v202211290844

Example workflow link: https://hub.knime.com/-/spaces/-/latest/~OBf4SG6G-00Hhwr1/

Stack Trace: `WARN P-median 3:85 Traceback (most recent call last): File "/Applications/KNIME 4.7.0.app/Contents/Eclipse/plugins/org.knime.python3.nodes_4.7.0.v202211291148/src/main/python/_node_backend_launcher.py", line 459, in execute outputs = self._node.execute(exec_context, *inputs) File "/Applications/KNIME 4.7.0.app/Contents/Eclipse/plugins/sdl.harvard.geospatial_1.0.0.202212100353/src/main/python/src/nodes/locationanalysis.py", line 203, in execute problem.solve() File "/Applications/KNIME 4.7.0.app/Contents/Eclipse/plugins/sdl.harvard.geospatial.channel.bin.macosx.aarch64_1.0.0.202212100353/env/lib/python3.9/site-packages/pulp/pulp.py", line 1913, in solve status = solver.actualSolve(self, **kwargs) AttributeError: 'NoneType' object has no attribute 'actualSolve'

ERROR P-median 3:85 Execute failed: 'NoneType' object has no attribute 'actualSolve'`

ddelano34 avatar Dec 29 '22 14:12 ddelano34

Thanks for sharing the issues here. From the error report, 'NoneType' object has no attribute 'actualSolve' it seems that the parameters might have some issues, leading to an empty quest. Can you post your screenshot of the configuration dialog of P-median. Thanks

UrbanGISer avatar Jan 05 '23 01:01 UrbanGISer

Here is the configuration dialog with the setup in the sample project. Screenshot 2023-01-04 at 9 00 31 PM

ddelano34 avatar Jan 05 '23 02:01 ddelano34

@ ddelano34 thanks for providing the input parameters! As it is the original parameter, the issue is not related to the node itself, but might relate to the working platform. I just tested that workflow in the Windows platform, and the workflow worked fine. It did do not work on a laptop with the macOS M1 platform. I will ask my colleagues to further explore that.

UrbanGISer avatar Jan 09 '23 15:01 UrbanGISer

@UrbanGISer it seems that the PuLP library does not have all functionality on all OSes especially for MacOS (M1 and Intel). Can you please check if there is a version of PuLP that is fully supported by all OSes or can check if we can use an alternative library to solve the problem.

koettert avatar Feb 10 '23 10:02 koettert

Just run the testflows on Linux and the p-median solver as well as the LSCP and MCLP fail with the above mentioned exception.

koettert avatar May 23 '23 20:05 koettert

Fixed with https://github.com/spatial-data-lab/knime-geospatial-extension/commit/304ebda8a9b1fdc4bf91fbad3589652fa4a88c9e

koettert avatar Jan 21 '25 16:01 koettert