Kinglord / ComfyUI_LoRA_Sidebar

Fast, visual and customizable LoRA sidebar packed with features for ComfyUI
GNU General Public License v3.0
19 stars 2 forks source link

Stopped working after latest update - AttributeError: 'NoneType' object has no attribute 'lower'` #2

Open cvar66 opened 3 days ago

cvar66 commented 3 days ago

Everything worked great until 2 days ago. After the update the cache tried to rebuild itself and at the end I get this error and nothing works.

Error handling request Traceback (most recent call last): File "C:\SD\comyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\aiohttp\web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\server.py", line 63, in cache_control response: web.Response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\server.py", line 141, in origin_only_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\server.py", line 75, in cors_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_LoRA_Sidebar\__init__.py", line 1444, in get_lora_data all_folders = sort_loras(all_folders, sort_by, sort_metadata, favorites, ascending) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_LoRA_Sidebar\__init__.py", line 188, in sort_loras return sorted(loras, key=sort_key, reverse=not ascending) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_LoRA_Sidebar\__init__.py", line 172, in get_alpha_key return lora_meta.get('name', lora_id).lower() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'lower'

cvar66 commented 3 days ago

Tried reinstalling and the issue persisted. Ended up changing the listing order from ascending to newest and restarting Comfy and it is now working.

Kinglord commented 3 days ago

This error would be thrown if for some reason a LoRA had no name associated with it, which obviously shouldn't ever happen. I'm completely rewriting the data logic to make it faster for large datasets so I'll be sure to test all the sorting methods. I'm glad you got it working for now.