Closed GoogleCodeExporter closed 9 years ago
Hello,
I can't reproduce this particular error on Ubuntu 14.04 with Cantera 2.1.2 and
Python 2.7.6 or 3.4.0. You do have a typo, range(deltaG) should be
range(deltaH), but that was the only thing I could find. Can you try running
the script from the command line?
Bryan
Original comment by bryan.w....@gmail.com
on 21 Jan 2015 at 1:30
Hi Bryan,
Upon further investigation it looks like the problem is that ctml_writer.py is
failing to initiate because I get the following error when running the sofc.py
example script provided in the tutorial pages. By the way, i had to manually
add the sofc.cti file to my
/usr/lib/python2.7/dist-packages/cantera/data/sofc.cti because it didn't come
with the installation....
get_CTML_Tree: caught an exception:
***********************************************************************
CanteraError thrown by ct2ctml:
Error converting input file
"/usr/lib/python2.7/dist-packages/cantera/data/sofc.cti" to CTML.
Python command was: 'python'
The exit code was: 3
-------------- start of converter log --------------
SyntaxError in "/usr/lib/python2.7/dist-packages/cantera/data/sofc.cti" on line
5:
| Line |
| 1 |
| 2 |
| 3 |
| 4 |
| 5 | <!DOCTYPE html>
^
| 6 | <html>
| 7 | <head>
| 8 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
--------------- end of converter log ---------------
***********************************************************************
Traceback (most recent call last):
File "sofc.py", line 100, in <module>
['gas', 'metal', 'oxide_bulk',])
File "/usr/lib/python2.7/dist-packages/cantera/utils.py", line 12, in import_phases
return [Solution(filename, p) for p in phase_names]
File "base.pyx", line 21, in cantera._cantera._SolutionBase.__cinit__ (cantera/_cantera.cpp:5692)
RuntimeError:
***********************************************************************
CanteraError thrown by get_CTML_Tree:
XML file ./sofc.xml not found
***********************************************************************
Any thoughts?
Many thanks.
Original comment by dieg...@gmail.com
on 26 Jan 2015 at 10:35
Bryan,
If I change the importing phase line 50 in thermo_test.py to g =
ct.Solution('gri30.xml') I don't get the error, which confirms that the problem
is that ctml_writer.py is failing to initiate...
Original comment by dieg...@gmail.com
on 26 Jan 2015 at 10:50
Hello,
That error seems pretty clear - you've got the incorrect format for a CTI file.
CTI files are not XML nor HTML, so those tags are causing errors when
ctml_writer.py tries to process your file. Where did you get the sofc.cti file
from?
Bryan
Original comment by bryan.w....@gmail.com
on 28 Jan 2015 at 5:15
Hi Bryan,
You are right. I had the wrong sofc.cti file. After adding the correct file it
runs....
I still think i have a problem with my installation because the original error
posted here has not gone away. The only way I can make it disappear is if I use
ct.Solution('gri30.xml') instead of ct.Solution('gri30.cti'). Which makes me
think that i have some issue with the ctml_writer.py
Any further assistance would be much appreciated.
Thanks,
Diego
Original comment by dieg...@gmail.com
on 29 Jan 2015 at 3:04
Hi Diego,
If there was no problem using sofc.cti (once you corrected the format), the
problem seems to be in gri30.cti. Did you try running from the command line,
instead of your IDE?
Unfortunately, other than that general advice, I'm a bit out of ideas. You
should post this question on the User's Group:
https://groups.google.com/forum/#!forum/cantera-users where many more people
will see it. If you haven't posted there before, it is a moderated list so it
might take a day or two for your message to show up.
All the best,
Bryan
Original comment by bryan.w....@gmail.com
on 30 Jan 2015 at 1:41
Diego,
How did you install both Cantera and Spyder? Are both of these the packaged
versions for Ubuntu?
I am likewise curious what happens if you run your script from the command
line, outside of Spyder to see if it is what is causing the problem, e.g. run:
python thermo_test.py
Original comment by yarmond
on 30 Jan 2015 at 4:30
Unable to reproduce.
Original comment by yarmond
on 25 Feb 2015 at 7:33
Original issue reported on code.google.com by
dieg...@gmail.com
on 20 Jan 2015 at 11:02Attachments: