Page MenuHome

glFT export fail (update with:) when Thonny (Python IDE) is installed with NumPy package
Needs Developer to Reproduce, NormalPublic

Description

System Information
Operating system: Windows-10-10.0.17763-SP0 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.66

Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash: rB77d23b0bd76f
Worked: (optional)

Short description of error
I'm not sure why I'm having this problem but seems like impossible to me to export any glTF file. I tried Binary, Embedded and Separate, with different setting and everyone failed with the default cube.

Exact steps for others to reproduce the error
Just open default blender and: File -> Export -> glTF 2.0 -> Export glTF 2.0

I tried in different blender versions (2.81, 2.82, 2.83) and always have the same problem. I'll past bellow the long error message I received:

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_scene_gltf2\__init__.py", line 378, in execute
    from .blender.exp import gltf2_blender_export
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 22, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 19, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather_nodes
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 24, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather_mesh
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_mesh.py", line 20, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather_primitives
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_primitives.py", line 25, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather_materials
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials.py", line 20, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather_texture_info, gltf2_blender_export_keys
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_texture_info.py", line 19, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather_texture
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_texture.py", line 22, in <module>
    from io_scene_gltf2.blender.exp import gltf2_blender_gather_image
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_image.py", line 19, in <module>
    import numpy as np
  File "C:\Users\Samuel\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 140, in <module>
    from . import _distributor_init
  File "C:\Users\Samuel\AppData\Roaming\Python\Python37\site-packages\numpy\_distributor_init.py", line 26, in <module>
    WinDLL(os.path.abspath(filename))
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\python\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 não é um aplicativo Win32 válido

location: <unknown location>:-1

Event Timeline

Samuel Santos (samuelsantos) renamed this task from glFT export fail to glFT export fail when Thonny (Python IDE) is installed with NumPy package.Feb 15 2020, 6:16 AM
Samuel Santos (samuelsantos) renamed this task from glFT export fail when Thonny (Python IDE) is installed with NumPy package to glFT export fail (update with:) when Thonny (Python IDE) is installed with NumPy package.
Samuel Santos (samuelsantos) updated the task description. (Show Details)

(Update)

I did some investigation around and found out the problem was with the Python IDE installed with the NumPy package. Don't know and don't understand why but when you install the package in Thonny, the software creates this folder in this location:

C:\Users\Samuel\AppData\Roaming\Python\Python37\site-packages\numpy

And Blender start failing to export glTF. The problem was quite difficult to track because even uninstalling Thonny, this folder remains (even utilizing the Revo Uninstall to track missing files from regular uninstall).

So don't know if it is a Thonny problem (creating folders in the wrong place), or Blender problem (accepting that folder as "original" NumPy), but I can work around the problem just temporarily renaming that folder, and naming back everytime I want to use Thonny again. it's a dirty trick but works.

Even though the problem is not in the Blender side, it's here documented to anybody else that can face this.

This error can happen when using 32-bit Python modules in a 64-bit Blender. The default Windows download for Python is 32-bit.

Aaron Carlisle (Blendify) changed the task status from Needs Triage to Needs Information from User.Feb 17 2020, 6:56 PM

Can you trying installing python 64 bit instead?

It should not be looking outisde the blender folder for addons ever since rB7c2f0074f3fe2411daa7a6e351d7cbc535246871 can you still reproduce this on the latest buildbot ?

  • Unfortunately the Thonny IDE doesn't allow to choose which Python to Install. I don't have Python installed manually anymore and didn't have this problem with Python 3.7 64 bit when I did. And I did another workaround using Thonny's feature virtual environment (I know it's Python feature, but the IDE allow to manage it).
  • I tried the "latest buildbot" (blender-2.83-d0c159ae9745-windows64) and the problem persist.

When you start blender with the blender_debug_log.cmd batch file located in the blender folder, does it work?

No, it does not.

(I didn' know about this)

Campbell Barton (campbellbarton) changed the task status from Needs Information from User to Needs Developer to Reproduce.Feb 28 2020, 1:59 AM