regcs / AliceLG

A Blender add-on for the use of Blender with the Looking Glass holographic displays.
GNU General Public License v3.0
104 stars 23 forks source link

[Initialization] Addon raises exceptions if HoPS is not running. #92

Closed regcs closed 2 years ago

regcs commented 2 years ago

Describe the bug A user on discord reported the following issue for cases when the HoloPlay Service is not active.

To Reproduce

  1. Close HoPS
  2. Open Blender with Alice/LG activated

Expected behavior Addon detects missing HoPS but does not throw exceptions.

Screenshots If applicable, add screenshots to help explain your problem.

Platform & Versions (please complete the following information):

Attach log files

[Alice/LG] [INFO] 05/18/2022 21:02:13 - ----------------------------------------------
[Alice/LG] [INFO] 05/18/2022 21:02:13 - Initializing 'Alice/LG v2.0.6' ...
[Alice/LG] [INFO] 05/18/2022 21:02:13 -  [#] Add-on path: C:\Users\drais\AppData\Roaming\Bforartists\Bforartists\3.2\scripts\addons\AliceLG-master
[Alice/LG] [INFO] 05/18/2022 21:02:14 -  [#] Registered add-on operators in Blender.
[Alice/LG] [INFO] 05/18/2022 21:02:14 -  [#] Done.
[Alice/LG] [INFO] 05/18/2022 21:02:14 - Connecting to HoloPlay Service ...
[pyLightIO] [ERROR] 05/18/2022 21:02:14 - Could not connect. Is HoloPlay Service running?
[pyLightIO] [WARNING] 05/18/2022 21:02:14 - Added service 'HoloPlay Service' to the service manager, but service is not ready.
[Alice/LG] [INFO] 05/18/2022 21:02:14 -  [#] Connection failed.
[Alice/LG] [CRITICAL] 05/18/2022 21:02:14 - An unhandled error occured. Here is the traceback:
Traceback (most recent call last):
  File "C:\Users\drais\AppData\Roaming\Bforartists\Bforartists\3.2\scripts\addons\AliceLG-master\ui.py", line 1328, in poll
    if int(context.scene.addon_settings.activeDisplay) == -1 or context.scene.addon_settings.ShowLightfieldWindow == False:
AttributeError: 'Scene' object has no attribute 'addon_settings'
Python:
location: <unknown location>:-1
regcs commented 2 years ago

The issue was not related to the addon.