[ Bug ] Draft_SetStyle failed: no attribute 'dimButton'

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
Roy_043
Posts: 3071
Joined: Thu Dec 27, 2018 12:28 pm

[ Bug ] Draft_SetStyle failed: no attribute 'dimButton'

Postby Roy_043 » Mon May 17, 2021 10:46 am

Pretty recent stuff:

Calling Draft_SetStyle results in an error:
Running the Python command 'Draft_SetStyle' failed:
Traceback (most recent call last):
File "D:\BKG_Tmp\FreeCAD_0.20_Last\Mod\Draft\draftguitools\gui_setstyle.py", line 61, in Activated
FreeCADGui.Control.showDialog(Draft_SetStyle_TaskPanel())
File "D:\BKG_Tmp\FreeCAD_0.20_Last\Mod\Draft\draftguitools\gui_setstyle.py", line 76, in __init__
self.form.dimButton.setIcon(QtGui.QIcon(":/icons/Draft_Text.svg"))

'PySide2.QtWidgets.QWidget' object has no attribute 'dimButton'


Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.24893 (Git)
Build type: Release
Branch: master
Hash: 03855f793feaceeb4385c02f6520f3e1b6429c93
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Dutch/Netherlands (nl_NL)
User avatar
bitacovir
Posts: 1457
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: [ Bug ] Draft_SetStyle failed: no attribute 'dimButton'

Postby bitacovir » Mon May 17, 2021 11:27 am

Roy_043 wrote: Mon May 17, 2021 10:46 am Pretty recent stuff:

Calling Draft_SetStyle results in an error:
It works for me if I load Draft WB first

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.24894 (Git)
Build type: Release
Branch: master
Hash: a378b6b66f8a5992fc1452567ff59bdb613abc80
Python version: 3.8.10
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My personal web site
My GitHub repository
My old Blog
Mini Airflow Tunnel Project
User avatar
Roy_043
Posts: 3071
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_SetStyle failed: no attribute 'dimButton'

Postby Roy_043 » Mon May 17, 2021 1:20 pm

bitacovir wrote: Mon May 17, 2021 11:27 am It works for me if I load Draft WB first
Of course I also do that.

Updating to your version resolves the issue. Strange...
User avatar
Roy_043
Posts: 3071
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_SetStyle failed: no attribute 'dimButton'

Postby Roy_043 » Tue Jun 01, 2021 2:03 pm

Apparently the problem is not related to the FreeCAD version, but rather related the Qt version?

The problem occurs in this version:

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.24986 (Git)
Build type: Release
Branch: master
Hash: ff6845e2f31988cc714027980e0100bb5521843e
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Dutch/Netherlands (nl_NL)
User avatar
yorik
Site Admin
Posts: 12229
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Re: [ Bug ] Draft_SetStyle failed: no attribute 'dimButton'

Postby yorik » Tue Jun 01, 2021 3:22 pm

Everything seems to work OK here... Do you compile FreeCAD yourself? You might need to touch Draft.qrc , that happens sometimes, an .ui file gets changed, but since the .qrc file didn't change, cmake doesn't recompile it
User avatar
Roy_043
Posts: 3071
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_SetStyle failed: no attribute 'dimButton'

Postby Roy_043 » Tue Jun 01, 2021 3:27 pm

yorik wrote: Tue Jun 01, 2021 3:22 pm Do you compile FreeCAD yourself?
No. The mentioned version is a weekly build:
FreeCAD_0.20.24986_Win-LPv12.5.4_vc17.x-x86-64.7z
User avatar
Roy_043
Posts: 3071
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_SetStyle failed: no attribute 'dimButton'

Postby Roy_043 » Thu Jun 17, 2021 9:14 am

yorik wrote: Tue Jun 01, 2021 3:22 pm Everything seems to work OK here... Do you compile FreeCAD yourself? You might need to touch Draft.qrc , that happens sometimes, an .ui file gets changed, but since the .qrc file didn't change, cmake doesn't recompile it
It is probably a compile issue.

I am using these weekly builds ATM:
FreeCAD_0.20.25065_Win-LPv12.5.4_vc17.x-x86-64.7z
FreeCAD_weekly-builds-25065-Win-Conda_vc14.x-x86_64.7z

If I check the Draft_rc.py file I notice that only in the case of the Conda version does it contain a reference to "dimButton".
Syres
Posts: 1050
Joined: Thu Aug 09, 2018 11:14 am

Re: [ Bug ] Draft_SetStyle failed: no attribute 'dimButton'

Postby Syres » Fri Jun 18, 2021 3:39 pm

sgrogan wrote: Thu Mar 04, 2021 10:51 pm ping
Could you please have a look that this with regard to the compilation of the weekly LP build noting @Yorik's comment above?