DualSPHysics / DesignSPHysics

Module for FreeCAD intended to use with DualSPHysics fluid simulator.
Other
113 stars 40 forks source link

Unknown error setting Execution Parameters #59

Closed jlehtira closed 4 years ago

jlehtira commented 4 years ago

I followed video tutorials to set up a simple test case with water, bottom and a sphere. I can save the case, but "Run GenCase" gives:

Error executing GenCase. Did you add objects to the case?. Another reason could be memory issues. View details for mode info.

However, I'm not sure where to see these details. If I click "Execution Parameters", I get the error details posted below. If I click "Special", I get a similar error (JSONDecodeError) but in a different file.

Is there something I could do? Is there something weird with my platform?

DesignSPHysics version: 0.6.0.2002-19-5 Platform: Linux-5.0.0-32-generic-x86_64-with-LinuxMint-19.3-tricia FreeCAD Version: 0.18.4. Exception type: <class 'json.decoder.JSONDecodeError'> Exception value: Expecting value: line 1 column 1 (char 0) Traceback:

File "/home/jonni/.FreeCAD/Mod/DesignSPHysics/mod/widgets/dock/dock_configuration_widget.py", line 61, in on_execparams_button_presed ExecutionParametersDialog(parent=get_fc_main_window()) File "/home/jonni/.FreeCAD/Mod/DesignSPHysics/mod/widgets/execution_parameters_dialog.py", line 149, in init densitydt_option_list = ['None', 'Molteni', 'Fourtakas', 'Fourtakas (Full)'] if Case.the().executable_paths.supports_ddt_fourtakas() else ['None', 'Molteni'] File "/home/jonni/.FreeCAD/Mod/DesignSPHysics/mod/dataobjects/executable_paths.py", line 75, in supports_ddt_fourtakas return bool(get_executable_info_flag(self.dsphysics)["Features"]["DDT_Fourtakas"]) File "/home/jonni/.FreeCAD/Mod/DesignSPHysics/mod/executable_tools.py", line 48, in get_executable_info_flag return json.loads(output) File "/usr/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None

zlotny commented 4 years ago

It seems that your binary files don't have execution permissions set. Just: chmod -R +x /home/jonni/.FreeCAD/Mod/DesignSPHysics/dualsphysics/bin/

But I didn't realize this could be a problem as that error gives no information about what could it be. I 'll try to work on a feature to either give execution permissions automatically or warn the user about it better.

Thanks for noticing this! :)

zlotny commented 4 years ago

Hi there. I tried to fix this as much as possible so now DesignSPHysics will even try to give executable permissions to the bundled files to prevent these errors from happening, especially those like your's that don't even give the user a hint on what is the real problem.

I'm noticing most of the users that use POSIX compliant OS's don't really know a lot of things about them so I suppose this, while a bit intrusive, is the best decision.

The commit that fixes this is d74ec350df01478d2ab32f5f01423bc790d72645, now in develop.