Welcome, Guest
Username: Password: Remember me

TOPIC: PROBLEM using RUNSELAFIN - CHOP function

PROBLEM using RUNSELAFIN - CHOP function 1 year 1 month ago #43720

Dear all,

I am using telemac-3D, with python3. I want to extract the last time step of my selafin result file. I tried to use the chop function for runSELAFIN python script.
I cannot import the runSELAFIN module as i get the following error message :

Traceback (most recent call last):
File "C:\telemac-mascaret\scripts\python3\runSELAFIN.py", line 75, in <module>
from config import OptionParser
ImportError: cannot import name 'OptionParser' from 'config' (C:\telemac-mascaret\scripts\python3\config.py)


There is not indeed any OptionParser name in the config.py module. However, the scripts are taken directly from Telemac-python-3 script folder, and no changes were made to them. Would anyone know how to use the Chop function ?


Here are attached the python modules runSELAFIN.py and config.py, as well as two snapshots of error messages, using CMD and Jupyter-Notebook.

Thank you in advance,
Best regards,
Séraphin
Attachments:
The administrator has disabled public write access.

PROBLEM using RUNSELAFIN - CHOP function 1 year 3 weeks ago #43766

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1592
  • Thank you received: 606
Hello,

Your issue is not a TELEMAC-3D issue, but a script issue. I have just moved to the dedicated section.

Which release do you use? You do not seem to use the latest release (FYI the latest one is now release v8p5r0, juste released on December 1st). There is no script runselafin.py script anymore for a long time...

With the latest release, I would suggest you to run:
run_telfile.py alter -f -1 old.slf new.slf

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: Seraphin_Michel-Stahl

PROBLEM using RUNSELAFIN - CHOP function 1 year 3 weeks ago #43777

Dear Chi-Tuan,
Thank you for your answer, I am not sure about the version, but it must be prior to v8.

Anyway, I tried your command and it worked as intended !
Thanks again,

Séraphin
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.