Whenever I try to make pyFoamSamplePlot.py for plotting the data given the sample utility I get an error:
pyFoamSamplePlot.py . --dir=sets --info
Traceback (most recent call last):
File "/usr/local/bin/pyFoamSamplePlot.py", line 5, in <module>
SamplePlot()
File "/usr/local/lib/python2.7/dist-packages/PyFoam/Applications/SamplePlot.py", line 33, in __init__
interspersed=True)
File "/usr/local/lib/python2.7/dist-packages/PyFoam/Applications/PyFoamApplication.py", line 309, in __init__
result=self.run()
File "/usr/local/lib/python2.7/dist-packages/PyFoam/Applications/SamplePlot.py", line 361, in run
valueNames=self.opts.valueNames.split(","),
AttributeError: 'NoneType' object has no attribute 'split'
I have tried with raw and csv data in sample files.
I think I know what is going on. Could you please try commenting out the line that starts with
fieldName= ...
in SamplePlot.C (must be near line 361). That should fix it for now until I find a permantent solution
Patch with fix uploaded. Will close this bug if there is no user feedback
hello berhard,
i m a big fan and beginner wtih pyFoam.
i really don't get it where and how i can patch the provided file.
i tried patch > PyFoam_usedValueNames.patch in the pyFoam 0.6.2 folder. but it didnt work, i also tried to find the SamplePlot.C file but i wasn't able to find
is the pyFoam 0.6.2 compatible with OF230?
i m looking forward to your answer
You'll need the -p option (-p1 or -p2 depending on the directory you're in). If the patch utility doesn't work for you have a look at the patch file and apply it by hand: all the information is there: The filename, look for the lines starting with - and replace them with the ones with +
Of course it should by SamplePlot.py (typos happen. I think this one is obvious enough to spot)
Yes. It is compatible with OF23 (exotic dictionaries that use new format features might cause problems)