Quote:
So remove all parts pointing to the Paraview-installation from the PYTHONPATH and retry |
Ok, I do in this way:
run Python import sys print sys.path import paraview import vtk Code:
MacBook-di-Simone:~ simomartini$ python Code:
MacBook-di-Simone:~ simomartini$ pyFoamVersion.py |
Quote:
The VTK-version that comes with Paraview is NO help. For some technical reason (you'll have to research that yourself) the version of VTK that comes with Paraview is modified and in parts behaves differently. Make sure you use the version from MacPorts (I think I described that before) |
this is my version of ports
Code:
MacBook-di-Simone:~ simomartini$ port Code:
MacBook-di-Simone:~ simomartini$ pyFoamVersion.py |
Quote:
|
I already install the vtk5! but I really don't know why this doesn't work.
Code:
MacBook-di-Simone:~ simomartini$ sudo port install vtk5 +python27 +qt4_mac |
Quote:
|
error messages running pyFoamPlotRunner
hello
i installed pyFoam on a rhel server but if i run pyFoamPlotRunner with the syntax pyFoamPlotRunner.py <OFsolver> -case CASE pyFoamPlotRunner.py <OFsolver> (in the case folder) i get following error messageTraceback (most recent call last): File "/usr/bin/pyFoamPlotRunner.py", line 3, in ? from PyFoam.Applications.PlotRunner import PlotRunner File "/usr/lib/python2.4/site-packages/PyFoam/Applications/PlotRunner.py", line 6 from .PyFoamApplication import PyFoamApplication ^ SyntaxError: invalid syntax i would be happy about any help or recommendations i m running pyFoam0.6.2 |
Quote:
What kind of RHEL? My guess is that it is not 6. Because the problem you have is one of the rare backward incompatibilities in Python. Relative imports were introduced with python 2.5 (so your Python seems to be 2.4 or older). Ah. Just saw it: it says 2.4 in the output Options are: - make the import absolute (just add PyFoam.Applications in front of the dot). Don't know where else this is required. Or make it "oldSchool"-relative by removing the dot in the front - there are packages python26 or python27 for RHEL that give you a higher-version PyFoam in parallel to the system on (don't EVER replace the system-python on a RHEL-machine). Using that needs a little bit of trickery (especially if you use setup.py) The reason why PyFoam uses the new-style relative import is that the old way does not work with Python 3 (PyFoam is compatible with python 2.x and 3.x but in order to get that I had to break compatibility with Pythons older than 2.5) |
oh sorry i didnt knew that
Code:
File "/usr/bin/pyFoamPlotRunner.py", line 3, in ? |
Quote:
|
pyFoamDisplayBlockMesh.py raise e AttributeError: SetInput
Hi,
I have a similar problem as is reported earlier and I can not find solution to that. My os is rhel 7.1 and same problem occur with pyFoam version 0.6.1 and 0.6.4. Error message is also similar with both pyFoam version. error: Code:
[Pekka@Kone4 rotor]$ pyFoamDisplayBlockMesh.py constant/polyMesh/blockMeshDict Code:
[Pekka@Kone4 rotor]$ pyFoamVersion.py older pyFoam version Code:
[Pekka@Kone4 angledDuctExplicit]$ pyFoamVersion.py BR/Pekka |
Quick answer @Pekka: VTK 6.1... I don't think that PyFoam is prepared for VTK 6.x, because the API changed considerably between VTK 5.x to 6.x.
How exactly did you install Qt 4.8 and VTK 6.1 in RHEL 7? Was it from the EPEL repositories? |
Thank you Bruno!
Problem has been solved by downgrade vtk to older one. I compiled vtk-5.10.1-4 from fc19.src.rpm source package. vtk 6.1.0 is from epel repository. BR/Pekka |
Hello everyone
I know this thread is years old but I'm hoping someone will still be able help. I'm trying to use the pyFoamDisplayBlockMesh function but keep getting the following error: segmentation fault (core dumping). with no further indication as to the cause of the error. I then set about compiling foam-extend 4 in debug mode which then gave me the following error: mn14cat@mn14cat-XPS-13-7390:~/foam/mn14cat-4.1/run/tutorials/solidMechanics/elasticSolidFoam/plateHole$ pyFoamDisplayBlockMesh.py constant/polyMesh/blockMeshDict VTK version 6 PyFoam WARNING on line 48 of file /home/mn14cat/foam/foam-extend-4.1/ThirdParty/packages/PyFoam-0.6.9/platforms/noarch/lib/python2.7/site-packages/PyFoam-0.6.9-py2.7.egg/PyFoam/Applications/DisplayBlockMeshQt.py : VTK version 6 currently unsupported Segmentation fault (core dumped) So my question is how would I go about downgrading my version of VTK and which version would be best to run displayMesh.py thanks in advance and hopefully someone finds this. |
All times are GMT -4. The time now is 14:56. |