Page MenuHome

FBX export error due to invalid imported UVs
Closed, ResolvedPublic

Description

I tried to export a fbx. and this error kept showing up....can anybody can help me?
\

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\__init__.py", line 620, in execute
    return export_fbx_bin.save(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3083, in save
    ret = save_single(operator, context.scene, filepath, **kwargs_mod)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2990, in save_single
    fbx_objects_elements(root, scene_data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2789, in fbx_objects_elements
    fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in fbx_data_mesh_elements
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 498, in elem_data_single_int32_array
    return _elem_data_single(elem, name, value, "add_int32_array")
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 445, in _elem_data_single
    getattr(sub_elem, func_name)(value)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\encode_bin.py", line 161, in add_int32_array
    data = array.array(data_types.ARRAY_INT32, data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in <genexpr>
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
KeyError: (nan, nan)

location: <unknown location>:-1

bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
bpy.ops.object.select_all(action='DESELECT')
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\__init__.py", line 620, in execute
    return export_fbx_bin.save(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3083, in save
    ret = save_single(operator, context.scene, filepath, **kwargs_mod)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2990, in save_single
    fbx_objects_elements(root, scene_data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2789, in fbx_objects_elements
    fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in fbx_data_mesh_elements
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 498, in elem_data_single_int32_array
    return _elem_data_single(elem, name, value, "add_int32_array")
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 445, in _elem_data_single
    getattr(sub_elem, func_name)(value)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\encode_bin.py", line 161, in add_int32_array
    data = array.array(data_types.ARRAY_INT32, data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in <genexpr>
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
KeyError: (nan, nan)

location: <unknown location>:-1

bpy.ops.object.editmode_toggle()
bpy.ops.object.editmode_toggle()
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\__init__.py", line 620, in execute
    return export_fbx_bin.save(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3083, in save
    ret = save_single(operator, context.scene, filepath, **kwargs_mod)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2990, in save_single
    fbx_objects_elements(root, scene_data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2789, in fbx_objects_elements
    fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in fbx_data_mesh_elements
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 498, in elem_data_single_int32_array
    return _elem_data_single(elem, name, value, "add_int32_array")
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 445, in _elem_data_single
    getattr(sub_elem, func_name)(value)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\encode_bin.py", line 161, in add_int32_array
    data = array.array(data_types.ARRAY_INT32, data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in <genexpr>
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
KeyError: (nan, nan)

location: <unknown location>:-1

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\__init__.py", line 620, in execute
    return export_fbx_bin.save(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3083, in save
    ret = save_single(operator, context.scene, filepath, **kwargs_mod)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2990, in save_single
    fbx_objects_elements(root, scene_data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2789, in fbx_objects_elements
    fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in fbx_data_mesh_elements
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 498, in elem_data_single_int32_array
    return _elem_data_single(elem, name, value, "add_int32_array")
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 445, in _elem_data_single
    getattr(sub_elem, func_name)(value)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\encode_bin.py", line 161, in add_int32_array
    data = array.array(data_types.ARRAY_INT32, data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in <genexpr>
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
KeyError: (nan, nan)

location: <unknown location>:-1

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\__init__.py", line 620, in execute
    return export_fbx_bin.save(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3083, in save
    ret = save_single(operator, context.scene, filepath, **kwargs_mod)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2990, in save_single
    fbx_objects_elements(root, scene_data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2789, in fbx_objects_elements
    fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in fbx_data_mesh_elements
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 498, in elem_data_single_int32_array
    return _elem_data_single(elem, name, value, "add_int32_array")
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 445, in _elem_data_single
    getattr(sub_elem, func_name)(value)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\encode_bin.py", line 161, in add_int32_array
    data = array.array(data_types.ARRAY_INT32, data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in <genexpr>
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
KeyError: (nan, nan)

location: <unknown location>:-1

bpy.context.scene.render.use_antialiasing = False
bpy.context.scene.render.use_overwrite = False
bpy.context.scene.render.use_file_extension = False
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\__init__.py", line 620, in execute
    return export_fbx_bin.save(self, context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3083, in save
    ret = save_single(operator, context.scene, filepath, **kwargs_mod)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2990, in save_single
    fbx_objects_elements(root, scene_data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2789, in fbx_objects_elements
    fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in fbx_data_mesh_elements
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 498, in elem_data_single_int32_array
    return _elem_data_single(elem, name, value, "add_int32_array")
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\fbx_utils.py", line 445, in _elem_data_single
    getattr(sub_elem, func_name)(value)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\encode_bin.py", line 161, in add_int32_array
    data = array.array(data_types.ARRAY_INT32, data)
  File "C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1105, in <genexpr>
    elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv] for uv in _uvtuples_gen(t_luv)))
KeyError: (nan, nan)

location: <unknown location>:-1

Event Timeline

Philipp Oeser (lichtwerk) triaged this task as Incomplete priority.

To be able to reproduce, we need the blendfile you are exporting from.

Marking as incomplete until the blendfile is uploaded here...

Philipp Oeser (lichtwerk) renamed this task from Blender error to FBX export error.Fri, Nov 16, 9:27 AM

Here you go, hopefully it works...

Bastien Montagne (mont29) raised the priority of this task from Incomplete to Confirmed.
Bastien Montagne (mont29) updated the task description. (Show Details)

Importing that FBX we get several NAN coordinates in UVmaps… think real issue here (besides the fact that the orig FBX files has such values…) is that our validate() mesh method does not check on NAN values, will investigate…

Bastien Montagne (mont29) renamed this task from FBX export error to FBX export error due to invalid imported UVs.Mon, Dec 3, 4:25 PM