Page 1 of 1

Attribute error with Fluid structure interaction simulation

Posted: Mon Dec 04, 2017 3:26 pm
by Paul Brss
Hello everyone,

I'm a new user of CS.
I'm currently working on the tutorial on fluid-structure interaction so it's the first time I'm using the "Fluid Structure interaction" panel on the GUI.

My problem is: I can't open the FSI panel on the GUI when I select it in the Treeview.

This is the error I have:
Traceback (most recent call last):
File "/opt/code_saturne/5.0.4/prod/lib/python2.7/site-packages/code_saturne/Base/MainView.py", line 1196, in displayNewPage
self.Browser)
File "/opt/code_saturne/5.0.4/prod/lib/python2.7/site-packages/code_saturne/Base/BrowserView.py", line 582, in display
return displaySelectedPage(name, root, case, stbar, study, tree)
File "/opt/code_saturne/5.0.4/prod/lib/python2.7/site-packages/code_saturne/Base/Toolbox.py", line 266, in displaySelectedPage
thisPage = Page.FluidStructureInteractionView(root, case)
File "/opt/code_saturne/5.0.4/prod/lib/python2.7/site-packages/code_saturne/Pages/FluidStructureInteractionView.py", line 724, in __init__
couplingManager.slotInternalSelectionChanged)
File "/opt/code_saturne/5.0.4/prod/lib/python2.7/site-packages/code_saturne/Pages/FluidStructureInteractionView.py", line 800, in __initTableView
self.connect(selectionModel,
AttributeError: 'FluidStructureInteractionView' object has no attribute 'connect'



I'm working on CS 5.0.4, with Linux Debian 8 and python 2.7.9.

I think I'm missing some package or something..

Any idea ?

Thank you in advance.

Re: Attribute error with Fluid structure interaction simulat

Posted: Tue Dec 05, 2017 12:45 pm
by Yvan Fournier
Hello,

I can't reproduce your issue, even on a similar system (Debian 8-based).

Are you using PyQt4 or PyQt5 ? We might have a bug in the PyQt5 adapter for this feature. I'll check the sources also for possible inconsistencies.

Regards,

Yvan

Re: Attribute error with Fluid structure interaction simulat

Posted: Tue Dec 05, 2017 6:59 pm
by Paul Brss
Hello Yvan,

Thanks for your answer !

I'm using PyQt5 and I might have spotted an syntax error in FluidStructureInteractionView.py (when using PyQt5):

Code: Select all

800 	        self.connect(selectionModel,
801 	                     SIGNAL( "currentChanged(const QModelIndex &, const QModelIndex &)"),
802 	                     slotSelectionChanged)
It should probably look like this (based on the others .py functions):

Code: Select all

self.selectionModel.currentChanged(const QModelIndex &, const QModelIndex &).connect(self.slotSelectionChanged)
But, I haven't found the exact syntax yet.

Do you have any recommendations ?
Could this be the problem ?


Regards,

Paul

Re: Attribute error with Fluid structure interaction simulat

Posted: Wed Dec 06, 2017 10:13 am
by Yvan Fournier
Hello,

I do indeed reproduce the error with Qt5. That part of the code was written in a different style, but I'll try looking into your suggestion and keep you updated.

Thanks and best regards,

Yvan

Re: Attribute error with Fluid structure interaction simulat

Posted: Wed Dec 06, 2017 4:58 pm
by Paul Brss
Hello,

Thanks, so I'll wait for your updating.

Some news though: I installed PyQt4 et tried to open the FSI panel but I've only got the exact same error message.

Regards,

Paul

Re: Attribute error with Fluid structure interaction simulat

Posted: Thu Dec 07, 2017 12:44 am
by Yvan Fournier
Hello,

Did you reinstall Code_Saturne using PyQt4 ?

I only have the issue with PyQt5 (which does not handle rhe obsolete syntac anymore).

Regards,

Yvan

Re: Attribute error with Fluid structure interaction simulat

Posted: Fri Dec 08, 2017 2:03 pm
by Paul Brss
Hello Yvan,

No, I just loaded the package of PyQt4.
I'll try to re-install it with PyQt4 and I'll keep you in touch.

Do you have any new information about the right syntax with PyQt5 ?

Regards,

Paul

Re: Attribute error with Fluid structure interaction simulat

Posted: Sat Dec 09, 2017 4:59 am
by Yvan Fournier
Hello,

I fixed the syntax for PyQt5, but this is not enough. A specificity in this page is that Qt signals are connected to slots in another (not the same) object, which works ith PyQt4 but not PyQt5. I could change the code, but the way it is set up in this case is more "generic" so I'm still trying to keep the good (maintainability) aspects of this code while getting it working... I'll probably get back to this in a few days, but already spent some time fighting with this issue this week, and need to get other things done... If all else fails, I'll go to less generic code by the end of the month.

Best regards,

Yvan

Re: Attribute error with Fluid structure interaction simulat

Posted: Tue Dec 12, 2017 4:37 pm
by Paul Brss
Hello Yvan,

I re-install Saturne with PyQt4 and everything is fine for this case, so thank you !

Please, tell me when/if you manage to fix the GUI for FSI with PyQt5.

Best regards,

Paul

Re: Attribute error with Fluid structure interaction simulat

Posted: Thu Dec 21, 2017 12:18 am
by Yvan Fournier
Hello,

Versions 5.1.1 and 5.0.5 were released today, ad should fix the FSI page bug with PyQt5.

Best regards,

Yvan