You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried installing the Textension addon on ubuntu 22.04
Blender version 3.6.4 run from source
I notice that you are using os.path.join() which is incompatible with Linux directory paths which then raises error that there is no plugins directory.
I would suggest using pathlib which can handle both linux and windows directories. Because it's used everywhere in your code it's unusable on linux and throws multiple error paths. I would really appreciate compatibility with linux path system.
My suggestion for the get plugins would be:
defget_plugins_dict() ->dict:
"""Return a list of plugin submodules that can be enabled."""plugins_path=Path(textension.__path__[0]) /'plugins'# Use Path to handle file pathsifnotplugins_path.is_dir():
print("Textension: missing 'plugins' directory.")
returnplugins= {}
py_path=f"{__package__}.plugins"forinfoinpkgutil.iter_modules([str(plugins_path)]): # Convert Path to stringm=__import__(f"{py_path}.{info.name}", fromlist=(info.name,))
ifhasattr(m, "enable") andhasattr(m, "disable"):
plugins[info.name] =mreturnplugins
Error that initiated this bug hunt.
Read prefs: "/home/solumath/.config/blender/3.6/config/userpref.blend"
Textension: missing 'plugins' directory.
Traceback (most recent call last):
File "/home/solumath/.config/blender/3.6/scripts/addons/textension/utils.py", line 358, in wrapper
ret = func(*args, **kw)
File "/home/solumath/.config/blender/3.6/scripts/addons/textension/__init__.py", line 33, in register
prefs.init()
File "/home/solumath/.config/blender/3.6/scripts/addons/textension/prefs.py", line 13, in init
_init_plugins()
File "/home/solumath/.config/blender/3.6/scripts/addons/textension/prefs.py", line 58, in _init_plugins
forname, moduleinplugins_dict.items():
AttributeError: 'NoneType' object has no attribute 'items'
Exception in module register(): /home/solumath/.config/blender/3.6/scripts/addons/textension/__init__.py
Traceback (most recent call last):
File "/home/solumath/FIT2/BP/blender-3.6.4-linux-x64/3.6/scripts/modules/addon_utils.py", line 369, inenablemod.register()
File "/home/solumath/.config/blender/3.6/scripts/addons/textension/utils.py", line 358, in wrapper
ret = func(*args, **kw)
File "/home/solumath/.config/blender/3.6/scripts/addons/textension/__init__.py", line 33, in register
prefs.init()
File "/home/solumath/.config/blender/3.6/scripts/addons/textension/prefs.py", line 13, in init
_init_plugins()
File "/home/solumath/.config/blender/3.6/scripts/addons/textension/prefs.py", line 58, in _init_plugins
forname, moduleinplugins_dict.items():
AttributeError: 'NoneType' object has no attribute 'items'
The text was updated successfully, but these errors were encountered:
Appreciate the code!
I do indeed use a lot of os.path. For performance reasons, Path objects are not ideal to use everywhere in the addon, but I'll get a copy of ubuntu and work my way through things.
I tried installing the Textension addon on ubuntu 22.04
Blender version 3.6.4 run from source
I notice that you are using os.path.join() which is incompatible with Linux directory paths which then raises error that there is no plugins directory.
I would suggest using pathlib which can handle both linux and windows directories. Because it's used everywhere in your code it's unusable on linux and throws multiple error paths. I would really appreciate compatibility with linux path system.
My suggestion for the get plugins would be:
Error that initiated this bug hunt.
The text was updated successfully, but these errors were encountered: