Error when importing male characters in to Blender #46

Open
opened 2026-03-23 08:27:39 +00:00 by SteamDeckinson · 0 comments
Error:          Unknown python error occurred. 
          Make sure the default model imports correctly before troubleshooting on this model!



Traceback (most recent call last):
  File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 39, in execute
    self.remap_duplicate_material_slots()
  File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 122, in remap_duplicate_material_slots
    bpy.ops.object.material_slot_remove_unused()
  File "/home/desktop/Documents/blender/5.0/scripts/modules/bpy/ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Operator bpy.ops.object.material_slot_remove_unused.poll() failed, context is incorrect

Error: Traceback (most recent call last):
  File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 39, in execute
    self.remap_duplicate_material_slots()
  File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 122, in remap_duplicate_material_slots
    bpy.ops.object.material_slot_remove_unused()
  File "/home/desktop/Documents/blender/5.0/scripts/modules/bpy/ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Operator bpy.ops.object.material_slot_remove_unused.poll() failed, context is incorrect

Traceback (most recent call last):
  File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/importbuttons.py", line 86, in execute
    function()
  File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/importbuttons.py", line 77, in <lambda>
    lambda:bpy.ops.kkbp.modifymaterial('INVOKE_DEFAULT'),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/desktop/Documents/blender/5.0/scripts/modules/bpy/ops.py", line 107, in __call__
    ret = _op_call(self.idname_py(), kw, C_exec, C_undo)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Traceback (most recent call last):
  File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 39, in execute
    self.remap_duplicate_material_slots()
  File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 122, in remap_duplicate_material_slots
    bpy.ops.object.material_slot_remove_unused()
  File "/home/desktop/Documents/blender/5.0/scripts/modules/bpy/ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Operator bpy.ops.object.material_slot_remove_unused.poll() failed, context is incorrect


02:09.018  bpy.rna          | ERROR Python script error in KKBP_OT_kkbpimport.execute

This is the error I got when trying to import the default male character from KKS into blender, default female character works without issues

KKBP: 9.1.0
Blender: 5.0.1

Operating System: Arch Linux
KDE Plasma Version: 6.6.3
KDE Frameworks Version: 6.24.0
Qt Version: 6.10.2
Kernel Version: 6.19.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7600 6-Core Processor
Memory: 64 GiB of RAM (61.9 GiB usable)
Graphics Processor 1: NVIDIA GeForce RTX 4060 Ti/PCIe/SSE2
Graphics Processor 2: NVIDIA GeForce RTX 4060 Ti/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B650M GAMING PLUS WIFI

``` Error: Unknown python error occurred. Make sure the default model imports correctly before troubleshooting on this model! Traceback (most recent call last): File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 39, in execute self.remap_duplicate_material_slots() File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 122, in remap_duplicate_material_slots bpy.ops.object.material_slot_remove_unused() File "/home/desktop/Documents/blender/5.0/scripts/modules/bpy/ops.py", line 109, in __call__ ret = _op_call(self.idname_py(), kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Operator bpy.ops.object.material_slot_remove_unused.poll() failed, context is incorrect Error: Traceback (most recent call last): File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 39, in execute self.remap_duplicate_material_slots() File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 122, in remap_duplicate_material_slots bpy.ops.object.material_slot_remove_unused() File "/home/desktop/Documents/blender/5.0/scripts/modules/bpy/ops.py", line 109, in __call__ ret = _op_call(self.idname_py(), kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Operator bpy.ops.object.material_slot_remove_unused.poll() failed, context is incorrect Traceback (most recent call last): File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/importbuttons.py", line 86, in execute function() File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/importbuttons.py", line 77, in <lambda> lambda:bpy.ops.kkbp.modifymaterial('INVOKE_DEFAULT'), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/desktop/Documents/blender/5.0/scripts/modules/bpy/ops.py", line 107, in __call__ ret = _op_call(self.idname_py(), kw, C_exec, C_undo) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Error: Traceback (most recent call last): File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 39, in execute self.remap_duplicate_material_slots() File "/home/desktop/.config/blender/5.0/extensions/user_default/kkbp/importing/modifymaterial.py", line 122, in remap_duplicate_material_slots bpy.ops.object.material_slot_remove_unused() File "/home/desktop/Documents/blender/5.0/scripts/modules/bpy/ops.py", line 109, in __call__ ret = _op_call(self.idname_py(), kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Operator bpy.ops.object.material_slot_remove_unused.poll() failed, context is incorrect 02:09.018 bpy.rna | ERROR Python script error in KKBP_OT_kkbpimport.execute ``` This is the error I got when trying to import the default male character from KKS into blender, default female character works without issues KKBP: 9.1.0 Blender: 5.0.1 Operating System: Arch Linux KDE Plasma Version: 6.6.3 KDE Frameworks Version: 6.24.0 Qt Version: 6.10.2 Kernel Version: 6.19.8-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 7600 6-Core Processor Memory: 64 GiB of RAM (61.9 GiB usable) Graphics Processor 1: NVIDIA GeForce RTX 4060 Ti/PCIe/SSE2 Graphics Processor 2: NVIDIA GeForce RTX 4060 Ti/PCIe/SSE2 Manufacturer: Gigabyte Technology Co., Ltd. Product Name: B650M GAMING PLUS WIFI
SteamDeckinson changed title from Error when importing male character to Unable to import male characters 2026-03-23 08:38:06 +00:00
SteamDeckinson changed title from Unable to import male characters to Error when importing male characters in to Blender 2026-03-29 00:35:23 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
kkbp-dev/KKBP_Importer#46
No description provided.