[Fixed] Error Loading Wb using Python 3.6.9

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] Error Loading Wb using Python 3.6.9

Post by Syres »

I've had to make a local change in order to stop the following error occurring loading CfdOF Wb:

Code: Select all

11:19:38  module 'core.mesh.dynamic' has no attribute 'CfdDynamicMeshRefinement'
11:19:38  Traceback (most recent call last):
  File "<string>", line 62, in Initialize
  File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./core/mesh/dynamic/CfdDynamicMeshRefinement.py", line 32, in <module>
    from core.mesh.dynamic import TaskPanelCfdDynamicMeshRefinement
  File "/home/john/.local/share/FreeCAD/Mod/CfdOF/./core/mesh/dynamic/TaskPanelCfdDynamicMeshRefinement.py", line 29, in <module>
    import core.mesh.dynamic.CfdDynamicMeshRefinement as CfdDynamicMeshRefinement
So I changed line 29 in CfdOF/./core/mesh/dynamic/TaskPanelCfdDynamicMeshRefinement.py from:

Code: Select all

import core.mesh.dynamic.CfdDynamicMeshRefinement as CfdDynamicMeshRefinement
to:

Code: Select all

from core.mesh.dynamic import CfdDynamicMeshRefinement as CfdDynamicMeshRefinement

I assume that it's working correctly based on my test macros.


Code: Select all

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.28849 (Git)
Build type: Release
Branch: master
Hash: b4cb34c4d34d965838290490e478c16c84b655e7
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.41
  * Silk
  * Plot 2022.4.17
  * CfdOF 1.16.0
  * BIM 2021.12.0
  * FeedsAndSpeeds 0.4.0
  * dodo
  * Curves 0.4.3
  * Manipulator 1.4.3
  * fcgear 1.0.0
  * ThreadProfile 1.81.0
  * A2plus 0.4.56
  * sheetmetal 0.2.49
Last edited by Syres on Sun May 15, 2022 10:46 am, edited 1 time in total.
User avatar
oliveroxtoby
Posts: 627
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Error Loading Wb using Python 3.6.9

Post by oliveroxtoby »

Syres wrote: Fri May 13, 2022 10:25 am I've had to make a local change in order to stop the following error occurring loading CfdOF Wb:
Thank you! I have fixed.
Syres
Veteran
Posts: 1548
Joined: Thu Aug 09, 2018 11:14 am

Re: [Fixed] Error Loading Wb using Python 3.6.9

Post by Syres »

Thanks
adrianinsaval
Veteran
Posts: 2642
Joined: Thu Apr 05, 2018 5:15 pm

Re: [Fixed] Error Loading Wb using Python 3.6.9

Post by adrianinsaval »

I could be wrong but I think the

Code: Select all

as CfdDynamicMeshRefinement
in your fixed line is not necessary since you are giving it the same name it has
Post Reply