pcb2blender icon indicating copy to clipboard operation
pcb2blender copied to clipboard

OSError: load: /usr/bin/4.0/datafiles/assets/geometry_nodes/smooth_by_angle.blend failed to open blend file

Open alinelena opened this issue 2 years ago • 5 comments

updated to the last version of the plugin on kicad 8 and blender 4.0.1(linux) I get the above error.

full trace is

Traceback (most recent call last):
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1047, in execute
    add_smooth_by_angle_modifier(context, obj)
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1097, in add_smooth_by_angle_modifier
    with bpy.data.libraries.load(SMOOTH_BY_ANGLE_ASSET_PATH) as (data_from, data_to):
OSError: load: /usr/bin/4.0/datafiles/assets/geometry_nodes/smooth_by_angle.blend failed to open blend file
Error: Python: Traceback (most recent call last):
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1047, in execute
    add_smooth_by_angle_modifier(context, obj)
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1097, in add_smooth_by_angle_modifier
    with bpy.data.libraries.load(SMOOTH_BY_ANGLE_ASSET_PATH) as (data_from, data_to):
OSError: load: /usr/bin/4.0/datafiles/assets/geometry_nodes/smooth_by_angle.blend failed to open blend file
Location: /usr/share/blender/4.0/scripts/modules/bpy/ops.py:109
Traceback (most recent call last):
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 205, in execute
    if (pcb := self.import_pcb3d(context, filepath)) == {"CANCELLED"}:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 305, in import_pcb3d
    bpy.ops.pcb2blender.import_x3d(
  File "/usr/share/blender/4.0/scripts/modules/bpy/ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1047, in execute
    add_smooth_by_angle_modifier(context, obj)
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1097, in add_smooth_by_angle_modifier
    with bpy.data.libraries.load(SMOOTH_BY_ANGLE_ASSET_PATH) as (data_from, data_to):
OSError: load: /usr/bin/4.0/datafiles/assets/geometry_nodes/smooth_by_angle.blend failed to open blend file
Location: /usr/share/blender/4.0/scripts/modules/bpy/ops.py:109

alinelena avatar Apr 16 '24 11:04 alinelena

This got fixed in 5bfdc01 a few hours ago (see #55). There's another bug in the remeshing code somewhere that I need to track down, will make a new release once that's fixed aswell.

30350n avatar Apr 16 '24 11:04 30350n

Can you confirm that this is fixed in v2.11?

30350n avatar Apr 18 '24 15:04 30350n

not really, the path seems to be correct but still tries to load something that does not exist

Traceback (most recent call last):
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1083, in execute
    add_smooth_by_angle_modifier(obj)
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1139, in add_smooth_by_angle_modifier
    with bpy.data.libraries.load(SMOOTH_BY_ANGLE_ASSET_PATH) as (data_from, data_to):
OSError: load: /usr/share/blender/4.0/datafiles/assets/geometry_nodes/smooth_by_angle.blend failed to open blend file
Error: Python: Traceback (most recent call last):
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1083, in execute
    add_smooth_by_angle_modifier(obj)
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1139, in add_smooth_by_angle_modifier
    with bpy.data.libraries.load(SMOOTH_BY_ANGLE_ASSET_PATH) as (data_from, data_to):
OSError: load: /usr/share/blender/4.0/datafiles/assets/geometry_nodes/smooth_by_angle.blend failed to open blend file
Location: /usr/share/blender/4.0/scripts/modules/bpy/ops.py:109
Traceback (most recent call last):
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 205, in execute
    if (pcb := self.import_pcb3d(context, filepath)) == {"CANCELLED"}:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 305, in import_pcb3d
    bpy.ops.pcb2blender.import_x3d(
  File "/usr/share/blender/4.0/scripts/modules/bpy/ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1083, in execute
    add_smooth_by_angle_modifier(obj)
  File "/home/drFaustroll/.config/blender/4.0/scripts/addons/pcb2blender_importer/importer.py", line 1139, in add_smooth_by_angle_modifier
    with bpy.data.libraries.load(SMOOTH_BY_ANGLE_ASSET_PATH) as (data_from, data_to):
OSError: load: /usr/share/blender/4.0/datafiles/assets/geometry_nodes/smooth_by_angle.blend failed to open blend file
Location: /usr/share/blender/4.0/scripts/modules/bpy/ops.py:109

is there some other plugin that needs installed, or maybe that is on newer blender versions?

alinelena avatar Apr 19 '24 10:04 alinelena

copying the file by hand, after getting it from blender seems to have fixed it https://svn.blender.org/svnroot/bf-blender/trunk/lib/assets/working/geometry_nodes/

alinelena avatar Apr 19 '24 10:04 alinelena

You are using Blender 4.0 which is not supported. Only 4.1.1+ is supported.

(Sorry, didn't realize that asset only got added in 4.1).

30350n avatar Apr 19 '24 11:04 30350n