unicode error utf-8 using clone CloneConvert.FCMacro

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Norus
Posts: 81
Joined: Tue Oct 13, 2015 9:33 am

unicode error utf-8 using clone CloneConvert.FCMacro

Postby Norus » Sun Sep 15, 2019 9:23 am

Hello another small problem occurs using FreeCAD 0.18 with CloneConvert.FCMacro: unicode error utf-8.

The Version 0.18 is single and new on the PC. The macro was installed today.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16131 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

any ideas?

norus
Attachments
FreeCAD_CloneConvert_utf_8.PNG
FreeCAD_CloneConvert_utf_8.PNG (43.75 KiB) Viewed 317 times
chrisb
Posts: 19749
Joined: Tue Mar 17, 2015 9:14 am

Re: unicode error utf-8 using clone CloneConvert.FCMacro

Postby chrisb » Sun Sep 15, 2019 10:04 am

Did you follow the advice in Addon Manager that you have to install it manually?
Norus
Posts: 81
Joined: Tue Oct 13, 2015 9:33 am

Re: unicode error utf-8 using clone CloneConvert.FCMacro

Postby Norus » Sun Sep 15, 2019 10:26 am

Yes I did but now I see GitPython not installed! Cannot retrieve macros from git.

I have to look for it.

thank´s norus
Norus
Posts: 81
Joined: Tue Oct 13, 2015 9:33 am

Re: unicode error utf-8 using clone CloneConvert.FCMacro

Postby Norus » Sun Sep 15, 2019 11:37 am

github was installed:

https://forum.freecadweb.org/viewtopic.php?f=3&t=39353

the error is the same as before:

where is my fail?

norus
Attachments
FreeCAD_CloneConvert_github.PNG
FreeCAD_CloneConvert_github.PNG (50.91 KiB) Viewed 292 times
looo
Posts: 2966
Joined: Mon Nov 11, 2013 5:29 pm

Re: unicode error utf-8 using clone CloneConvert.FCMacro

Postby looo » Sun Sep 15, 2019 12:13 pm

strange this problem doesn't occure in linux, but I can reproduce with windows.

to fix the issue:
- macros
- select cloneconvert
- press edit
- go to line 433
- replace the <?> with a µ (ctrl m)
please help with my conda-packaging efforts: https://liberapay.com/looooo/
Norus
Posts: 81
Joined: Tue Oct 13, 2015 9:33 am

Re: unicode error utf-8 using clone CloneConvert.FCMacro

Postby Norus » Sun Sep 15, 2019 12:24 pm

Oh my dear, there is no ? at 433, -> very strange
Attachments
FreeCAD_cloneConvert_433.PNG
FreeCAD_cloneConvert_433.PNG (54.3 KiB) Viewed 280 times
Norus
Posts: 81
Joined: Tue Oct 13, 2015 9:33 am

Re: unicode error utf-8 using clone CloneConvert.FCMacro

Postby Norus » Sun Sep 15, 2019 12:30 pm

sorry, sorry, I found it. the picture is FCInfo, my mistake.

excuse me.

It works, you saved my day.

norus
User avatar
Kunda1
Posts: 5949
Joined: Thu Jan 05, 2017 9:03 pm

Re: unicode error utf-8 using clone CloneConvert.FCMacro

Postby Kunda1 » Sun Sep 15, 2019 3:45 pm

looo wrote:
Sun Sep 15, 2019 12:13 pm
strange this problem doesn't occure in linux, but I can reproduce with windows.

to fix the issue:
- macros
- select cloneconvert
- press edit
- go to line 433
- replace the <?> with a µ (ctrl m)
I don't see <?> it in the macro source in mario52's gist.

Code: Select all

        self.comboBox.setItemText(7, _translate("MainWindow", "µm", None))         #µm # micro  = 0.001
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
mario52
Posts: 2695
Joined: Wed May 16, 2012 2:13 pm

Re: unicode error utf-8 using clone CloneConvert.FCMacro

Postby mario52 » Sun Sep 15, 2019 5:25 pm

hi

i upgrade the macro cloneConvert and i replace the (the change "grandeur" in comboBox not work)

Code: Select all

self.comboBox.setItemText(7, _translate("MainWindow", "µm", None))         #µm # micro  = 0.001
by (also µm to um many problem)

Code: Select all

self.comboBox.setItemText(7, "um")         #um # micro  = 0.001
now work until

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18213 (Git)
Build type: Release
Branch: master
Hash: 22babc09954ac6fda9135ee71d68550921659b1c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Kunda1 wrote:
Sun Sep 15, 2019 3:45 pm
I don't see <?> it in the macro source in mario52's gist.
see Fehler in Version 0.19 pre ??

try this, download with addonManager the macro ZTest Over 128 , open it with one text editor OpenOffice ... read the file,
after open it with FC macro editor and see the "�" and the error on execute

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.