glFT export fail (update with:) when Thonny (Python IDE) is installed with NumPy package #73825

Closed
opened 2020-02-15 05:26:20 +01:00 by Samuel Santos · 15 comments

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: 77d23b0bd7
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

**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: `77d23b0bd7` 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 ```
Author

Added subscriber: @SamuelTelles

Added subscriber: @SamuelTelles
Samuel Santos changed title from glFT export fail to glFT export fail when Thonny (Python IDE) is installed with NumPy package 2020-02-15 06:16:28 +01:00
Samuel Santos changed title 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 2020-02-15 06:18:24 +01:00
Author

(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.

**(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.

Added subscriber: @brecht

Added subscriber: @brecht

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

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

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Can you trying installing python 64 bit instead?

Can you trying installing python 64 bit instead?
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

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

It should not be looking outisde the blender folder for addons ever since 7c2f0074f3 can you still reproduce this on the latest buildbot ?
Author
  • 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.
- 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.
Member

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

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

No, it does not.

(I didn' know about this)

No, it does not. (I didn' know about this)

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

This issue was referenced by 79a58eef05

This issue was referenced by 79a58eef059ffc3f12d11bd68938cfb1b4cd2462

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Brecht Van Lommel self-assigned this 2020-04-16 16:06:29 +02:00
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
6 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#73825
No description provided.