Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Python Error

Python Error 11 years 6 months ago #8695

  • f.luxford
  • f.luxford's Avatar
Hi

I have installed and compiled TELEMAC on windows using python for the first time. I tried to run a test telemac2d simulation but I received the following error:

C:\TELEMAC\LiverpoolBay>runcode.py telemac2d test.casw


Loading Options and Configurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

... parsing configuration file: C:\TELEMAC\v6p2_fay\wintel\config\systel.cfg


Running your CAS file for:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+> configuration: wintels
+> root: C:\TELEMAC\v6p2_fay\wintel
+> version v6p2


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Running test.casw with telemac2d under C:\TELEMAC\LiverpoolBay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

... reading module dictionary
_____________
runcode::main:
C:\TELEMAC\LiverpoolBay:
uncontroled error from python:: IndexError('string index out of range',)

C:\TELEMAC\LiverpoolBay>

The error is coming from the following part of runcode.py

print '... reading module dictionary'

# <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
# ~~~~ Run the Code from the CAS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
try:
runCAS(cfgname,cfg,codeName,casFile,options)
except Exception as e:
xcpts.addMessages(filterMessage({'name':'_____________\nruncode::main:\n '+path.dirname(casFile)},e,options.bypass))

Does anyone know what I have done wrong?

Thanks

Fay
The administrator has disabled public write access.

Python Error 11 years 6 months ago #8696

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Fay,

is it possible that your files (*.py or *.dico) got svn out or copied from under linux and that you are trying to get them running under windows ?

Sebastien.
The administrator has disabled public write access.

Python Error 11 years 6 months ago #8698

  • f.luxford
  • f.luxford's Avatar
Hi Sebastien

I downloaded them as pre-compiled binaries, the wintel32_v6p2 zip file. Should I download them files again?

Fay
The administrator has disabled public write access.

Python Error 11 years 6 months ago #8700

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
That zip may not have all the python code -- I do not remember whether it was updated or not.

Try checking out through SVN if you can (Tortoise SVN under windows).

Sebastien.
The administrator has disabled public write access.

Python Error 11 years 6 months ago #8701

  • f.luxford
  • f.luxford's Avatar
I just remembered I copied the pytel folder from a link on the forum because the zip file didn't contain the subdirectories so maybe the copy I have is inconsistent. I'll check it out through SVN.

Thanks

Fay
The administrator has disabled public write access.

Python Error 11 years 6 months ago #8716

  • f.luxford
  • f.luxford's Avatar
Hi

I checked out the latest version of the code using SVN but I am still getting the same error:

C:\TELEMAC\LiverpoolBay>runcode.py telemac2d test.casw


Loading Options and Configurations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

... parsing configuration file: C:\TELEMAC\v6p2_fay\config\systel.cis-windows.cf
g


Running your CAS file for:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+> configuration: wintels
+> root: C:\TELEMAC\v6p2_fay
+> version v6p2


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Running test.casw with telemac2d under C:\TELEMAC\LiverpoolBay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

... reading module dictionary
_____________
runcode::main:
C:\TELEMAC\LiverpoolBay:
uncontroled error from python:: IndexError('string index out of range',)

C:\TELEMAC\LiverpoolBay>

Can anyone help please?

Thanks

Fay
The administrator has disabled public write access.

Python Error 11 years 6 months ago #8717

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
Hello Fay,

Is it possible that your CAS file comes from a study using a previous version of TELEMAC ? In that case it may be that some of the keywords have changes. So if your new install is OK, maybe it comes from your CAS file.

Hope this helps,
Sebastien.
The administrator has disabled public write access.

Python Error 11 years 6 months ago #8718

  • f.luxford
  • f.luxford's Avatar
Hi Sebastien

To see if that was the cause, I checked out the validation cases and tried to run the v6p2 mersey, but I obtained the same error:

C:\TELEMAC\Validation_cases_v6p2\telemac2d\tel2d_v6p2\051_mersey>runcode.py telemac2d 2d_mersey.cas

Loading Options and Configurations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... parsing configuration file: C:\TELEMAC\v6p2_fay\config\systel.cis-windows.cfg Running your CAS file for: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +> configuration: wintels
+> root: C:\TELEMAC\v6p2_fay
+> version v6p2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Running t2d_mersey.cas with telemac2d under C:\TELEMAC\Validation_cases_v6p2\telemac2d\tel2d_v6p2\051_mersey ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... reading module dictionary _____________ runcode::main: C:\TELEMAC\Validation_cases_v6p2\telemac2d\tel2d_v6p\051_mersey:
uncontroled error from python:: IndexError('string index out of range',)

C:\TELEMAC\Validation_cases_v6p2\telemac2d\tel2d_v6p\051_mersey>

Is there anything else I can try?

Thanks

Fay
The administrator has disabled public write access.

Python Error 11 years 6 months ago #8719

  • sebourban
  • sebourban's Avatar
  • OFFLINE
  • Administrator
  • Principal Scientist
  • Posts: 814
  • Thank you received: 219
You do not have python 2.7.4 by any chance ?
We have had trouble recently with it and are still trying to find solutions.

Can you check you have either 2.7.2 or 2.7.3 ?

Thanks.
The administrator has disabled public write access.

Python Error 11 years 6 months ago #8720

  • f.luxford
  • f.luxford's Avatar
I am using 2.7.3, I previously tried 2.7.4 but I got the same error as thai30a in the previous post. I have now managed to get it working by using perl instead of python.

Fay
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: borisb

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