CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   pyFoamTimelinePlot.py giving error: IndexError: list index out of range (https://www.cfd-online.com/Forums/openfoam-post-processing/165926-pyfoamtimelineplot-py-giving-error-indexerror-list-index-out-range.html)

arieljeds January 29, 2016 10:27

pyFoamTimelinePlot.py giving error: IndexError: list index out of range
 
Hi everyone,

I am trying to use probes and functionObjects for the first time (still pretty new to openfoam) and then I want to use pyFoamTimelinePlot.py to convert the files to csv and plot the data.

First of all, when I look into the postProcessing directory, the function objects and probes (from system/probeDict and running probeLocations) seem to have done what they're supposed to do but when I run the following command:

Code:

pyFoamTimelinePlot.py . --fields=magU --dir=postProcessing/probes/0/ --basic-mode=lines --csv=magU.csv
I get the following output:

Code:

Traceback (most recent call last):
  File "/usr/local/bin/pyFoamTimelinePlot.py", line 5, in <module>
    pkg_resources.run_script('PyFoam==0.6.5', 'pyFoamTimelinePlot.py')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/PyFoam-0.6.5-py2.7.egg/EGG-INFO/scripts/pyFoamTimelinePlot.py", line 5, in <module>
    TimelinePlot()
  File "/usr/local/lib/python2.7/dist-packages/PyFoam-0.6.5-py2.7.egg/PyFoam/Applications/TimelinePlot.py", line 34, in __init__
    **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/PyFoam-0.6.5-py2.7.egg/PyFoam/Applications/PyFoamApplication.py", line 424, in __init__
    result=self.run()
  File "/usr/local/lib/python2.7/dist-packages/PyFoam-0.6.5-py2.7.egg/PyFoam/Applications/TimelinePlot.py", line 239, in run
    writeTime=self.opts.writeTime)
  File "/usr/local/lib/python2.7/dist-packages/PyFoam-0.6.5-py2.7.egg/PyFoam/RunDictionary/TimelineDirectory.py", line 53, in __init__
    self.usedTime=self.writeTimes[0]
IndexError: list index out of range

I get the same output when I run

Code:

pyFoamTimelinePlot.py . --fields=magU --dir=postProcessing/probes/0/ --basic-mode=lines | gnuplot
I found some advice from 2008 which seems to not be relevant any more but haven't seen anything else useful.

Does anyone have experience with this issue who can offer some help?


All times are GMT -4. The time now is 20:19.