Error in plugin execution InitializeMain:

Posted on
Sun Apr 21, 2024 10:18 am
Different Computers offline
User avatar
Posts: 2558
Joined: Jan 02, 2016
Location: East Coast

Error in plugin execution InitializeMain:

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

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Apr 22, 2024 2:07 pm
Different Computers offline
User avatar
Posts: 2558
Joined: Jan 02, 2016
Location: East Coast

Re: Error in plugin execution InitializeMain:

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.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Apr 22, 2024 4:29 pm
FlyingDiver offline
User avatar
Posts: 7229
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Error in plugin execution InitializeMain:

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

Posted on
Mon Apr 22, 2024 7:36 pm
Different Computers offline
User avatar
Posts: 2558
Joined: Jan 02, 2016
Location: East Coast

Re: Error in plugin execution InitializeMain:

I’m still one version back. But I haven’t upgraded the plugin, and it was working with this Indigo version recently.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Mon Apr 22, 2024 8:24 pm
GlennNZ offline
User avatar
Posts: 1578
Joined: Dec 07, 2014
Location: Central Coast, Australia

Error in plugin execution InitializeMain:

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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest