CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[PyFoam] pyFoamCaseReport error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2012, 11:40
Default pyFoamCaseReport error
  #1
Member
 
Pierre Castellani
Join Date: Apr 2011
Location: Paris
Posts: 38
Rep Power: 14
pcaste12 is on a distinguished road
Hi,
I get an error running CaseReport only on solver part, all the other report looks good. Any idea?
In python I am doing:
CaseReport( args = [caseDir, "--full-report", "--file=" + log] )

And I get a report and an error:
Traceback (most recent call last):
File "/home/pierre/TeoTech/workspace/VT/case/squareBend.py", line 39, in <module>
CaseReport( args = [caseDir, "--full-report", "--file=" + log] )
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/CaseReport.py", line 41, in __init__
interspersed=True)
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PyFoamApplication.py", line 155, in __init__
result=self.run()
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/CaseReport.py", line 200, in run
self.doRegion(self.opts.region)
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/CaseReport.py", line 579, in doRegion
info["solver"]=raw[0]
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Basics/DataStructures.py", line 224, in __getitem__
raise KeyError(key)
KeyError: 0

I am using openFoam 2.0.1 and pyFoam0.5.5.

Many thanks,
pierre.
pcaste12 is offline   Reply With Quote

Old   January 16, 2012, 14:46
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by pcaste12 View Post
Hi,
I get an error running CaseReport only on solver part, all the other report looks good. Any idea?
In python I am doing:
CaseReport( args = [caseDir, "--full-report", "--file=" + log] )

And I get a report and an error:
Traceback (most recent call last):
File "/home/pierre/TeoTech/workspace/VT/case/squareBend.py", line 39, in <module>
CaseReport( args = [caseDir, "--full-report", "--file=" + log] )
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/CaseReport.py", line 41, in __init__
interspersed=True)
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PyFoamApplication.py", line 155, in __init__
result=self.run()
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/CaseReport.py", line 200, in run
self.doRegion(self.opts.region)
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/CaseReport.py", line 579, in doRegion
info["solver"]=raw[0]
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Basics/DataStructures.py", line 224, in __getitem__
raise KeyError(key)
KeyError: 0

I am using openFoam 2.0.1 and pyFoam0.5.5.

Many thanks,
pierre.
I think your problem is the pyFoam-version. To quote from the changes of 0.5.6 (the current version):

pyFoamCaseReporter can now handle all known formats of fvSolution/solvers

There are three different formats for the solvers in fvSolution which were not correctly parsed in 0.5.5.

I'm afraid you'll have to upgrade. While you're at it could you fill out this survey I recently started https://sourceforge.net/apps/limesur...=86766&lang=en (one question is how people find out about updates of pyFoam). Thanks
gschaider is offline   Reply With Quote

Old   January 16, 2012, 17:36
Default
  #3
Member
 
Pierre Castellani
Join Date: Apr 2011
Location: Paris
Posts: 38
Rep Power: 14
pcaste12 is on a distinguished road
Many thanks, I will do both.
pcaste12 is offline   Reply With Quote

Old   March 26, 2015, 00:38
Default
  #4
New Member
 
Vigneshram
Join Date: Aug 2010
Location: South Korea
Posts: 11
Rep Power: 15
Vigneshramaero is on a distinguished road
Hi,
I have installed pyfoam0.6.4 (recent) and openfoam2.3 in opensuse 13.2.
when i do create bondary patch i get this error. I check the environmental variable also but still i get this. Can some one help me to sort it out.

pyFoamCreateBoundaryPatches.py --clear-unused 0/boundaryU
Traceback (most recent call last):
File "/home/riddick/my_python/bin/pyFoamCreateBoundaryPatches.py", line 5, in <module>
CreateBoundaryPatches()
File "/usr/lib/python2.7/site-packages/PyFoam/Applications/CreateBoundaryPatches.py", line 29, in __init__
interspersed=True)
File "/usr/lib/python2.7/site-packages/PyFoam/Applications/PyFoamApplication.py", line 155, in __init__
result=self.run()
File "/usr/lib/python2.7/site-packages/PyFoam/Applications/CreateBoundaryPatches.py", line 116, in run
del boundaries[b]
File "/usr/lib/python2.7/site-packages/PyFoam/Basics/DataStructures.py", line 227, in __delitem__
dict.__delitem__(self,key)
KeyError: '"entrance.*"'


Thank you
Ram
Vigneshramaero is offline   Reply With Quote

Old   March 26, 2015, 06:25
Default
  #5
New Member
 
Vigneshram
Join Date: Aug 2010
Location: South Korea
Posts: 11
Rep Power: 15
Vigneshramaero is on a distinguished road
Hi,
I forgot to mention, Actually i'm getting this error only for "--clear-unused" other wise it write the new boundaries along with the old one.

Thank you
Ram
Vigneshramaero is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries NickG OpenFOAM Installation 3 December 30, 2019 00:21
[blockMesh] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 09:00
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 18:00
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 12:16.