CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[PyFoam] PyFoamPVSnapshot on pvpython3 not working

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2017, 10:06
Default PyFoamPVSnapshot on pvpython3 not working
  #1
New Member
 
Join Date: Apr 2016
Posts: 21
Rep Power: 10
robob is on a distinguished road
First pyFoamVersion output:

Code:
Machine info: Linux | Manjaro | 4.9.50-1-MANJARO | #1 SMP PREEMPT Thu Sep 14 09:07:15 UTC 2017 | x86_64 | 

Python version: 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:09:58) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]

Python executable: /home/robin/miniconda3/bin/python

Python 3 is supported with PyFoam
PYTHONPATH: /home/robin/miniconda3/lib/python3.6/site-packages:/home/robin/miniconda3/lib/python3.6/site-packages:/home/robin/miniconda3/lib/python3.6/site-packages:

Location of this utility: /home/robin/miniconda3/bin/pyFoamVersion.py

 PyFoam WARNING on line 202 of file /home/robin/miniconda3/lib/python3.6/site-packages/PyFoam/FoamInformation.py : Basedir /home/robin/foam for fork extend does not exist or is not a directory 
Version 5.0 (reported as number 5.0 )Fork openfoam of the installed 1 versions:
openfoam-5.0 : /home/robin/OpenFOAM/OpenFOAM-5.0

pyFoam-Version: 0.6.8.1

Path where PyFoam was found (PyFoam.__path__) is ['/home/robin/miniconda3/lib/python3.6/site-packages/PyFoam']

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

Installed libraries:
cython                         :  No     Not used. Maybe will by used later to spped up parts of PyFoam 
cProfile                       :  Yes 
docutils                       :  No     Not necessary. Needed for RestructuredText to HTML conversion 
Gnuplot                        :  No     Not a problem. Version from ThirdParty is used 
hotshot                        :  No     Not a problem. Can't profile using this library 
line_profiler                  :  No     Not a problem. Can't profile using this library 
ipdb                           :  No     Not necessary. Only makes debugging more comfortable 
IPython                        :  Yes    version: 6.1.0 Matches required version 2.0.0 
matplotlib                     :  Yes    version: 2.0.2 
mercurial                      :  No     Not a problem. Used for experimental case handling 
pytest                         :  No     Only needed for running the unit-tests (developers only) 
numpy                          :  Yes    version: 1.13.1 
openpyxl                       :  No     Not a problem. Only used for exporting pandas-data to Excel-files (advanced). If xlsxwriter is installed it will handle this (xlsxwriter is recommended anyway) 
xlsxwriter                     :  No     Not a problem. Only used for exporting pandas-data to XLSX-files (advanced). If openpyxl is installed then this module can handle that 
pandas                         :  Yes    version: 0.20.3 
ply                            :  No     Not a problem. Version from ThirdParty is used 
profile                        :  Yes 
psyco                          :  No     Not a problem. Acceleration not possible 
PyQt4                          :  No     Only some experimental GUI-stuff relies on this 
PyQt4.Qwt5                     :  No     Only an alternate plotting back-end 
scipy                          :  No     Not yet used. Possibly use signal-fitting etc 
Tkinter                        :  No     Not a problem. Used for the old version of DisplayBlockmesh and some matplotlib-implementations 
twisted                        :  No     Not yet used. Possibly reimplement MetaServer with it 
vtk                            :  No     Not a problem. Only used for some utilities 
xlwt                           :  No     Not a problem. Only used for exporting pandas-data to Excel-files 
xlrd                           :  No     Not a problem. Only used for importing Excel-files to pandas-data 
requests                       :  Yes    version: 2.14.2 
zeroconf                       :  No     Not a problem. Necessary to find existing runs. Install with 'pip install zeroconf' 
psutil                         :  Yes    version: 5.2.2 
PyFoam.ThirdParty.ply.yacc     :  Yes    version: 3.9 
PyFoam.ThirdParty.Gnuplot      :  Yes    version: 1.8 
PyFoam.ThirdParty.tqdm         :  Yes    version: 4.8.4 
PyFoam.ThirdParty.IPy          :  Syntax Error   This is our own. If it is not found we've got problems 
PyFoam.ThirdParty.pyratemp     :  Yes    version: 0.2.0 
PyFoam.ThirdParty.six          :  Yes    version: 1.10.0 
PyFoam.ThirdParty.winhacks     :  Yes 

