Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 5bf01fd

Browse files
dietmarwOpenModelica-Hudson
authored andcommitted
format expects string and encode not needed
Belonging to [master]: - #2681
1 parent b102b48 commit 5bf01fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Examples/generate_icons.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def getGraphicsForClass(modelicaClass):
254254
graphicsObj['fillPattern'] = g[11]
255255
graphicsObj['lineThickness'] = float(g[12])
256256
graphicsObj['extent'] = [[float(g[13]), float(g[14])], [float(g[15]), float(g[16])]]
257-
graphicsObj['textString'] = g[17].strip('"').encode('utf-8')
257+
graphicsObj['textString'] = g[17].strip('"')
258258
graphicsObj['fontSize'] = float(g[18])
259259
graphicsObj['fontName'] = g[19]
260260
if graphicsObj['fontName']:
@@ -335,7 +335,7 @@ def getGraphicsWithPortsForClass(modelicaClass):
335335
try:
336336
comp_annotation = ask_omc('getNthComponentAnnotation', modelicaClass + ', ' + str(comp_id))['SET2']['Set1']
337337
except KeyError as ex:
338-
logger.error('KeyError: {0} componentName: {1} {2}'.format(modelicaClass, component_name, ex.message))
338+
logger.error('KeyError: {0} componentName: {1} {2}'.format(modelicaClass, component_name, str(ex)))
339339
continue
340340

341341
# base class graphics for ports

0 commit comments

Comments
 (0)