module 'bpy_extras' has no attribute 'image_utils' #128912

Closed
opened 2024-10-12 07:18:25 +02:00 by RedHaloStudio · 4 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 561.09

Blender Version
Broken: version: 4.4.0 Alpha, branch: main, commit date: 2024-10-11 22:25, hash: 6ff33b7e9290
Broken: 4.3.0
Worked: 4.2.2

Short description of error
In Blender 4.3 and higher, the bpy_extras python module is missing image_utils

Exact steps for others to reproduce the error

  • Open the Python console in Blender.
  • Run import bpy_extras
  • Run print(dir(bpy_extras)) and notice that image_utils isn't in the list.
**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 561.09 **Blender Version** Broken: version: 4.4.0 Alpha, branch: main, commit date: 2024-10-11 22:25, hash: `6ff33b7e9290` Broken: 4.3.0 Worked: 4.2.2 **Short description of error** In Blender 4.3 and higher, the bpy_extras python module is missing `image_utils` **Exact steps for others to reproduce the error** - Open the Python console in Blender. - Run `import bpy_extras` - Run `print(dir(bpy_extras))` and notice that `image_utils` isn't in the list.
RedHaloStudio added the
Status
Needs Triage
Severity
Normal
Type
Bug
labels 2024-10-12 07:18:26 +02:00
Member

I can confirm the issue. Setting to high severity as it is a regression, and I can't find any mentions of changes in the release notes, and the .py file still seems to be present.

System Information
Operating system: Windows-10-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 561.09
Blender version: 4.3.0 Beta, branch: blender-v4.3-release, commit date: 2024-10-11 22:23, hash: bcf6524ca1ee

I can confirm the issue. Setting to high severity as it is a regression, and I can't find any mentions of changes in the release notes, and the .py file still seems to be present. **System Information** Operating system: Windows-10-10.0.22631-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 561.09 Blender version: 4.3.0 Beta, branch: blender-v4.3-release, commit date: 2024-10-11 22:23, hash: `bcf6524ca1ee`
Alaska added
Module
Python API
Severity
High
Status
Confirmed
and removed
Severity
Normal
Status
Needs Triage
labels 2024-10-12 12:51:15 +02:00
Alaska added this to the 4.3 milestone 2024-10-12 13:28:13 +02:00
Member

Bisecting points to 6cbdf0223b as the cause. But it's not clear to me why it's having a impact. CC @ideasman42

Bisecting points to 6cbdf0223b69bbb30d3b55bcbf125ccfa97ff64e as the cause. But it's not clear to me why it's having a impact. CC @ideasman42
Member

If the bpy_extras.image_utils module has not been imported already by something else, then image_utils will not be present as an attribute of bpy_extras.

If the intention is to use the bpy_extras.image_utils module, the bpy_extras.image_utils module should be imported. Not importing the module and expecting it to be present is a user error in my opinion.

This behaviour is not limited to Blender, for example, here is the same situation with numpy.matlib:
image

If the `bpy_extras.image_utils` module has not been imported already by something else, then `image_utils` will not be present as an attribute of `bpy_extras`. If the intention is to use the `bpy_extras.image_utils` module, the `bpy_extras.image_utils` module should be imported. Not importing the module and expecting it to be present is a user error in my opinion. This behaviour is not limited to Blender, for example, here is the same situation with `numpy.matlib`: ![image](/attachments/85ec7ea1-0e28-4fa5-8aa9-2317f827547f)

As noted by @Mysteryem

This isn't a bug as the module needs to be explicitly imported.

As noted by @Mysteryem This isn't a bug as the module needs to be explicitly imported.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-10-14 00:55:16 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
4 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#128912
No description provided.