Library locations
cProfile                       : /home/robin/miniconda3/lib/python3.6/cProfile.py
IPython                        : /home/robin/miniconda3/lib/python3.6/site-packages/IPython/__init__.py
matplotlib                     : /home/robin/miniconda3/lib/python3.6/site-packages/matplotlib/__init__.py
numpy                          : /home/robin/miniconda3/lib/python3.6/site-packages/numpy/__init__.py
pandas                         : /home/robin/miniconda3/lib/python3.6/site-packages/pandas/__init__.py
profile                        : /home/robin/miniconda3/lib/python3.6/profile.py
psutil                         : /home/robin/miniconda3/lib/python3.6/site-packages/psutil/__init__.py
PyFoam.ThirdParty.Gnuplot      : /home/robin/miniconda3/lib/python3.6/site-packages/PyFoam/ThirdParty/Gnuplot/__init__.py
PyFoam.ThirdParty.ply.yacc     : /home/robin/miniconda3/lib/python3.6/site-packages/PyFoam/ThirdParty/ply/yacc.py
PyFoam.ThirdParty.pyratemp     : /home/robin/miniconda3/lib/python3.6/site-packages/PyFoam/ThirdParty/pyratemp.py
PyFoam.ThirdParty.six          : /home/robin/miniconda3/lib/python3.6/site-packages/PyFoam/ThirdParty/six.py
PyFoam.ThirdParty.tqdm         : /home/robin/miniconda3/lib/python3.6/site-packages/PyFoam/ThirdParty/tqdm/__init__.py
PyFoam.ThirdParty.winhacks     : /home/robin/miniconda3/lib/python3.6/site-packages/PyFoam/ThirdParty/winhacks.py
requests                       : /home/robin/miniconda3/lib/python3.6/site-packages/requests/__init__.py

Checking additional envirnoment variables

Checking for PYFOAM_DIR : Location of the PyFoam-installation. Not strictly necessary
PYFOAM_DIR missing from environment

Checking for PYFOAM_SITE_DIR : Location of non-PyFoam-disctributions script. Set and used by some Foam-distributions
PYFOAM_SITE_DIR missing from environment

User information
Username:             robin
Temporary directory:  /tmp/PyFoam_robin
Public key:           795500f7c541b97d32365f7537a3f4df:7cadac11f31d33ff0e420510181b1edf

If I run pyFoamPVSnapshot.py:

Code:
Executing PVSnapshot with pvpython trough a proxy-script options: 
Traceback (most recent call last):
  File "/tmp/pyFoamPVSnapshot_7ow4923h.py", line 2, in <module>
    from PyFoam.Applications.PVSnapshot import PVSnapshot
  File "/home/robin/miniconda3/lib/python3.6/site-packages/PyFoam/Applications/PVSnapshot.py", line 240
    print "Say:",
               ^
SyntaxError: Missing parentheses in call to 'print'
Error: Return code  1 executing /tmp/pyFoamPVSnapshot_7ow4923h.py
When I change the print statements to python3:
print("Say:", end="")
then the following output:

Code:
Executing PVSnapshot with pvpython trough a proxy-script options: 
Traceback (most recent call last):
  File "/tmp/pyFoamPVSnapshot_ctwjfyoc.py", line 2, in <module>
    from PyFoam.Applications.PVSnapshot import PVSnapshot
  File "/home/robin/miniconda3/lib/python3.6/site-packages/PyFoam/Applications/PVSnapshot.py", line 8, in <module>
    from PyFoamApplication import PyFoamApplication
ModuleNotFoundError: No module named 'PyFoamApplication'
Error: Return code  1 executing /tmp/pyFoamPVSnapshot_ctwjfyoc.py
although I have set my PYTHONPATH correctly (I guess..)
So, how to solve this?
This should not happen at all, should it?
robob is offline   Reply With Quote

Old   September 22, 2017, 17:57
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
For those interested: robob wrote a ticket for this at https://sourceforge.net/p/openfoam-e...etspyfoam/221/ and I'm doing further communications through this
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply

Tags
pyfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Processor 0 not working vishwesh OpenFOAM Running, Solving & CFD 0 November 17, 2017 03:35
[PyFoam] Problem with pyFoamPVSnapshot Pavel Rodin OpenFOAM Community Contributions 7 September 27, 2017 06:30
Coal gasification: reactions not working shabbarraza2000 FLUENT 9 May 29, 2017 05:10
DPM parallel is not working but serial is working johnwinter FLUENT 1 March 27, 2012 02:01
Working directory mgonzalo FLUENT 1 November 11, 2011 10:05


All times are GMT -4. The time now is 17:21.