Macro Circular Text startet nicht

In diesem Forum Fragen und Diskussionen in Deutsch
Forum rules
Foren-Regeln und hilfreiche Informationen

WICHTIG: Bitte zuerst lesen, bevor Sie posten
BigLebowski
Posts: 39
Joined: Fri Apr 26, 2019 7:56 pm

Macro Circular Text startet nicht

Post by BigLebowski »

Hallo,
ich habe FreeCAD 0.18 unter Win10 und habe gestern das Macro Circular Text über den Addon-Manager installiert.
Leider zeigt das Macro nicht sein Eingabefenster an, wenn ich es starte.

Hat jemand eine Idee, was das Problem sein könnte.

Muss gestehen, dass das mein erstes Macro ist, das ich unter FreeCAD benutzen wollte. Zum Test habe ich mal ein anderes Macro
installiert (GenevaWheelGUI), aber das tut einwandfrei.

Herbert
urg
Posts: 56
Joined: Mon Mar 07, 2016 8:40 am

Re: Macro Circular Text startet nicht

Post by urg »

BigLebowski
Posts: 39
Joined: Fri Apr 26, 2019 7:56 pm

Re: Macro Circular Text startet nicht

Post by BigLebowski »

hab ich mir angesehen, aber mein Fehler scheint ein anderer zu sein. Leider kenn ich mich mit Python absolut Null aus....

Das ist der Output im Ausgabefenster:

During initialization the error invalid syntax (dimensioning.py, line 53) occurred in C:\Users\HerbertKoller\AppData\Roaming\FreeCAD\Mod\drawing_dimensioning\InitGui.py
Please look into the log file for further information
GitPython not installed! Cannot retrieve macros from git
GitPython not installed! Cannot retrieve macros from git
<unknown exception traceback><class 'SyntaxError'>: ('invalid syntax', ('C:/Users/HerbertKoller/Documents/hkoller/Temp/Macro_FCCircularText.FCMacro', 1, 1, '<languages/>\n'))
GitPython not installed! Cannot retrieve macros from git
<unknown exception traceback><class 'SyntaxError'>: ("(unicode error) 'utf-8' codec can't decode byte 0xb0 in position 1: invalid start byte", ('C:/Users/HerbertKoller/Documents/hkoller/Temp/FCCircularText.FCMacro', 796, 51, None))
<unknown exception traceback><class 'SyntaxError'>: ("(unicode error) 'utf-8' codec can't decode byte 0xb0 in position 1: invalid start byte", ('C:/Users/HerbertKoller/Documents/hkoller/Temp/FCCircularText.FCMacro', 796, 51, None))
<unknown exception traceback><class 'SyntaxError'>: ("(unicode error) 'utf-8' codec can't decode byte 0xb0 in position 1: invalid start byte", ('C:/Users/HerbertKoller/Documents/hkoller/Temp/FCCircularText.FCMacro', 796, 51, None))

Vielleicht kann damit jemand was anfangen?
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Macro Circular Text startet nicht

Post by wmayer »

Vielleicht kann damit jemand was anfangen?
Der Python-Interpreter bemängelt genau die Zeilen Code in Macro_FCCircularText.FCMacro wie im verlinkten Thread. Es müsste eigentlich dasselbe Problem sein.
BigLebowski
Posts: 39
Joined: Fri Apr 26, 2019 7:56 pm

Re: Macro Circular Text startet nicht

Post by BigLebowski »

Stimmt!!! ;)

Hab den Code jetzt so geändert und es funktioniert:

if verPython.major < 3:
carDegrees = b' \xc2\xb0'.decode("utf-8")
self.DS_InclinaisonX.setSuffix(carDegrees)
self.DS_InclinaisonY.setSuffix(carDegrees)
self.DS_InclinaisonZ.setSuffix(carDegrees)
else:
carDegrees = u" "+chr(176)
self.DS_InclinaisonX.setSuffix(carDegrees)
self.DS_InclinaisonY.setSuffix(carDegrees)
self.DS_InclinaisonZ.setSuffix(carDegrees)
newbie_345
Posts: 2
Joined: Sun May 31, 2020 9:25 am

