ValueError: cannot convert float NaN to integer
See original GitHub issueDescribe the bug I attached the file that I cannot export and it took me 3 hours to find the problem because the script does not indicate the object that creates problems. but it generates a generic report, this is something that is not a big problem with a few objects but with my file with over 1700 objects it was difficult to locate the object.
Python: Traceback (most recent call last):
File "/home/root/Software/blender-2.93.3/2.93/scripts/addons/io_scene_gltf2/__init__.py", line 626, in execute
return gltf2_blender_export.save(context, export_settings)
File "/home/root/Software/blender-2.93.3/2.93/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 46, in save
json, buffer = __export(export_settings)
File "/home/root/Software/blender-2.93.3/2.93/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 66, in __export
json = __fix_json(exporter.glTF.to_dict())
File "/home/root/Software/blender-2.93.3/2.93/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 109, in __fix_json
fixed[key] = __fix_json(value)
File "/home/root/Software/blender-2.93.3/2.93/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 113, in __fix_json
fixed.append(__fix_json(value))
File "/home/root/Software/blender-2.93.3/2.93/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 109, in __fix_json
fixed[key] = __fix_json(value)
File "/home/root/Software/blender-2.93.3/2.93/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 113, in __fix_json
fixed.append(__fix_json(value))
File "/home/root/Software/blender-2.93.3/2.93/scripts/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py", line 116, in __fix_json
if int(obj) == obj:
ValueError: cannot convert float NaN to integer
location: <unknown location>:-1
.blend file/ .gltf Nan-float.blend.tar.gz
Version
- OS: Linux
- Blender Version LTS 2.93.2 and the latest under development v3.00 daily build
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Pandas: ValueError: cannot convert float NaN to integer
The "x" is a column in the csv file, I cannot spot any float NaN in the file, and I don't understand the...
Read more >ValueError: cannot convert float NaN ... - Net-Informations.Com
NaN is short for Not a Number . It is a numeric data type used to represent any value that is undefined or...
Read more >How to Fix: ValueError: cannot convert float NaN to integer
This error occurs when you attempt to convert a column in a pandas DataFrame from a float to an integer, yet the column...
Read more >How to Fix: ValueError: cannot convert float NaN to integer
In Python, NaN stands for Not a Number. This error will occur when we are converting the dataframe column of the float type...
Read more >valueerror: cannot convert float nan to integer ( Solved )
There are many times when a programmer raises an exception that is the ValueError. You can get this error when you give a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pafurijaz Thanks a lot. It seems to solve the issue
I got an answer, from the developers, and with this command executed in the python console in object mode C.active_object.data.validate(verbose=True) I was able to solve the problem by identifying the problem and eliminating the vertices which are actually very few (14) Maybe this could be useful to create a solution in these cases.