Jump to content

PG3 ELK node server 3.5.5 fails with error: cannot import name 'FunctionKeys'


rwsani99
Go to solution Solved by Jimbo.Automates,

Recommended Posts

Posted

I have been using PG3 ELK node server successfully for about 6 months.  Today I noticed my Polisy v.5.4.4 was not detecting correct ELK status.  When I checked the node server it's status is 'Disconnected'.  Tried stop/start of node server, and finally reboot of Polisy, but always the same results.  I'm running PG3 version 3.0.62.  The node server attempts startup, but fails immediately with the follow error:

2022-11-07 11:34:11,744 MainThread udi_interface      INFO     polylogger:set_basic_config: set_basic_config: enable=True level=30
2022-11-07 11:34:14,308 MainThread udi_interface      INFO     __init__:<module>: UDI Python Interface for Polyglot version 3 3.0.46 Starting...
2022-11-07 11:34:14,524 MainThread udi_interface      ERROR    udi_interface:write: Traceback (most recent call last):
2022-11-07 11:34:14,525 MainThread udi_interface      ERROR    udi_interface:write: File "./elk-poly.py", line 10, in <module>
2022-11-07 11:34:14,526 MainThread udi_interface      ERROR    udi_interface:write: from nodes import Controller
2022-11-07 11:34:14,527 MainThread udi_interface      ERROR    udi_interface:write: File "/var/polyglot/pg3/ns/00:0d:b9:5e:e2:8c_2/nodes/__init__.py", line 9, in <module>
2022-11-07 11:34:14,529 MainThread udi_interface      ERROR    udi_interface:write: from .Keypad import KeypadNode
2022-11-07 11:34:14,530 MainThread udi_interface      ERROR    udi_interface:write: File "/var/polyglot/pg3/ns/00:0d:b9:5e:e2:8c_2/nodes/Keypad.py", line 7, in <module>
2022-11-07 11:34:14,531 MainThread udi_interface      ERROR    udi_interface:write: from elkm1_lib.const import (
2022-11-07 11:34:14,532 MainThread udi_interface      ERROR    udi_interface:write: ImportError
2022-11-07 11:34:14,533 MainThread udi_interface      ERROR    udi_interface:write: :
2022-11-07 11:34:14,533 MainThread udi_interface      ERROR    udi_interface:write: cannot import name 'FunctionKeys' from 'elkm1_lib.const' (/var/polyglot/.local/lib/python3.8/site-packages/elkm1_lib/const.py)

 

Any ideas?

Posted

Gave that a shot and got an error. I verified I'm in the correct slot/directory by viewing the README.md file. And I verified that install.sh exists in this directory, (ls -l).  And the contents of ./install.sh is

[admin@polisy /var/polyglot/pg3/ns/00:0d:b9:5e:e2:8c_2]$ cat ./install.sh
#!/usr/bin/env bash
pip3 install -r requirements.txt --user
 

 

 Not sure if this error is saying the install.sh is not found?  Or a line within the shell script?  And I'm assuming the 'Password:' it is asking for is the password for admin@ polisy. Again, I appreciate your help. Here's the error:

[admin@polisy /var/polyglot/pg3/ns/00:0d:b9:5e:e2:8c_2]$ sudo -u polyglot ./install.sh
Password:
sudo: ./install.sh: command not found
[admin@polisy /var/polyglot/pg3/ns/00:0d:b9:5e:e2:8c_2]$

Posted

So now I get:

[admin@polisy /var/polyglot/pg3/ns/00:0d:b9:5e:e2:8c_2]$ sudo -u polyglot bash .                                 /install.sh
Password:
Collecting udi_interface>=3.0.47
  Using cached udi_interface-3.0.49-py3-none-any.whl (24 kB)
ERROR: Ignored the following versions that require a different python version: 1                                 .3.0 Requires-Python >=3.9,<4.0; 1.3.1 Requires-Python >=3.9,<4.0; 1.3.2 Require                                 s-Python >=3.9,<4.0; 1.3.3 Requires-Python >=3.9,<4.0; 1.3.4 Requires-Python >=3                                 .9,<4.0; 1.3.5 Requires-Python >=3.9,<4.0; 1.3.6 Requires-Python >=3.9,<4.0; 1.3                                 .dev0 Requires-Python >=3.9,<4.0; 2.0.0 Requires-Python >=3.9,<4.0; 2.0.1 Requir                                 es-Python >=3.9,<4.0; 2.0.2 Requires-Python >=3.9,<4.0; 2.1.0 Requires-Python >=                                 3.9,<4.0
ERROR: Could not find a version that satisfies the requirement elkm1_lib>=2.1.0<                                 2.2.0 (from versions: 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.                                 7.6, 0.7.7, 0.7.8, 0.7.9, 0.7.10, 0.7.11, 0.7.12, 0.7.13, 0.7.14, 0.7.15, 0.7.16                                 , 0.7.17, 0.7.18, 0.7.19, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7                                 , 0.8.8, 0.8.9, 0.8.10, 0.8.11, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.2.2)
ERROR: No matching distribution found for elkm1_lib>=2.1.0<2.2.0

Posted

Thanks!!  That did the trick.  I did an "Upgrade Packages" from the admin console yesterday, and restarted PG3 afterwards, or so I thought.  But issuing another "Upgrade Packages" just now, followed by a Polyglot restart seems to have fixed my problems.  Really appreciate you help, and the ELK nose server!

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.4k
×
×
  • Create New...