I ran the "Gasonline Combution (Cantera).dwxmz" sample and recieved the following error:
Combustion (Cantera): CanteraError:
CanteraError thrown by ct2ctml_string:
Error executing python while converting input file:
Python command was: 'python'
exec_stream_t:start: CreateProcess failed.
command line was: python -c "fromfutureimort 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'C:\Users|KnightHawk\AppData\Local\DWSIM5\samples/ChemDetailed.cti',outName='STDOUT')
sys.exit(0)
"
The system cannot find the file specified. [code 0x0002 (2)]
[' File"<string.,line 7,="" in="" <module="">
'.' File "interfaces\cython\cantera\base.pyx". line 29. in cantera._cantera._SolutionBase.cinit(interfaces\cython\cantera\_cantera.cpp:7861)
'.' File "interfaces\cython\cantera\base.pyx". line 50. in cantera._cantera._SolutionBase._init_cti_xml(interfaces\cython\cantera\_cantera.cpp:826)
.]
I tried to troubleshoot the initial part of the python script from the model outside of DWSIM without success as the "system" module is not recognized outside of Ironpython (as best as I can figure).
*** Script Exerpt *****
import cantera as ct
import System
from System import IO
I can run the initial part of the script however outside of DWSIM by specifying the direct path to the Chemdetailed.cti file, so I am comfortable that Cantera is functioning properly.
**** Modified Script ***
import cantera as ct
gas1 = ct.Solution('direct/path/to/CTI/file')
I have python Anaconda 2.7 installed on my machine. Is it necessary to have ironpython installed?
Thanks in advance,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I ran the "Gasonline Combution (Cantera).dwxmz" sample and recieved the following error:
Combustion (Cantera): CanteraError:
CanteraError thrown by ct2ctml_string:
Error executing python while converting input file:
Python command was: 'python'
exec_stream_t:start: CreateProcess failed.
command line was: python -c "fromfutureimort 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'C:\Users|KnightHawk\AppData\Local\DWSIM5\samples/ChemDetailed.cti',outName='STDOUT')
sys.exit(0)
"
The system cannot find the file specified.
[code 0x0002 (2)]
[' File"<string.,line 7,="" in="" <module="">
'.' File "interfaces\cython\cantera\base.pyx". line 29. in cantera._cantera._SolutionBase.cinit(interfaces\cython\cantera\_cantera.cpp:7861)
'.' File "interfaces\cython\cantera\base.pyx". line 50. in cantera._cantera._SolutionBase._init_cti_xml(interfaces\cython\cantera\_cantera.cpp:826)
.]
I tried to troubleshoot the initial part of the python script from the model outside of DWSIM without success as the "system" module is not recognized outside of Ironpython (as best as I can figure).
*** Script Exerpt *****
import cantera as ct
import System
from System import IO
ct.add_directory(IO.Path.GetDirectoryName(Flowsheet.FilePath))
gas1 = ct.Solution('ChemDetailed.cti')
I can run the initial part of the script however outside of DWSIM by specifying the direct path to the Chemdetailed.cti file, so I am comfortable that Cantera is functioning properly.
**** Modified Script ***
import cantera as ct
gas1 = ct.Solution('direct/path/to/CTI/file')
I have python Anaconda 2.7 installed on my machine. Is it necessary to have ironpython installed?
Thanks in advance,
Hi Erik,
Try modifying the script to change the slash after 'samples' to a backslash.