Bug #899

FBX exporter does not support non-ASCII characters

Added by Jonas Hauquier over 3 years ago. Updated about 2 years ago.

Status:AcceptedStart date:06/07/2015
Priority:NormalDue date:
Assignee:Jonas Hauquier% Done:

0%

Category:File export
Target version:MakeHuman 1.1.2

Description

If the filename for an FBX export contains non-ASCII characters, it crashes:

Write FBX file /home/duststorm/makehuman/v1/exports/sometestå.fbx
Exception during event onFileSelected
Traceback (most recent call last):
  File "./core/events3d.py", line 212, in callEvent
    method(event)
  File "./apps/gui/guiexport.py", line 113, in onFileSelected
    exporter.export(gui3d.app.selectedHuman, filename)
  File "plugins/9_export_fbx/__init__.py", line 106, in export
    mh2fbx.exportFbx(filename("fbx"), cfg)
  File "plugins/9_export_fbx/mh2fbx.py", line 156, in exportFbx
    fbx_mesh.writeObjectProps(fp, meshes, config)
  File "plugins/9_export_fbx/fbx_mesh.py", line 90, in writeObjectProps
    writeGeometryProp(fp, mesh, config)
  File "plugins/9_export_fbx/fbx_mesh.py", line 127, in writeGeometryProp
    '            a: %s\n' % indexString +
  File "plugins/9_export_fbx/fbx_utils_bin.py", line 430, in get_ascii_properties
    result.append( indent*'    ' + get_ascii_property(name, ptype, value, animatable, custom) )
  File "plugins/9_export_fbx/fbx_utils_bin.py", line 448, in get_ascii_property
    return 'P: "%s", "%s", "%s", "%s", %s' % (name, ptype[0], ptype[1], flags, (','.join([str(v) for v in value])))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 9: ordinal not in range(128)

Binary mode:

Exception during event onFileSelected
Traceback (most recent call last):
  File "./core/events3d.py", line 212, in callEvent
    method(event)
  File "./apps/gui/guiexport.py", line 113, in onFileSelected
    exporter.export(gui3d.app.selectedHuman, filename)
  File "plugins/9_export_fbx/__init__.py", line 106, in export
    mh2fbx.exportFbx(filename("fbx"), cfg)
  File "plugins/9_export_fbx/mh2fbx.py", line 156, in exportFbx
    fbx_mesh.writeObjectProps(fp, meshes, config)
  File "plugins/9_export_fbx/fbx_mesh.py", line 90, in writeObjectProps
    writeGeometryProp(fp, mesh, config)
  File "plugins/9_export_fbx/fbx_mesh.py", line 108, in writeGeometryProp
    fbx_binary.fbx_data_mesh_element(elem, key, id, properties, coord, mesh.fvert, mesh.vnorm, mesh.texco, mesh.fuvs)
  File "plugins/9_export_fbx/fbx_binary.py", line 257, in fbx_data_mesh_element
    geom.add_string(fbx_name_class(key.encode()))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 18: ordinal not in range(128)


Related issues

Related to MakeHuman - Bug #892: FBX Export Testing New 06/01/2015
Related to MakeHuman - Bug #909: Make sure all issues with non-ascii path names have been ... Rejected 06/11/2015
Related to MakeHuman - Feature #993: Preparing for MakeHuman 1.1 release Rejected 02/07/2016
Related to MakeHuman - Bug #1004: RC and recent HG builds - file loader does not populate Fixed 03/10/2016
Related to MakeHuman - Bug #1016: Exception after smoothing model Fixed 04/22/2016

History

#1 Updated by Jonas Hauquier over 3 years ago

I tested all other exporters with non-ASCII names and they work fine.

#2 Updated by Rob Baer over 3 years ago

  • Related to Bug #892: FBX Export Testing added

#3 Updated by Rob Baer over 3 years ago

Sorry - mis-posted to wrong issue

#4 Updated by Rob Baer almost 3 years ago

Still a problem at r1999. As per Jonas, all other exporters and save function work as expected with non-ascii characters.

#5 Updated by Rob Baer almost 3 years ago

This should be fixed if at all possible for MH 1.1.0, but if not it could be part of a patch release.

#6 Updated by Rob Baer almost 3 years ago

  • Related to Bug #909: Make sure all issues with non-ascii path names have been stomped out for 1.0.x too added

#7 Updated by Rob Baer almost 3 years ago

  • Related to Feature #993: Preparing for MakeHuman 1.1 release added

#8 Updated by Rob Baer almost 3 years ago

  • Related to Bug #1004: RC and recent HG builds - file loader does not populate added

#9 Updated by Rob Baer over 2 years ago

  • Related to Bug #1016: Exception after smoothing model added

#10 Updated by Joel Palmius over 2 years ago

Deferring to 1.1.1

#11 Updated by Joel Palmius over 2 years ago

  • Target version changed from MakeHuman 1.1.0 to MakeHuman 1.1.1

#12 Updated by Joel Palmius about 2 years ago

  • Target version changed from MakeHuman 1.1.1 to MakeHuman 1.1.2

Also available in: Atom