Kitsu Addon causes Blender to hangs if server path is wrong #18

Closed
opened 2023-04-19 17:19:07 +02:00 by Nick Alberelli · 0 comments
Member

Issue

[Blender_Kitsu] addon hangs blender if server IP is not found.

offending code: Coming from : cb709e9943/blender_kitsu/auth/ops.py (L140)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    # Note: Since this timer function does not repeat
    # (because it doesn't return a value)
    # it automatically un-registers after it runs.
    # FIXME: XXX This makes Blender hang if there is no Internet connectivity
    # TODO: Rewrite this, so the 'auto' login happens out of the main thread
    bpy.app.timers.register(auto_login_on_file_open, first_interval=0.2)

Addon registers a timer with a short interval to use while attempting auto-login. Blender appears to hang or freeze, and doesn't respect the 0.2 first interval.

Error Message

Traceback (most recent call last):
  File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\auth\ops.py", line 60, in execute
    session_data = session.start()
  File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\types.py", line 60, in start
    raise gazu.exception.HostException
blender_kitsu.gazu.exception.HostException
Error: Python: Traceback (most recent call last):
  File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\auth\ops.py", line 60, in execute
    session_data = session.start()
  File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\types.py", line 60, in start
    raise gazu.exception.HostException
blender_kitsu.gazu.exception.HostException
Location: c:\Users\nalbe\Blender-Studio\Development\Blender-Builds\blender-git\build_windows_x64_vc16_Release\bin\Release\3.6\scripts\modules\bpy\ops.py:113
Traceback (most recent call last):
  File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\auth\ops.py", line 124, in auto_login_on_file_open
    bpy.ops.kitsu.session_start()
  File "c:\Users\nalbe\Blender-Studio\Development\Blender-Builds\blender-git\build_windows_x64_vc16_Release\bin\Release\3.6\scripts\modules\bpy\ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\auth\ops.py", line 60, in execute
    session_data = session.start()
  File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\types.py", line 60, in start
    raise gazu.exception.HostException
blender_kitsu.gazu.exception.HostException
Location: c:\Users\nalbe\Blender-Studio\Development\Blender-Builds\blender-git\build_windows_x64_vc16_Release\bin\Release\3.6\scripts\modules\bpy\ops.py:113

# Issue [Blender_Kitsu] addon hangs blender if server IP is not found. offending code: Coming from : https://projects.blender.org/TinyNick/blender-studio-tools/src/commit/cb709e99431220229737d0519d7a9cb139d7cf8c/blender_kitsu/auth/ops.py#L140 ```python def register(): for cls in classes: bpy.utils.register_class(cls) # Note: Since this timer function does not repeat # (because it doesn't return a value) # it automatically un-registers after it runs. # FIXME: XXX This makes Blender hang if there is no Internet connectivity # TODO: Rewrite this, so the 'auto' login happens out of the main thread bpy.app.timers.register(auto_login_on_file_open, first_interval=0.2) ``` Addon registers a timer with a short interval to use while attempting auto-login. Blender appears to hang or freeze, and doesn't respect the `0.2` first interval. ### Error Message ``` Traceback (most recent call last): File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\auth\ops.py", line 60, in execute session_data = session.start() File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\types.py", line 60, in start raise gazu.exception.HostException blender_kitsu.gazu.exception.HostException Error: Python: Traceback (most recent call last): File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\auth\ops.py", line 60, in execute session_data = session.start() File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\types.py", line 60, in start raise gazu.exception.HostException blender_kitsu.gazu.exception.HostException Location: c:\Users\nalbe\Blender-Studio\Development\Blender-Builds\blender-git\build_windows_x64_vc16_Release\bin\Release\3.6\scripts\modules\bpy\ops.py:113 Traceback (most recent call last): File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\auth\ops.py", line 124, in auto_login_on_file_open bpy.ops.kitsu.session_start() File "c:\Users\nalbe\Blender-Studio\Development\Blender-Builds\blender-git\build_windows_x64_vc16_Release\bin\Release\3.6\scripts\modules\bpy\ops.py", line 113, in __call__ ret = _op_call(self.idname_py(), None, kw) RuntimeError: Error: Python: Traceback (most recent call last): File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\auth\ops.py", line 60, in execute session_data = session.start() File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_kitsu\types.py", line 60, in start raise gazu.exception.HostException blender_kitsu.gazu.exception.HostException Location: c:\Users\nalbe\Blender-Studio\Development\Blender-Builds\blender-git\build_windows_x64_vc16_Release\bin\Release\3.6\scripts\modules\bpy\ops.py:113 ```
Nick Alberelli added the
Kind
Bug
label 2023-04-19 17:19:07 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
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: studio/blender-studio-tools#18
No description provided.