Import SKP error (line 29 __init__.py | Key Error) [Semi Solved]
Describe the bug [Temporarily Solved]
Importing a SKP 2023 file in Blender 4.0.2 results in an error that just the camera comes up. But this will occur only if you have a wooden slat in your scene.
To Reproduce Steps to reproduce the behavior:
- Go to ' File -> Import -> "Import SketchUp Scene (.skp)" '
- Choose you file .skp
- In the error Logger:
Python: Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\sketchup_importer\__init__.py", line 889, in execute
return SceneImporter().set_filename(keywords['filepath']).load(
File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\sketchup_importer\__init__.py", line 184, in load
self.write_duplicateable_groups()
File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\sketchup_importer\__init__.py", line 208, in write_duplicateable_groups
component_stats = self.analyze_entities(
File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\sketchup_importer\__init__.py", line 265, in analyze_entities
self.analyze_entities(group.entities,
File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\sketchup_importer\__init__.py", line 265, in analyze_entities
self.analyze_entities(group.entities,
File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\sketchup_importer\__init__.py", line 277, in analyze_entities
cdef = self.skp_components[instance.definition.name]
File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\addons\sketchup_importer\SKPutil\__init__.py", line 29, in __getitem__
return dict.__getitem__(self, key)
KeyError: 'Agrupar#45'
Expected behavior When imported the file comes with all the scene, not just the camera.
Screenshots
ErrorLogger
SKP File
Bug Trigger
System Info
- Operating System:
windows 11 LTS - Blender Version:
4.0.2 - SketchUp Version:
2023 Pro - Importer Versions:
Latest0.23.1
Additional context
-
Since the
line29in the__init__.pyfile is getting thepropsto create aDict, the problem is, in my guess, with something related to a unique ID, reference or something like that to the components , groups, obj from SKP. A purge in those statistics could be a solution. Remembering I'm not familiar with the SKP or Blender API , I'm just trying to help someone with the same error. -
The fast solution is to use a grouped wooden slat unless a extruded one.