[Archive] Jython scripts: version and electrical circuit problems

Message by Gabriel GIONO:
I’m trying to automatically generate runs with the Jython scripts (inspired from the /resources/scripts) but I’m experiencing some troubles.
First of, the org.spis.ui.model.node.project seems to miss the Project class. This was already mentioned (but unanswered) in this thread: https://forum2.spis.org/t/archive-Using-Python-scripts-for-Version-5-2-4Basically the “from org.spis.ui.model.node.project import Project” does not find it. Same for “from org.spis.ui.model.node.project.study import Study”
It seems this is the case since 5.2.4, and is also in 6.0.4. I tried 5.1.8 and it worked then. Was something changed in the library? I tried to use the node .jar library from 5.1.8 in 6.0.4 but it didn’t work (I guess it has hidden dependencies which I’m not aware of).
Secondly, the electrical circuit does not seems to be correctly included in the Num (running on 5.1.8).In my simulation I’m biasing node 1 with respect to node 0 with “V 0 1 -2”. I see the potential of node 1 2 volts below node 0 when I’m running SPIS manually with the UI (as expected) but not when create a project/run with the Jython script (in this case, it seems like if the circuit.txt is not considered, like if it was “V 0 1 0”)
From my investigation, the command loading the circuit seems to work but not the copy.electrical.circuit command (if I setup a run manually, the circuit.txt is copied in the Run/NumKernel/Input folder, which is what I’m guessing the copy command should do). I tried to copy “manually” with python but the simulation still does not take it into account. In addition, it seems the model.xml file does not consider the Run/NumKernel/Input/circuit.txt file anywhere, so should it be created when calling ui2num?
I’ve also tried to modify the globalParameters and circuit file from an existing simulation ran manually (i.e. which worked as expected) and calling the Jython script just to perform the simulation (ui2num, clearing output folder and running) but here again the circuit does not seem to be included in the run.
Any thoughts?