Cantera Error

761 views
Skip to first unread message

Oku Nyong

unread,
Sep 18, 2016, 6:38:22 AM9/18/16
to Cantera Users' Group
Hi all,
I'm having issues with my Cantera setting which I couldn't fix. In a bit to run some modelling on the sensitivity and reaction pathway on Jet fuel mechanism. In order to view  image files I first installed Graphviz which  was downloaded from the website. I ran the example code on reaction pathway from the documentation website and also download a code relating to reaction pathway from the  Cantera group post with this link 'https://groups.google.com/forum/#!searchin/cantera-users/reaction$20pathway|sort:relevance/cantera-users/jwLHqbxVjmw/b38TguXJcDYJ' which I ran to see how to get started but to my surprise I realised that something went wrong with my setting which has affected running any code with  reference to  .CTI files. This has also affected the programme of converting chemkin file to cti  files which give errors. I am using Cantera 2.2 with python 34 platform on windows.  The errors are displace below. I will really appreciate your guide on how to fix this error.

Thank you.
Oku.

Traceback (most recent call last):
  File "C:\Users\Oku\Documents\Folder  for Experiment\Current Old Piston Design\Reactive Runs\Banner-Solvent\0.79 molar composition_50ml volume\0.5\5bardp_new\50_50 Mix\115 degs\Tc_115\Volume_trace_calculation.py", line 10, in <module>
    gas = ct.Solution('ranzi.cti')
  File "cantera\base.pyx", line 26, in cantera._cantera._SolutionBase.__cinit__ (interfaces\cython\cantera\_cantera.cpp:6785)
  File "cantera\base.pyx", line 47, in cantera._cantera._SolutionBase._init_cti_xml (interfaces\cython\cantera\_cantera.cpp:7155)
RuntimeError:
***********************************************************************
CanteraError thrown by ct2ctml_string:
Error executing python while converting input file:
Python command was: 'C:\Python34\python.exe\'
exec_stream_t::start: CreateProcess failed.
 command line was: C:\Python34\python.exe\  -c "from __future__ import print_function
import sys
try:
    from cantera import ctml_writer
except ImportError:
    print('sys.path: ' + repr(sys.path) + '\n', file=sys.stderr)
    raise
ctml_writer.convert(r'./ranzi.cti', outName='STDOUT')
sys.exit(0)
"
The system cannot find the file specified.
[code 0x0002 (2)]
***********************************************************************
>>>

Second Error from Conversion from chemkin file to cti



************************************************

                Cantera Error!
************************************************

Procedure: ct2ctml
Error:   Error executing python while converting input file:
Python command was: 'C:\Python34\python.exe\'
exec_stream_t::start: CreateProcess failed.
 command line was: C:\Python34\python.exe\ -i
The system cannot find the file specified.
[code 0x0002 (2)]

Error in ck2cti (line 47)
iok = ctmethods(0, 1, infile, thermo, transport, idtag, 0, 0);
 

Ray Speth

unread,
Sep 18, 2016, 2:41:00 PM9/18/16
to Cantera Users' Group
Oku,

The problem looks like it is the trailing backslash in the path to the python executable. Do you have something somewhere that is setting the value of the environment variable 'PYTHON_CMD'? Does it contain the trailing backslash? If so, remove it and that should fix your problem.

Regards,
Ray

Oku Nyong

unread,
Sep 18, 2016, 5:34:22 PM9/18/16
to canter...@googlegroups.com

Hi Ray,

Thank you it's now running.

Regards

Oku.

--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.
To post to this group, send email to canter...@googlegroups.com.
Visit this group at https://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages