Traceback Error on FBX Export #105879

Closed
opened 2023-03-18 14:44:02 +01:00 by Nik-Williams · 3 comments

System Information
Operating system: Windows
Graphics card: NVIDIA GeForce RTX 3060

Blender Version
Broken: 2.91.1,2.93LTS,3.4
Worked: Worked in 2.91.2 on a other file, not this one though.

Short description of error
Every time I try to export my file to a fbx I get the same group of python errors in all 3 versions.
Exact steps for others to reproduce the error
Try to export the file I will be attaching to an FBX to get this error.

**System Information** Operating system: Windows Graphics card: NVIDIA GeForce RTX 3060 **Blender Version** Broken: 2.91.1,2.93LTS,3.4 Worked: Worked in 2.91.2 on a other file, not this one though. **Short description of error** Every time I try to export my file to a fbx I get the same group of python errors in all 3 versions. **Exact steps for others to reproduce the error** Try to export the file I will be attaching to an FBX to get this error.
Nik-Williams added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2023-03-18 14:44:02 +01:00
Author

Here is the exact error:
Python: Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx_init_.py", line 655, in execute
return export_fbx_bin.save(self, context, **keywords)
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3240, in save
ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod)
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3131, in save_single
fbx_objects_elements(root, scene_data)
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2929, in fbx_objects_elements
fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes)
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1176, in fbx_data_mesh_elements
elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv_id] for uv_id in _uvtuples_gen(t_luv, t_lvidx)))
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\fbx_utils.py", line 494, in elem_data_single_int32_array
return _elem_data_single(elem, name, value, "add_int32_array")
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\fbx_utils.py", line 441, in _elem_data_single
getattr(sub_elem, func_name)(value)
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\encode_bin.py", line 143, in add_int32_array
data = array.array(data_types.ARRAY_INT32, data)
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1176, in
elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv_id] for uv_id in _uvtuples_gen(t_luv, t_lvidx)))
KeyError: ((nan, nan), 6)

Here is the exact error: Python: Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\__init__.py", line 655, in execute return export_fbx_bin.save(self, context, **keywords) File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3240, in save ret = save_single(operator, context.scene, depsgraph, filepath, **kwargs_mod) File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 3131, in save_single fbx_objects_elements(root, scene_data) File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 2929, in fbx_objects_elements fbx_data_mesh_elements(objects, me_obj, scene_data, done_meshes) File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1176, in fbx_data_mesh_elements elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv_id] for uv_id in _uvtuples_gen(t_luv, t_lvidx))) File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\fbx_utils.py", line 494, in elem_data_single_int32_array return _elem_data_single(elem, name, value, "add_int32_array") File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\fbx_utils.py", line 441, in _elem_data_single getattr(sub_elem, func_name)(value) File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\encode_bin.py", line 143, in add_int32_array data = array.array(data_types.ARRAY_INT32, data) File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\addons\io_scene_fbx\export_fbx_bin.py", line 1176, in <genexpr> elem_data_single_int32_array(lay_uv, b"UVIndex", (uv2idx[uv_id] for uv_id in _uvtuples_gen(t_luv, t_lvidx))) KeyError: ((nan, nan), 6)
Member

Hi, thanks for the report. Issue is caused due to invalid mesh data.
Running Mesh.validate through python console will identify and fix the corrupted mesh.
It'll be helpful to know how this .blend file was created from scratch. Did you import the model from other software?
We already have an open report for this: #102783
So closing this as duplicate. Feel free to share relevant information in linked report.

import bpy
for obj in bpy.data.objects:
    if obj.type == "MESH" and obj.data is not None:
        if obj.data.validate(verbose=True):
            print(f"Error found: object {obj.name} had invalid mesh data!")
Hi, thanks for the report. Issue is caused due to invalid mesh data. Running [Mesh.validate](https://docs.blender.org/api/current/bpy.types.Mesh.html#bpy.types.Mesh.validate) through python console will identify and fix the corrupted mesh. It'll be helpful to know how this .blend file was created from scratch. Did you import the model from other software? We already have an open report for this: #102783 So closing this as duplicate. Feel free to share relevant information in linked report. ``` import bpy for obj in bpy.data.objects: if obj.type == "MESH" and obj.data is not None: if obj.data.validate(verbose=True): print(f"Error found: object {obj.name} had invalid mesh data!") ```
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-03-19 03:08:01 +01:00
Pratik Borhade added
Status
Duplicate
and removed
Status
Archived
labels 2023-03-19 03:08:11 +01:00
Author

It was made from scratch. Thanks for the info.

It was made from scratch. Thanks for the info.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#105879
No description provided.