Menu

#208 pyFoamSamplePlot: AttributeError: 'NoneType' object has no attribute 'split'

acknowledged
None
normal
minor
always
none
A Utility
general
2014-04-30
2014-02-19
No

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.

Discussion

  • Bernhard Gschaider

    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

     
  • Bernhard Gschaider

     
  • Bernhard Gschaider

    Patch with fix uploaded. Will close this bug if there is no user feedback

     
  • Michael

    Michael - 2014-04-30

    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

     
  • Bernhard Gschaider

    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)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.