[Fixed] Blank Preference Entries No Longer accepted in v1.13.6

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

Post Reply
Syres
Veteran
Posts: 1548
Joined: Thu Aug 09, 2018 11:14 am

[Fixed] Blank Preference Entries No Longer accepted in v1.13.6

Post by Syres »

I upgraded CfdOF Wb to v1.13.6 and on writing a mesh case using a known good model I got the following in the Report View:

Code: Select all

10:48:12  Populating mesh dictionaries in folder /home/john/Data/FreeCAD/FEM_CFD/Falcon3/meshCase
10:48:12  Traceback (most recent call last):
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./_TaskPanelCfdMesh.py", line 238, in writeMesh
10:48:12      FreeCADGui.doCommand("cart_mesh.writeMesh()")
10:48:12    File "<string>", line 1, in <module>
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdMeshTools.py", line 86, in writeMesh
10:48:12      self.writeMeshCase()
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdMeshTools.py", line 698, in writeMeshCase
10:48:12      'FoamRuntime': CfdTools.getFoamRuntime(),
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdTools.py", line 421, in getFoamRuntime
10:48:12      installation_path = getFoamDir()
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdTools.py", line 412, in getFoamDir
10:48:12      installation_path = detectFoamDir()
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdTools.py", line 473, in detectFoamDir
10:48:12      foam_dir = findInDefaultPaths(FOAM_DIR_DEFAULTS)
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdTools.py", line 453, in findInDefaultPaths
10:48:12      return d if os.path.exists(d) else None
10:48:12    File "/usr/lib/python3.6/genericpath.py", line 19, in exists
10:48:12      os.stat(path)
10:48:12  TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

I've never had the OpenFOAM Install Directory text box filled in before relying on the automatic search facility but after entering the folder /opt/openfoam5 in the textbox the error is no longer triggered. So should the Tool-tip stating Leave Blank to use $WM_PROJECT_DIR Environment setting or search standard locations... be changed or is this a bug?

Code: Select all

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.28623 (Git)
Build type: Release
Branch: master
Hash: 85d3abeb8bb35a2369fbaf4471f00e6fa182ca10
Python 3.6.9, Qt 5.9.5, Coin 4.0.0a, OCC 7.3.0
Locale: English/UnitedKingdom (en_GB)
Installed mods: 
  * fasteners 0.3.40
  * Silk
  * Plot
  * CfdOF 1.13.6
  * BIM 2021.12.0
  * FeedsAndSpeeds 0.4.0
  * dodo
  * Curves 0.3.0
  * fcgear 1.0.0
  * ThreadProfile 1.81.0
  * A2plus 0.4.55b
  * sheetmetal 0.2.49
Last edited by Syres on Mon Apr 04, 2022 10:39 am, edited 1 time in total.
User avatar
oliveroxtoby
Posts: 629
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Blank Preference Entries No Longer accepted in v1.13.6

Post by oliveroxtoby »

Syres wrote: Mon Apr 04, 2022 9:57 am I upgraded CfdOF Wb to v1.13.6 and on writing a mesh case using a known good model I got the following in the Report View:

Code: Select all

10:48:12  Populating mesh dictionaries in folder /home/john/Data/FreeCAD/FEM_CFD/Falcon3/meshCase
10:48:12  Traceback (most recent call last):
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./_TaskPanelCfdMesh.py", line 238, in writeMesh
10:48:12      FreeCADGui.doCommand("cart_mesh.writeMesh()")
10:48:12    File "<string>", line 1, in <module>
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdMeshTools.py", line 86, in writeMesh
10:48:12      self.writeMeshCase()
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdMeshTools.py", line 698, in writeMeshCase
10:48:12      'FoamRuntime': CfdTools.getFoamRuntime(),
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdTools.py", line 421, in getFoamRuntime
10:48:12      installation_path = getFoamDir()
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdTools.py", line 412, in getFoamDir
10:48:12      installation_path = detectFoamDir()
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdTools.py", line 473, in detectFoamDir
10:48:12      foam_dir = findInDefaultPaths(FOAM_DIR_DEFAULTS)
10:48:12    File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./CfdTools.py", line 453, in findInDefaultPaths
10:48:12      return d if os.path.exists(d) else None
10:48:12    File "/usr/lib/python3.6/genericpath.py", line 19, in exists
10:48:12      os.stat(path)
10:48:12  TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
Sorry - should be fixed in 1.13.7
Syres
Veteran
Posts: 1548
Joined: Thu Aug 09, 2018 11:14 am

Re: Blank Preference Entries No Longer accepted in v1.13.6

Post by Syres »

oliveroxtoby wrote: Mon Apr 04, 2022 10:32 am Sorry - should be fixed in 1.13.7
Thanks Oliver, all working fine now with v1.13.7
Post Reply