pyslapi icon indicating copy to clipboard operation
pyslapi copied to clipboard

Not able to load certain files.

Open franMx opened this issue 5 years ago • 6 comments

Describe the bug While trying to import some files, an error shows up.

To Reproduce Steps to reproduce the behavior:

  1. Trying to import a file
  2. Get errors in the console, log as shown below
SKP | Importing: G:\todosa4.skp
SKP | Skipping Layers ...
SKP | Parsed in 1.1613 sec.
imb_load_photoshop: The embed colorspace ("") not supported in existent OCIO configuration file. Fallback to system default colorspace ("sRGB").
SKP | Materials imported in 3.7165 sec.
SKP | Component depths analyzed in 0.1030 sec.
Traceback (most recent call last):
  File "C:\Users\rx\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\SketchUp_Importer\__init__.py", line 868, in execute
    context, **keywords)
  File "C:\Users\rx\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\SketchUp_Importer\__init__.py", line 184, in load
    self.write_duplicateable_groups()
  File "C:\Users\rx\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\SketchUp_Importer\__init__.py", line 237, in write_duplicateable_groups
    group = bpy.data.groups.new(name=gname)
AttributeError: 'BlendData' object has no attribute 'groups'

location: <unknown location>:-1

Expected behavior Have an imported model

System Info

  • Operating System: Windows 10
  • Blender Version 2.82
  • SketchUp Version 2019 and version 4
  • Importer Version v.0.20.2

Additional context Originally posted in blender artist thread: https://blenderartists.org/t/sketchup-importer-ported-for-blender-2-82a/1223412/33

Followed a proposed solution. However, the plugin doesn't load and I get this:

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\modules\addon_utils.py", line 352, in enable
    mod.__time__ = os.path.getmtime(mod.__file__)
  File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\python\lib\genericpath.py", line 55, in getmtime
    return os.stat(filename).st_mtime
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

If I revert file plugin loads again.

franMx avatar Jun 01 '20 22:06 franMx

Can you clarify which particular solution you have tried?

arindam-m avatar Jun 02 '20 07:06 arindam-m

I tried the file in https://github.com/arindam-m/pyslapi/blob/develop/sketchup_importer/init.py

According to the instructions: "If you would like to test out these recent changes (without a new compiled/build release) right now, download this raw file from here 2 and replace it with the existing __init__.py within your addons\SketchUp_Importer directory." (from blender artist post)

franMx avatar Jun 02 '20 14:06 franMx

It works as expected here on my system. Can you show me your entire directory path where you would have replaced the init.py file with the new one?

It would be something like

C:\Users\<Your_User_Name>\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\Sketchup_Importer

Also, share your .skp file with me. If it's for commercial use and you don't want to make it public, send it through DM at BlenderArtists forum. And make the file as small as possible (remove as many objects as you can and purge the unused data).

arindam-m avatar Jun 02 '20 19:06 arindam-m

I'm attaching a screenshot, init.py2 is the old file, just after the screenshot moved it to another location, but the plugin is still not loading. Capture

Also I DM you at Blender Artists, don't know what specific models do cause the problems, because I was able to import some of them, but one of those actually is causing problems.

franMx avatar Jun 02 '20 22:06 franMx

Thanks for confirming the addon PATH. However, the link that you have provided me with, (at BlenderArtists for a sample file to reproduce the issue) doesn't work.

arindam-m avatar Jun 07 '20 17:06 arindam-m

I have the same issue. Nothing I did fixed the issue

dogactoklu avatar Nov 09 '20 12:11 dogactoklu