corrected
thank you for the report
Code: Select all
texte = unicode(self.textEdit.toPlainText())
App.Console.PrintMessage(u"texte " + unicode(texte)+"\n")
EDIT 15/05/2015 20h34 Paris
replace link to github
mario
Code: Select all
texte = unicode(self.textEdit.toPlainText())
App.Console.PrintMessage(u"texte " + unicode(texte)+"\n")
Code: Select all
New Font /usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-M.ttf
Traceback (most recent call last):
File "/home/normand2/Dessins/Macros_FreeCAD/Macro_FCCircularText.FCMacro", line 1277, in on_PU_Execute
ss=Draft.makeShapeString(String=texte[ii2],FontFile=PolicePath,Size=SizeCaractere,Tracking=0)
File "/usr/lib/freecad/Mod/Draft/Draft.py", line 2413, in makeShapeString
obj.FontFile = FontFile
TypeError: Property 'FontFile': type must be str or unicode, not QString
the error give one str or unicode i replace texte[ii2] to unicode(texte[ii2])TypeError: Property 'FontFile': type must be str or unicode, not QString
Code: Select all
ss=Draft.makeShapeString(String=unicode(texte[ii2]),FontFile=PolicePath,Size=SizeCaractere,Tracking=0)
Mario,mario52 wrote:I tried with this version and no problem with or not modify but FreeCAD 0.14.2935 (Git) (with
this is your version of Linux ?
Code: Select all
<unknown exception traceback><type 'exceptions.SyntaxError'>: ("(unicode error) 'utf8' codec can't decode byte 0xb0 in position 0: invalid start byte", ('/home/normand2/Dessins/Macros_FreeCAD/Macro_FCCircularText.FCMacro', 621, None, 'self.DS_InclinaisonX.setSuffix(" X\xb0")\n'))
Code: Select all
<unknown exception traceback><type 'exceptions.SyntaxError'>: ("(unicode error) 'utf8' codec can't decode byte 0xb0 in position 0: invalid start byte", ('/home/normand2/.FreeCAD/Macros/Macro_FCCircularText.FCMacro', 621, None, 'self.DS_InclinaisonX.setSuffix(" X\xb0")\n'))
Code: Select all
self.DS_InclinaisonX.setSuffix (unicode ("X°"))
self.DS_InclinaisonY.setSuffix (unicode ("Y°"))
self.DS_InclinaisonZ.setSuffix (unicode ("Z°"))
Code: Select all
self.DS_InclinaisonX.setSuffix(unicode(" X°"))
self.DS_InclinaisonY.setSuffix(unicode(" Y°"))
self.DS_InclinaisonZ.setSuffix(unicode(" Z°"))
Thanks Mario, to paraphrase your macro's default text: you're the best!mario52 wrote:For your new mistake you can replace lines 621,622,623 by those below
Code: Select all
MainWindow.setWindowFlags(PyQt4.QtCore.Qt.WindowStaysOnTopHint) # PyQt4 cette fonction met la fen\EAtre en avant
except Exception:
MainWindow.setWindowFlags(PySide.QtCore.Qt.WindowStaysOnTopHint) # PySide cette fonction met la fen\EAtre en avant
If you created your LibeUSB key in persistent mode, you should be able to do software updates just like a regular install. Then it's just a matter of adding either of the FreeCAD PPA (Stable or Daily) to your software sources. After that you can open the Update Manager (Gestionnaire de mises à jour) to update your software packages. But I haven't used a LiveUSB in a long time.mario52 wrote:I work with Ubuntu http://www.linuxliveusb.com/ USB key if I use the live mode, I do not know how to update
that's exactly what I do et ça fonctionne très bien (an updated take much time)NormandC wrote:If you created your LibeUSB key in persistent mode, you should be able to do software updates just like a regular install. Then it's just a matter of adding either of the FreeCAD PPA (Stable or Daily) to your software sources. After that you can open the Update Manager (Gestionnaire de mises à jour) to update your software packages. But I haven't used a LiveUSB in a long time.
Theoretically this is a file to be opened in a Python environment for other publishers must follow the rules of the editor used (select the right encoding)NormandC wrote:When I open your macro with a text editor, I'm getting a warning: