io_scene_x3d - WRL import fails when Python 3.11 is used #106210

Closed
opened 2023-03-28 09:05:32 +02:00 by Michael-Billington · 1 comment

System Information
Operating system: Linux-6.1.0-6-amd64-x86_64-with-glibc2.36 64 Bits
Graphics card: AMD Radeon RX 580 Series (polaris10, LLVM 15.0.6, DRM 3.49, 6.1.0-6-amd64) AMD 4.6 (Core Profile) Mesa 22.3.6

Blender Version
Broken: version: 3.4.1 - Debian package installed via apt on testing distribution ("bookworm")
Worked: Official release of Blender 3.4.1 is unaffected.

Short description of error

The io_scene_x3d plugin uses a flag which was removed in Python 3.11 when importing WRL files.

The soon-to-be-released Debian Bookworm ships with Python 3.11, and when I attempt to import any WRL file, it appears to do nothing. An error is however printed on the command-line, 'ValueError: invalid mode: 'rU' - full output is attached.

Removing the character U from the line identified in the stacktrace restored the ability to complete a WRL import for me - diff also attached.

Posting this on the assumption that support for newer Python versions is desirable in add-ons - I'm aware that 3.10 is the shipped/supported version of Python for Blender 3.4.

Exact steps for others to reproduce the error

Install blender via the apt package manager on Debian bookworm, or switch to a Python 3.11 interpreter in some easier way if possible.

Launch from command-line.

From default cube, File -> Import -> X3D Extensible 3D (.x3d/.wrl).

Select the test.wrl file attached to this issue. I don't believe this issue is file-specific, but this is a model of an electronic component from the KiCad project, and I've attached a picture FreeCAD opening the file just to indicate that it is not empty/corrupt.

Observe nothing happens, and error is printed on command-line.

Apply fix, restart blender, repeat import.

Observe that the model now imports.

**System Information** Operating system: Linux-6.1.0-6-amd64-x86_64-with-glibc2.36 64 Bits Graphics card: AMD Radeon RX 580 Series (polaris10, LLVM 15.0.6, DRM 3.49, 6.1.0-6-amd64) AMD 4.6 (Core Profile) Mesa 22.3.6 **Blender Version** Broken: version: 3.4.1 - Debian package installed via `apt` on testing distribution ("bookworm") Worked: Official release of Blender 3.4.1 is unaffected. **Short description of error** The `io_scene_x3d` plugin uses a flag which was [removed in Python 3.11](https://docs.python.org/3/whatsnew/3.11.html#porting-to-python-3-11) when importing WRL files. The soon-to-be-released Debian Bookworm ships with Python 3.11, and when I attempt to import any WRL file, it appears to do nothing. An error is however printed on the command-line, `'ValueError: invalid mode: 'rU'` - full output is attached. Removing the character `U` from the line identified in the stacktrace restored the ability to complete a WRL import for me - diff also attached. Posting this on the assumption that support for newer Python versions is desirable in add-ons - I'm aware that 3.10 is the shipped/supported version of Python for Blender 3.4. **Exact steps for others to reproduce the error** Install blender via the `apt` package manager on Debian bookworm, or switch to a Python 3.11 interpreter in some easier way if possible. Launch from command-line. From default cube, File -> Import -> X3D Extensible 3D (.x3d/.wrl). Select the `test.wrl` file attached to this issue. I don't believe this issue is file-specific, but this is a model of an electronic component from the KiCad project, and I've attached a picture FreeCAD opening the file just to indicate that it is not empty/corrupt. Observe nothing happens, and error is printed on command-line. Apply fix, restart blender, repeat import. Observe that the model now imports.
Michael-Billington added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-03-28 09:05:33 +02:00

Apologies, I've posted this on the wrong repo.

Closing this - and I've re-posted it over at blender/blender-addons#104510

Apologies, I've posted this on the wrong repo. Closing this - and I've re-posted it over at https://projects.blender.org/blender/blender-addons/issues/104510
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-03-28 10:38:08 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
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
1 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#106210
No description provided.