[Solved] Error Loading Mesh Module in 018.14784 but loads correctly in 018.14575

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

Syres
Posts: 351
Joined: Thu Aug 09, 2018 11:14 am

[Solved] Error Loading Mesh Module in 018.14784 but loads correctly in 018.14575

Postby Syres » Fri Sep 21, 2018 4:23 pm

Firstly I'm really not sure if this should be a CFD WB specific forum issue or a general Help forum issue so Moderators please feel free to move it accordingly.

I initially downloaded and extracted FreeCAD version 018.14784 daily and ran a set of macros to prepare the Millennium Falcon case (which I know works fine on 018.14575) using the CFD WB from 7th September 2018 and as soon as I double-clicked the XOR Mesh it errored therefore knowing there's been some Py3/Qt5 changes I upgraded to the latest CFD WB (while keeping a copy of the old one elsewhere on my data area) and closed FreeCAD. On re-opening 018.14784 I repeated the exercise and the error remains:

Code: Select all

Loading MeshPart module... done
Loading Mesh module... done
Traceback (most recent call last):
  File "C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CfdOF\_ViewProviderCfdMesh.py", line 62, in setEdit
    taskd = _TaskPanelCfdMesh._TaskPanelCfdMesh(self.Object)
  File "C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CfdOF\_TaskPanelCfdMesh.py", line 105, in __init__
    self.update()
  File "C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CfdOF\_TaskPanelCfdMesh.py", line 150, in update
    setInputFieldQuantity(self.form.if_max, self.clmax)
  File "C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdTools.py", line 300, in setInputFieldQuantity
    q.Format = (12, 'e')
<type 'exceptions.TypeError'>: PyCXX: Error creating object of type class Py::MapBase<class Py::Object> from (12, 'e')
My concern is that as the error is with both the old WB and the new one, that it's a commit in FreeCAD 018 since 9th September 2018 (date of 018.14575) that is possibly the root cause. Luckily I have a workaround as I have a copy of the CFD WB from 7th September and FreeCAD 018.14575 which are a stable combination.

Full FreeCAD info is as follows, works correctly in:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14575 (Git)
Build type: Release
Branch: master
Hash: a624fee2c27bbbb869df6a8ce40438953a282a8c
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)


Errors in:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14784 (Git)
Build type: Release
Branch: master
Hash: ac21bcc35c56b360e03c646f5cfdcf15e5769717
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)


I hope that's sufficient detail, thanks
John
Last edited by Syres on Sat Sep 22, 2018 10:10 am, edited 1 time in total.
User avatar
oliveroxtoby
Posts: 318
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Error Loading Mesh Module in 018.14784 but loads correctly in 018.14575

Postby oliveroxtoby » Fri Sep 21, 2018 8:42 pm

Syres wrote:
Fri Sep 21, 2018 4:23 pm
I initially downloaded and extracted FreeCAD version 018.14784 daily and ran a set of macros to prepare the Millennium Falcon case (which I know works fine on 018.14575) using the CFD WB from 7th September 2018 and as soon as I double-clicked the XOR Mesh it errored therefore knowing there's been some Py3/Qt5 changes I upgraded to the latest CFD WB (while keeping a copy of the old one elsewhere on my data area) and closed FreeCAD. On re-opening 018.14784 I repeated the exercise and the error remains:

Code: Select all

Loading MeshPart module... done
Loading Mesh module... done
Traceback (most recent call last):
  File "C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CfdOF\_ViewProviderCfdMesh.py", line 62, in setEdit
    taskd = _TaskPanelCfdMesh._TaskPanelCfdMesh(self.Object)
  File "C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CfdOF\_TaskPanelCfdMesh.py", line 105, in __init__
    self.update()
  File "C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CfdOF\_TaskPanelCfdMesh.py", line 150, in update
    setInputFieldQuantity(self.form.if_max, self.clmax)
  File "C:\Users\JPS\AppData\Roaming\FreeCAD\Mod\CfdOF\CfdTools.py", line 300, in setInputFieldQuantity
    q.Format = (12, 'e')
<type 'exceptions.TypeError'>: PyCXX: Error creating object of type class Py::MapBase<class Py::Object> from (12, 'e')
My concern is that as the error is with both the old WB and the new one, that it's a commit in FreeCAD 018 since 9th September 2018 (date of 018.14575) that is possibly the root cause. Luckily I have a workaround as I have a copy of the CFD WB from 7th September and FreeCAD 018.14575 which are a stable combination.
Hi John

Thanks for the careful report. Your assessment is correct - there was a change to the python API in the last few commits. The workbench has now been updated accordingly and should work with both the old and the new.
Please provide all the information requested in this post before reporting problems with CfdOF.
Syres
Posts: 351
Joined: Thu Aug 09, 2018 11:14 am

Re: [Solved] Error Loading Mesh Module in 018.14784 but loads correctly in 018.14575

Postby Syres » Sat Sep 22, 2018 10:10 am

Tests on both versions through to starting solver worked correctly using the updated workbench, thanks for the quick response.

I've had a look at the change you made and that helps me if I come across any errors in other workbenches or macros that I only use occasionally.

Thanks again
John