Re: Macro Circular Text startet nicht

Post by newbie_345 »

hallo,

ich benutze Frecad 0.18, Windows 8, 64bit
und versuche schon seit Tagen dieses Makro zu starten.
Macht immer Fehler in Zeile 152:

PolicePath=cm.get("PolicePath","/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-M.ttf","C:/Windows/Fonts/ARIAL.TTF",".../macfontdir/macfont.ttf")

Die Datei gibt es, allerdings anders geschrieben: Arial.ttf

Spielt das eine Rolle?
Wenn nein, wie aktiviere ich ein Traceback um den Fehler zu finden?
chrisb
Veteran
Posts: 54311
Joined: Tue Mar 17, 2015 9:14 am

Re: Macro Circular Text startet nicht

Post by chrisb »

Das Dateisystem von Linux ist Case-sensitiv, da würde ich schon einen existierenden Font auswählen. Ich habe das allerdings hier mal mit 0.19 probiert und es funktioniert auch nicht, allerdings mit einem anderen Fehler:

Code: Select all

, line 1509, in on_PU_Execute
    depart = time.clock()     # chrono begin
AttributeError: module 'time' has no attribute 'clock'
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21125 (Git)
Build type: Release
Branch: master
Hash: 40600a55c2fe71ff589be677f6e427ccc937d003
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54311
Joined: Tue Mar 17, 2015 9:14 am

Re: Macro Circular Text startet nicht

Post by chrisb »

In 0.18 funktioniert es noch.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54311
Joined: Tue Mar 17, 2015 9:14 am

Re: Macro Circular Text startet nicht

Post by chrisb »

Ich sehe gerade, dass Du Windows nutzt, während der Pfad schwer nach Linux aussieht. Hast Du mal einen Zeichensatz über den Button ausgewählt?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mario52
Veteran
Posts: 4701
Joined: Wed May 16, 2012 2:13 pm

Re: Macro Circular Text startet nicht

Post by mario52 »

hi
newbie_345 wrote: Sun May 31, 2020 9:37 am hallo,

ich benutze Frecad 0.18, Windows 8, 64bit
und versuche schon seit Tagen dieses Makro zu starten.
Macht immer Fehler in Zeile 152:

PolicePath=cm.get("PolicePath","/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-M.ttf","C:/Windows/Fonts/ARIAL.TTF",".../macfontdir/macfont.ttf")

Die Datei gibt es, allerdings anders geschrieben: Arial.ttf

Spielt das eine Rolle?
Wenn nein, wie aktiviere ich ein Traceback um den Fehler zu finden?
tray with this line

Code: Select all

PolicePath=cm.get("PolicePath","/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-M.ttf","C:/Windows/Fonts/ARIAL.TTF","/Library/Fonts/Arial.ttf")
chrisb wrote: Sun May 31, 2020 10:06 am Das Dateisystem von Linux ist Case-sensitiv, da würde ich schon einen existierenden Font auswählen. Ich habe das allerdings hier mal mit 0.19 probiert und es funktioniert auch nicht, allerdings mit einem anderen Fehler:

Code: Select all

, line 1509, in on_PU_Execute
    depart = time.clock()     # chrono begin
AttributeError: module 'time' has no attribute 'clock'
comment the lines 1509 and 1697, 1698, 1699, 1700 for obtention

Code: Select all

#        depart = time.clock()     # chrono begin
.
.
.
#        #### Chrono end ####################################
#        arrivee = time.clock()                                                                    # chrono end
#        App.Console.PrintMessage("Time : "+str("%.2f" % ((arrivee - depart)/60))+" min"+"\n\n")   # chrono end
#        ####################################################

wait 1 or 2 days I finish the upgrade with PySide2, gridlayout, new comboBox (matplotlib) and the problem in Linux with

Code: Select all

PolicePath=cm.get("PolicePath","/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-M.ttf","C:/Windows/Fonts/ARIAL.TTF","/Library/Fonts/Arial.ttf")
! ! ! hé oui

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Post Reply