Menu

#184 pyFoamSamplePlot: underscores in set name

confirmed
None
normal
minor
always
none
The Library
0.5.7
general
2013-08-13
2013-08-13
No

When a set name in sampleDict contains an underscore, pyFoamSamplePlot exits.

Error in /usr/bin/pyFoamSamplePlot.py : PyFoam FATAL ERROR on line 263 of file /usr/lib/python2.6/site-packages/PyFoam/RunDictionary/SampleDirectory.py: The data in file center_line_P.xy is neither vector nor scalar: ['-8.3744e-05', '27.323']

Removing the '_' from center_line solves the problem.
---- additional_information ----
Python version: 2.6.6 (r266:84292, Feb 21 2013, 19:26:11)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]

PYTHONPATH: :/opt/software/paraview-3.12.0/lib:/opt/software/paraview-3.12.0/lib/paraview-3.12/site-packages:/local/myname/OpenFOAM/myname-2.1.1/run/cbf/scripts

OpenFOAM (2, 1, 1) of the installed versions ['2.1.1']

pyFoam-Version: 0.5.7

Configuration search path: [('file', '/etc/pyFoam/pyfoamrc'), ('directory', '/etc/pyFoam/pyfoamrc.d'), ('file', '/home/myname/.pyFoam/pyfoamrc'), ('directory', '/home/myname/.pyFoam/pyfoamrc.d')]
Configuration files (used): []

Installed libraries:
GnuplotŒŒŒŒŒŒŒŒŒŒŒŒŒ :Œ NoŒŒŒŒŒŒŒŒ Not a problem. Version from ThirdParty is used
plyŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒ :Œ NoŒŒŒŒŒŒŒŒ Not a problem. Version from ThirdParty is used
NumericŒŒŒŒŒŒŒŒŒŒŒŒŒ :Œ NoŒŒŒŒŒŒŒŒ Not supported anymore. No need to install it
numpyŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒ :Œ YesŒŒŒŒŒŒŒŒŒ version: 1.7.0
matplotlibŒŒŒŒŒŒŒŒŒŒ :Œ YesŒŒŒŒŒŒŒŒŒ version: 1.2.0
psycoŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒ :Œ NoŒŒŒŒŒŒŒŒ Not a problem. Acceleration not possible
hotshotŒŒŒŒŒŒŒŒŒŒŒŒŒ :Œ Yes
profileŒŒŒŒŒŒŒŒŒŒŒŒŒ :Œ Yes
cProfileŒŒŒŒŒŒŒŒŒŒŒŒ :Œ Yes
PyQt4ŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒ :Œ NoŒŒŒŒŒŒŒŒ Only some experimental GUI-stuff relies on this
PyQt4.Qwt5ŒŒŒŒŒŒŒŒŒŒ :Œ NoŒŒŒŒŒŒŒŒ Only an alternate plotting back-end
vtkŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒŒ :Œ NoŒŒŒŒŒŒŒŒ Not a problem. Only used for some utilities
TkinterŒŒŒŒŒŒŒŒŒŒŒŒŒ :Œ YesŒŒŒŒŒŒŒŒŒ version: $Revision: 73770 $
mercurialŒŒŒŒŒŒŒŒŒŒŒ :Œ Yes

Discussion

  • Mithrandirrr

    Mithrandirrr - 2013-08-13

    The command I ran is:

    pyFoamSamplePlot.py . --field=P --directory-name=sets --picture-destination=samplePlots

     
  • Bernhard Gschaider

    The problem is that the filename is used to determine the name of the line and the fields (which are spearated by '_'). So to find out how many data sets are in the file PyFoam would have to look into the files too.

    The problem is further complicated by the fact that
    - lines can of course have more than one _ in their name
    - field names may also have _ in them
    - vectors can be distinguished from scalars only by the number of columns

    So a file a_b_c_d with 4 columns can either be
    - a line 'a' with three scalars b, c & d
    - a line a_b_c with a vector value d

    I'll have a look whether there is a STABLE way to fix this

     

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.