Impossible to enable the add-on #105049

Open
opened 2023-12-08 13:51:59 +01:00 by Nicolas-DUCHENE · 5 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.23

Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b727
Worked: (newest version of Blender that worked as expected)

Addon Information
Name: 3D-Print Toolbox ()
Author: Campbell Barton

Short description of error
[Please fill out a short description of the error here]

Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]
[Based on the default startup or an attached .blend file (as simple as possible)]

I got his logs when i try to enable the add-on :

Traceback (most recent call last):
File "D:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\addon_utils.py", line 364, in enable
mod = importlib.import_module(module_name)
File "D:\Program Files\Blender Foundation\Blender 4.0\4.0\python\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in load_unlocked
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "D:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\object_print3d_utils_init
.py", line 38, in
from . import (
File "D:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\object_print3d_utils\operators.py", line 18, in
from bpy.app.translations import pgettext_tip as tip

File "shibokensupport/signature/loader.py", line 61, in feature_imported
File "shibokensupport/feature.py", line 135, in feature_imported
AttributeError: 'bpy.app._translations_type' object has no attribute 'name'

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.23 **Blender Version** Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: `9be62e85b727` Worked: (newest version of Blender that worked as expected) **Addon Information** Name: 3D-Print Toolbox () Author: Campbell Barton **Short description of error** [Please fill out a short description of the error here] **Exact steps for others to reproduce the error** [Please describe the exact steps needed to reproduce the issue] [Based on the default startup or an attached .blend file (as simple as possible)] I got his logs when i try to enable the add-on : Traceback (most recent call last): File "D:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\addon_utils.py", line 364, in enable mod = importlib.import_module(module_name) File "D:\Program Files\Blender Foundation\Blender 4.0\4.0\python\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "D:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\object_print3d_utils\__init__.py", line 38, in <module> from . import ( File "D:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\object_print3d_utils\operators.py", line 18, in <module> from bpy.app.translations import pgettext_tip as tip_ File "shibokensupport/signature/loader.py", line 61, in feature_imported File "shibokensupport/feature.py", line 135, in feature_imported AttributeError: 'bpy.app._translations_type' object has no attribute '__name__'
Nicolas-DUCHENE added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2023-12-08 13:51:59 +01:00
Member

It looks like the error occurs in the shibokensupport module, something which is apparently part of PySide. (From what I understand this module monkey patches the import mechanism here, and subsequent imports may fail because of that.)

Since PySide is not shipped with Blender, how was Blender installed?
Have you installed other modules such as PySide in the Blender path, or maybe add-ons that use it?

The same issue was reported in #104996 as well, where @mano-wii had questions:

It looks like it is related to bpy.app.translations which is for translating the interface.

What language do you use in the interface?

It looks like the error occurs in the `shibokensupport` module, something which is apparently part of PySide. (From what I understand this module monkey patches the import mechanism [here](https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/loader.py?id=897eaa60525099f2c3667148955732db7fed7271#n146), and subsequent imports may fail because of that.) Since PySide is not shipped with Blender, how was Blender installed? Have you installed other modules such as PySide in the Blender path, or maybe add-ons that use it? The same issue was reported in #104996 as well, where @mano-wii had questions: > It looks like it is related to bpy.app.translations which is for translating the interface. > > What language do you use in the interface?
Damien Picard added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-12-08 14:49:54 +01:00

I hadn't thought about that, but I did indeed install some add-ons recently. Specifically, those allowing me to import 3D models from StarFab into Blender.
After removing them, I can once again install the 3D-Print Toolbox add-on.
Is there no solution that would allow me to have both add-ons installed simultaneously? (Are there any solutions other than checking with the creators of the other add-on or modifying it myself?)

I hadn't thought about that, but I did indeed install some add-ons recently. Specifically, those allowing me to import 3D models from StarFab into Blender. After removing them, I can once again install the 3D-Print Toolbox add-on. Is there no solution that would allow me to have both add-ons installed simultaneously? (Are there any solutions other than checking with the creators of the other add-on or modifying it myself?)
Member

I’m not sure there is much that can be done on the Blender side to avoid this add-on breaking the import process, but it’s hard to tell without knowing which add-on it is and how it works.

In any case it probably wouldn’t hurt to let the authors of the add-on know as well.

I’m not sure there is much that can be done on the Blender side to avoid this add-on breaking the import process, but it’s hard to tell without knowing which add-on it is and how it works. In any case it probably wouldn’t hurt to let the authors of the add-on know as well.

@pioverfour

Is there a workaround for this issue? We're trying to include PySide6 with the next version of RenderMan (this is a requirement for the vfx 2024 reference platform), and I'm running into this issue when preferences in the preferences window are drawn.

The reason why we include PySide is because we have a number of tools written in Qt that we use across all our supported DCCs (Maya, Houdini etc.). Without PySide, I have to write a Blender specific version of the tool, which becomes cumbersome. Also, our users have expressed that they like the Qt version of the tools, rather than the Blender specific ones.

@pioverfour Is there a workaround for this issue? We're trying to include PySide6 with the next version of RenderMan (this is a requirement for the vfx 2024 reference platform), and I'm running into this issue when preferences in the preferences window are drawn. The reason why we include PySide is because we have a number of tools written in Qt that we use across all our supported DCCs (Maya, Houdini etc.). Without PySide, I have to write a Blender specific version of the tool, which becomes cumbersome. Also, our users have expressed that they like the Qt version of the tools, rather than the Blender specific ones.
Member

Is there a workaround for this issue?

Not that I know of, but I haven’t investigated that much. If you’ve got an easy to reproduce case I suggest reporting on the main blender repo as this one is basically legacy, and the issue lies more with the Python API than individual add-ons anyway.

> Is there a workaround for this issue? Not that I know of, but I haven’t investigated that much. If you’ve got an easy to reproduce case I suggest reporting on the main [blender repo](https://projects.blender.org/blender/blender/issues/) as this one is basically legacy, and the issue lies more with the Python API than individual add-ons anyway.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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-addons#105049
No description provided.