Error in plugin execution InitializeMain:

A plugin to integration Indigo devices into HomeKit (and Siri)
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Error in plugin execution InitializeMain:

Post by Different Computers »

Not sure what's going on. No updates to anything else I can think of that would have broken this. Running 0.6.29.

Code: Select all

 HomeKitLink Siri Error          Error in plugin execution InitializeMain:

  File "plugin.py", line 43, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/HomeKitLink-Siri.indigoPlugin/Contents/Server Plugin/pyhap/accessory_driver.py", line 54, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/HomeKitLink-Siri.indigoPlugin/Contents/Server Plugin/pyhap/hap_server.py", line 9, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/HomeKitLink-Siri.indigoPlugin/Contents/Server Plugin/pyhap/hap_protocol.py", line 15, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/HomeKitLink-Siri.indigoPlugin/Contents/Server Plugin/pyhap/hap_crypto.py", line 7, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/HomeKitLink-Siri.indigoPlugin/Contents/Server Plugin/chacha20poly1305_reuseable/__init__.py", line 72, in <module>
type: type 'cryptography.hazmat.bindings._rust.openssl.aead.ChaCha20Poly1305' is not an acceptable base type
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Error in plugin execution InitializeMain:

Post by Different Computers »

I've done some investigation, but haven't fixed it yet.

from here https://stackoverflow.com/questions/325 ... gs-openssl

I tried

Code: Select all

pip uninstall pyopenssl
pip uninstall cryptography
pip install pyopenssl
pip install cryptography
pyopenssl wasn't installed

second one I got

Code: Select all

Uninstalling cryptography-42.0.5:
  Would remove:
    /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cryptography-42.0.5.dist-info/*
    /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cryptography/*
Proceed (Y/n)? y
ERROR: Exception:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/shutil.py", line 805, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cryptography-42.0.5.dist-info/' -> '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/~ryptography-42.0.5.dist-info'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_internal/commands/uninstall.py", line 105, in run
    uninstall_pathset = req.uninstall(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 727, in uninstall
Then

Code: Select all

% pip install pyopenssl
Requirement already satisfied: pyopenssl in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (24.1.0)
Requirement already satisfied: cryptography<43,>=41.0.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from pyopenssl) (42.0.5)
Requirement already satisfied: cffi>=1.12 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from cryptography<43,>=41.0.5->pyopenssl) (1.15.1)
Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from cffi>=1.12->cryptography<43,>=41.0.5->pyopenssl) (2.21)
mike@Indigo ~ % pip install cryptography
Requirement already satisfied: cryptography in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (42.0.5)
Requirement already satisfied: cffi>=1.12 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from cryptography) (1.15.1)
Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from cffi>=1.12->cryptography) (2.21)
HKLS still errors out with the same error on reload.
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Error in plugin execution InitializeMain:

Post by FlyingDiver »

Are you using the most recent version of Indigo? Because the current Indigo install uses Python 3.11, not 3.10.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Error in plugin execution InitializeMain:

Post by Different Computers »

I’m still one version back. But I haven’t upgraded the plugin, and it was working with this Indigo version recently.
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
User avatar
GlennNZ
Posts: 1872
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Error in plugin execution InitializeMain:

Post by GlennNZ »

Ok. Just to clarify the problem ‘base’ here:
Running Indigo 2023.1
Plugin Version is also 3 versions old or so at 0.6.29. (current 0.6.61 I believe)

& all of a sudden fails to start, without changing anything?

Of course that won’t be a plugin issue, given nothing has changed. That will be a system issue. Could try reinstalling the plugin from plugin bundle to deal with any file errors or security blocking files. Run the unquarantine command as well as on old version.

A 5 year old stackoverflow pip install everything I don’t think will particularly help. Particularly as the cryptography library you thankfully fail to install has a new version (42) which is incompatible with the old version and probably will cause every python3.10 process that relies on it to fail. HKLS uses cryptography==41.0.7

I suspect somewhere along the way you made some system updates, or ran some pip commands like above — which are causing this issue. Reversing those or updating Indigo and HKLS to latest (in which plugins manage their own libraries would be my advice)

Glenn


Sent from my iPad using Tapatalk
Post Reply

Return to “HomeKitLink Siri”