FastFieldSolvers Forum
FastFieldSolvers Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 FastFieldSolvers
 E.M. Workbench
 error running EM_FHNode

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Antispam question: What do MOONwalk and MOONdance have in common?
Answer:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON

 
   

T O P I C    R E V I E W
gergaver Posted - Sep 11 2023 : 12:33:00
Hello,
I have problems creating FHNode in FreeCAD.
When I select the button, I receive the following error:

12:24:40 Running the Python command 'EM_FHNode' failed:
Traceback (most recent call last):
File "C:\Users\gregor.ergaver\AppData\Roaming\FreeCAD\Mod\EM\EM_FHNode.py", line 322, in Activated
FreeCADGui.Snapper.getPoint(callback=self.getPoint,movecallback=self.move,extradlg=self.taskbox())
File "C:\Users\gregor.ergaver\AppData\Roaming\FreeCAD\Mod\EM\EM_FHNode.py", line 350, in taskbox
w.setWindowTitle(translate("EM","FHNode options", utf8_decode=True))

translate() got an unexpected keyword argument 'utf8_decode'

Any idea, what could be wrong?
I am running FreeCAD 0.21.1 and ElectroMagnetic workbench for FreeCAD.

Thanks.
3   L A T E S T    R E P L I E S    (Newest First)
Enrico Posted - Sep 13 2023 : 11:16:16
Hi Gregor,

thank you - yes, I expect that all the 'utf8_decode' options must be removed now from the translate() function.

Best,
Enrico
gergaver Posted - Sep 12 2023 : 10:31:54
Hello Enrico,

thank you for prompt reply.

Also for other users, I had to also change the following line:

from:
label4 = QtGui.QLabel(translate("EM","Con&tinue", utf8_decode=True))

to:

label4 = QtGui.QLabel(translate("EM","Con&tinue"))

BR, Gregor
Enrico Posted - Sep 11 2023 : 17:23:23
Hi Gergaver,

the 'utf8_decode' option was used at Python2 time. It should have not triggered an issue even under Python3, but apparently the code has been recently cleaned up (I can see the git commit ht*ps://github.com/FreeCAD/FreeCAD/commit/87b0893044f16da41aa84a500d7faaa895a953aa as per Mar 28, 2023) and it is now sensitive to these options.

I will need to update the sources. As a quick fix, you can try removing the option yourself from the code, i.e.

Was:

w.setWindowTitle(translate("EM","FHNode options", utf8_decode=True))

Becomes:

w.setWindowTitle(translate("EM","FHNode options"))


Best Regards,
Enrico




FastFieldSolvers Forum © 2020 FastFieldSolvers S.R.L. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.06