DesignSPHysics icon indicating copy to clipboard operation
DesignSPHysics copied to clipboard

Error while using GenCase

Open leafnlight opened this issue 4 years ago • 2 comments

Hi, I'm trying to reproduce the sloshingTank example (https://www.youtube.com/watch?v=x2u6UIicIEY) and I'm getting an error while running GenCase. I'm pretty sure my version is up to date since I've installed FreeCAD and the addon today.

Here's the error I get :

Traceback (most recent call last): 03:15:23 File "C:\Users\Lucas Aubé\AppData\Roaming\FreeCAD\Mod\DesignSPHysics\mod\widgets\dock\dock_pre_processing_widget.py", line 240, in on_execute_gencase total_particles_text = output[output.index("Total particles: "):output.index(" (bound=")] 03:15:23 ValueError: substring not found 03:15:23

Any idea on what could be causing this?

leafnlight avatar Apr 17 '21 07:04 leafnlight

This might help solve the issue: I've made it work by converting into comments lines 240 to 243 of dock_pre_processing_widget.py. With this modification, it works, but the simulation pop-up window doesn't display the number of particles. Which isn't a huge issue for this particular study I am doing.

leafnlight avatar Apr 17 '21 16:04 leafnlight

Hi there! Thanks for reporting that issue. It´s a problem when parsing the output given by GenCase, the latest GenCase version must have changed something on how it prints the total number of particles in the stdout.

I´ll give it a look.

zlotny avatar Apr 26 '21 07:04 zlotny

Hi, I also encountered this problem. When I follow DualSPHysics How to set up and run: CaseWaves, the error message is as follows. Is there a solution now? I actually tried to comment out the error line as well, but that didn't work, there were more errors.

02:36:27 Traceback (most recent call last): 02:38:48 File "C:\Users\Liu\AppData\Roaming\FreeCAD\Mod\DesignSPHysics\mod\widgets\dock\dock_pre_processing_widget.py", line 255, in on_execute_gencase total_particles_text = output[output.index("Total particles: "):output.index(" (bound=")] 02:38:48 ValueError: substring not found

Muyii3 avatar Sep 04 '23 18:09 Muyii3

This topic is discussed in #148

imestevez avatar Sep 20 '23 11:09 imestevez