Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./admin.py checkdevice => ends in "NameError: global name 'Logger' is not defined" #2

Open
Race666 opened this issue Jun 19, 2018 · 0 comments

Comments

@Race666
Copy link

Race666 commented Jun 19, 2018

Tried PyKNyX on a debian 9 installation ends up in an error while creating a device:

apt-get install git
mkdir ~/software
cd ~/software
git clone https://github.com/knxd/PyKNyX PyKNyX
cd PyKNyX/
python setup.py sdist
cd dist 
pip install PyKNyX\ knxd-2.0.0.dev1.tar.gz
cd ~
pyknyx-admin.py createdevice accture 
cd accture
python -V
Python 2.7.13
./admin.py checkdevice
Traceback (most recent call last):
  File "./admin.py", line 18, in <module>
    main()
  File "./admin.py", line 14, in main
    AdminUtility().execute()
  File "/usr/local/lib/python2.7/dist-packages/pyknyx/tools/adminUtility.py", line 205, in execute
    args.func(args)
  File "/usr/local/lib/python2.7/dist-packages/pyknyx/tools/adminUtility.py", line 146, in _checkDevice
    runner = DeviceRunner(args.loggerLevel, args.devicePath, args.gadMapPath)
  File "/usr/local/lib/python2.7/dist-packages/pyknyx/tools/deviceRunner.py", line 97, in __init__
    Logger("%s-%s" % (DEVICE_NAME, DEVICE_IND_ADDR))
NameError: global name 'Logger' is not defined

Commenting "Logger()" in "/usr/local/lib/python2.7/dist-packages/pyknyx/tools/deviceRunner.py" ends up in next error:

 ./admin.py checkdevice
MainThread::Logger level is 'info'
MainThread::Device path is './accture'
MainThread::Device name is 'accture'
MainThread::Device Individual Address is '1.1.1'
MainThread::Allocate ETS addr 1.1.1 to device
Traceback (most recent call last):
  File "./admin.py", line 18, in <module>
    main()
  File "./admin.py", line 14, in main
    AdminUtility().execute()
  File "/usr/local/lib/python2.7/dist-packages/pyknyx/tools/adminUtility.py", line 205, in execute
    args.func(args)
  File "/usr/local/lib/python2.7/dist-packages/pyknyx/tools/adminUtility.py", line 147, in _checkDevice
    runner.check(args.printGroat)
  File "/usr/local/lib/python2.7/dist-packages/pyknyx/tools/deviceRunner.py", line 140, in check
    from device import DEVICE
  File "./accture/device.py", line 5, in <module>
    from acctureFB import AcctureFB
  File "./accture/acctureFB.py", line 4, in <module>
    from pyknyx.api import logger, schedule, notify
ImportError: cannot import name logger

Installed modules:

pip list
APScheduler (3.5.1)
blinker (1.4)
cryptography (1.7.1)
enum34 (1.1.6)
funcsigs (1.0.2)
futures (3.2.0)
idna (2.2)
ipaddress (1.0.17)
keyring (10.1)
keyrings.alt (1.3)
pip (9.0.1)
pyasn1 (0.1.9)
pycrypto (2.6.1)
pygobject (3.22.0)
PyKNyX-knxd (2.0.0.dev1)
pytz (2018.4)
pyxdg (0.25)
SecretStorage (2.3.1)
setuptools (33.1.1)
six (1.10.0)
tzlocal (1.5.1)
wheel (0.29.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant