Hello,
Can you open the XML file normally with Code_Saturne's GUI (under CFDSTUDY, right-click on the tjunction.xml file, in Code_Saturne standalone mode, run "./SaturneGUI tjunction.xml" in the DATA directory) ?
Regards,
Yvan
Installation of Code_Saturne 3.0.3 and Salome 7.3.0
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4085
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Installation of Code_Saturne 3.0.3 and Salome 7.3.0
Hello Yvan,
Thanks again for your prompt answer.
Yes, I can launch the computation with Code_Saturne in standalone mode.
Do you then have any advice to help me fix this issue?
Regards,
Clément
Thanks again for your prompt answer.
Yes, I can launch the computation with Code_Saturne in standalone mode.
Do you then have any advice to help me fix this issue?
Regards,
Clément
-
- Posts: 4085
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Installation of Code_Saturne 3.0.3 and Salome 7.3.0
Hello,
This is quite strange. I suspect a conflict between multiple Python variants or Code_Saturne package variants. Do you have multiple installs of Code_Saturne ? of SALOME ?
Coul you temporarily edit your /usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne/cs_xml_reader.py file, so as to replace (lines 124-127)
with:
This will let Python provide a more detailed backtrace, which may provide more info.
Best regards,
Yvan
This is quite strange. I suspect a conflict between multiple Python variants or Code_Saturne package variants. Do you have multiple installs of Code_Saturne ? of SALOME ?
Coul you temporarily edit your /usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne/cs_xml_reader.py file, so as to replace (lines 124-127)
Code: Select all
try:
self.doc = minidom.parse(fileName)
except Exception:
raise XMLError('Error parsing XML file: ' + fileName)
Code: Select all
self.doc = minidom.parse(fileName)
Best regards,
Yvan
Re: Installation of Code_Saturne 3.0.3 and Salome 7.3.0
Dear Yvan,
I modified the Python script as proposed and here is attached the output file. I don’t know if you’ll get enough information to understand the problem.
In order to answer your question, I don’t have another installation of Code_Saturne.
I also suspect a conflict as there are multiple Python libraries in my installation :
• /usr/local/apps/SALOME/Python-2.7.3/lib/python2.7
• /usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne
• /usr/lib/python2.7
However, I don’t know how to properly suppress this conflict.
Thank you.
Regards,
Clément
I modified the Python script as proposed and here is attached the output file. I don’t know if you’ll get enough information to understand the problem.
In order to answer your question, I don’t have another installation of Code_Saturne.
I also suspect a conflict as there are multiple Python libraries in my installation :
• /usr/local/apps/SALOME/Python-2.7.3/lib/python2.7
• /usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne
• /usr/lib/python2.7
However, I don’t know how to properly suppress this conflict.
Thank you.
Regards,
Clément
- Attachments
-
- output_modified_python_script.txt
- (1.24 KiB) Downloaded 281 times
-
- Posts: 4085
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Installation of Code_Saturne 3.0.3 and Salome 7.3.0
Hello,
Your output is surprising. When you edited th file, did you reindent the line with minidom.parse ?
From:
You should go to:
And not:
Because indentation decides where we are relative to a loop in Python.
I ask this because your output is what would be expected if the "self.doc = minidom.parse(fileName)" statement is not executed.
Best regards,
Yvan
Your output is surprising. When you edited th file, did you reindent the line with minidom.parse ?
From:
Code: Select all
if not os.path.isfile(fileName):
raise XMLError('XML file: ' + fileName + ' not found')
try:
self.doc = minidom.parse(fileName)
except Exception:
raise XMLError('Error parsing XML file: ' + fileName)
self.root = self.doc.documen
Code: Select all
if not os.path.isfile(fileName):
raise XMLError('XML file: ' + fileName + ' not found')
self.doc = minidom.parse(fileName)
self.root = self.doc.documen
Code: Select all
if not os.path.isfile(fileName):
raise XMLError('XML file: ' + fileName + ' not found')
self.doc = minidom.parse(fileName)
self.root = self.doc.documen
I ask this because your output is what would be expected if the "self.doc = minidom.parse(fileName)" statement is not executed.
Best regards,
Yvan
Re: Installation of Code_Saturne 3.0.3 and Salome 7.3.0
Hello,
You are absolutely right. Actually, I'm not familiar with Python. Sorry about that...
Here is the output with the right indentations :
Thank you for your help.
Regards,
Clément
You are absolutely right. Actually, I'm not familiar with Python. Sorry about that...
Here is the output with the right indentations :
Code: Select all
Traceback (most recent call last):
File "/usr/local/apps/Code_Saturne.3.0.3/bin/code_saturne", line 77, in
retcode = cs.execute()
File "/usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne/cs_script.py", line 73, in execute
return self.commands[command](options)
File "/usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne/cs_script.py", line 125, in run
return cs_run.main(options, self.package)
File "/usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne/cs_run.py", line 201, in main
domains=d)
File "/usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne/cs_case.py", line 150, in __init__
d.set_case_dir(self.case_dir)
File "/usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne/cs_case_domain.py", line 438, in set_case_dir
self.read_parameter_file(self.param)
File "/usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne/cs_case_domain.py", line 405, in read_parameter_file
version_str = version_str)
File "/usr/local/apps/Code_Saturne.3.0.3/lib/python2.7/site-packages/code_saturne/cs_xml_reader.py", line 124, in __init__
self.doc = minidom.parse(fileName)
File "/usr/local/apps/SALOME/Python-2.7.3/lib/python2.7/xml/dom/minidom.py", line 1920, in parse
return expatbuilder.parse(file)
File "/usr/local/apps/SALOME/Python-2.7.3/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/usr/local/apps/SALOME/Python-2.7.3/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
File "/usr/local/apps/SALOME/Python-2.7.3/lib/python2.7/xml/dom/expatbuilder.py", line 811, in end_element_handler
"element stack messed up - bad nodeName"
AssertionError: element stack messed up - bad nodeName
Regards,
Clément
-
- Posts: 4085
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Installation of Code_Saturne 3.0.3 and Salome 7.3.0
Hello,
Sorry for not answering earlier. This is very strange, as it looks like an install issue, but as both SALOME 7.3 and Ubuntu 13.10 use Python 2.7 (unless you chose to install Python 3 as a default under Ubuntu, but I am not sure it is even possible).
I can't even run SALOME 7.3 anymore on my Ubuntu 14.04 beta, so I can't test, unless I run on a virtual machine (I'll have to reinstall SALOME first, and if it's not enough post to the salome-platform.org forums, but that is another issue).
Next week will be very busy with our user meeting, so I probably won't have time to look into this, but I'll try to get back to testing this in 10 days.
Best regards,
Yvan
Sorry for not answering earlier. This is very strange, as it looks like an install issue, but as both SALOME 7.3 and Ubuntu 13.10 use Python 2.7 (unless you chose to install Python 3 as a default under Ubuntu, but I am not sure it is even possible).
I can't even run SALOME 7.3 anymore on my Ubuntu 14.04 beta, so I can't test, unless I run on a virtual machine (I'll have to reinstall SALOME first, and if it's not enough post to the salome-platform.org forums, but that is another issue).
Next week will be very busy with our user meeting, so I probably won't have time to look into this, but I'll try to get back to testing this in 10 days.
Best regards,
Yvan