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

Error while installing "geckolib==0.4.7" #2

Closed
thomasklein1975 opened this issue Dec 22, 2022 · 15 comments
Closed

Error while installing "geckolib==0.4.7" #2

thomasklein1975 opened this issue Dec 22, 2022 · 15 comments

Comments

@thomasklein1975
Copy link

HI,
while installing "sudo pip install geckolib==0.4.7" I got this logs:

`Collecting geckolib==0.4.7
Using cached https://files.pythonhosted.org/packages/57/70/353b9fd028243adc08b8e56e263922e8828a3c2730bb27d50358ad37d802/geckolib-0.4.7.tar.gz
Installing build dependencies ... done
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-duXQyB/geckolib/setup.py", line 6, in
setuptools.setup()
File "/tmp/pip-build-env-VC7M6X/lib/python2.7/site-packages/setuptools/init.py", line 162, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 124, in setup
dist.parse_config_files()
File "/tmp/pip-build-env-VC7M6X/lib/python2.7/site-packages/setuptools/dist.py", line 702, in parse_config_files
ignore_option_errors=ignore_option_errors)
File "/tmp/pip-build-env-VC7M6X/lib/python2.7/site-packages/setuptools/config.py", line 121, in parse_configuration
meta.parse()
File "/tmp/pip-build-env-VC7M6X/lib/python2.7/site-packages/setuptools/config.py", line 426, in parse
section_parser_method(section_options)
File "/tmp/pip-build-env-VC7M6X/lib/python2.7/site-packages/setuptools/config.py", line 399, in parse_section
self[name] = value
File "/tmp/pip-build-env-VC7M6X/lib/python2.7/site-packages/setuptools/config.py", line 184, in setitem
value = parser(value)
File "/tmp/pip-build-env-VC7M6X/lib/python2.7/site-packages/setuptools/config.py", line 515, in _parse_version
version = self._parse_attr(value, self.package_dir)
File "/tmp/pip-build-env-VC7M6X/lib/python2.7/site-packages/setuptools/config.py", line 349, in _parse_attr
module = import_module(module_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/tmp/pip-install-duXQyB/geckolib/src/geckolib/init.py", line 5, in
from .async_tasks import AsyncTasks
File "/tmp/pip-install-duXQyB/geckolib/src/geckolib/async_tasks.py", line 14
async def aenter(self):
^
SyntaxError: invalid syntax

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-duXQyB/geckolib/`

What must be done to fix issue?

Thx in advance

@kalinrow
Copy link
Owner

Hi
it looks like you are using python 2.7

File "/tmp/pip-build-env-VC7M6X/lib/python2.7/site-packages/setuptools/init.py", line 162, in setup

Python 3 is needed as minimum. I guess the error is coming from this.

Best
Frank

@thomasklein1975
Copy link
Author

thx for very fast response. I think I have 3.7.3

pi@raspberrypi-iob:~/spa $ python3 --version Python 3.7.3

@kalinrow
Copy link
Owner

kalinrow commented Dec 22, 2022

Right, but it seems that version two is still the main one.
Please test with
python --version

If you do not want to check you need to use
sudo pip3 install geckolib==0.4.7

Maybe you need to re-install all modules. I'm not a python expert add all. I did the client only in python as the geckolib is only available in python as well.

@thomasklein1975
Copy link
Author

hi,

seems we both are right. :-)

pi@raspberrypi-iob:~ $ python --version Python 2.7.16

This I run too:

sudo pip3 install geckolib==0.4.7

Maybe I can proceed with testing your code

@thomasklein1975
Copy link
Author

Hi,

where do i get infos about "SPA_IDENTIFIER"
how can I deactive authorisation on mqtt broke in case of no nedd for it?

thx in advance
Thomas

@kalinrow
Copy link
Owner

Hi,
the SPA identifier is the MAC address with the prefix SPA. See also README file. To get the MAC, lookup in the DHCP server or use the inTouch App.
Regarding the authentication, only guessing but setting the two related variables to None without quotes should do the trick:

BROKER_USERNAME = None
BROKER_PASSWORD = None

@thomasklein1975
Copy link
Author

thomasklein1975 commented Dec 28, 2022

thx a lot again.

Now I have these issue:

`pi@raspberrypi-iob:/opt/geckoclient $ sudo systemctl start gecko.service
pi@raspberrypi-iob:/opt/geckoclient $ sudo systemctl status gecko.service
● gecko.service - Gecko client service
Loaded: loaded (/etc/systemd/system/gecko.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-12-28 08:55:07 CET; 5s ago
Process: 18488 ExecStart=/usr/bin/python3 /opt/geckoclient/client.py (code=exited, status=1/FAILURE)
Main PID: 18488 (code=exited, status=1/FAILURE)

Dec 28 08:55:07 raspberrypi-iob systemd[1]: gecko.service: Main process exited, code=exited, status=1/FAILURE
Dec 28 08:55:07 raspberrypi-iob systemd[1]: gecko.service: Failed with result 'exit-code'.
Dec 28 08:55:07 raspberrypi-iob systemd[1]: gecko.service: Service RestartSec=100ms expired, scheduling restart.
Dec 28 08:55:07 raspberrypi-iob systemd[1]: gecko.service: Scheduled restart job, restart counter is at 5.
Dec 28 08:55:07 raspberrypi-iob systemd[1]: Stopped Gecko client service.
Dec 28 08:55:07 raspberrypi-iob systemd[1]: gecko.service: Start request repeated too quickly.
Dec 28 08:55:07 raspberrypi-iob systemd[1]: gecko.service: Failed with result 'exit-code'.
Dec 28 08:55:07 raspberrypi-iob systemd[1]: Failed to start Gecko client service.
pi@raspberrypi-iob:/opt/geckoclient $ cd /var/log/
pi@raspberrypi-iob:/var/log $ nano geck
`
There is no log file in var/log. DebugLEvel was set befor to "DEBUG", python 3 seems to be used.

What is the meaning of BROKER_ID?

Here my config:
grafik

This is working so far :-)
https://github.com/gazoodle/geckolib I can controll my spa in gecko/python shell. but i want to control my spa by my iobroker

Directory listing / call of cleint.py
pi@raspberrypi-iob:/opt/geckoclient $ ls -la total 52 drwxr-xr-x 2 root root 4096 Dec 28 11:45 . drwxr-xr-x 7 root root 4096 Dec 23 12:42 .. -rw-r--r-- 1 root root 4701 Dec 28 08:37 client.py -rw-r--r-- 1 root root 704 Dec 28 09:02 config.py_template -rw-r--r-- 1 root root 529 Dec 28 08:37 const.py -rw-r--r-- 1 root root 3912 Dec 28 08:37 mqtt.py -rw-r--r-- 1 root root 1286 Dec 28 08:37 mqtt_test.py -rw-r--r-- 1 root root 17252 Dec 28 08:37 mySpa.py pi@raspberrypi-iob:/opt/geckoclient $ nano client.py pi@raspberrypi-iob:/opt/geckoclient $ python3 client.py Traceback (most recent call last): File "client.py", line 11, in <module> import config ModuleNotFoundError: No module named 'config' pi@raspberrypi-iob:/opt/geckoclient $

better as pic:
grafik

@thomasklein1975
Copy link
Author

thomasklein1975 commented Dec 28, 2022

Update:

maybe related to this?

pi@raspberrypi-iob:~/spa/geckoclient/src $ sudo pip3 install asyncio-paho
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting asyncio-paho
 Could not find a version that satisfies the requirement asyncio-paho (from versions: )
No matching distribution found for asyncio-paho
pi@raspberrypi-iob:~/spa/geckoclient/src $

What can I do?

@kalinrow
Copy link
Owner

Hello,
as described in the README you need to copy or rename the config.py_template to config.py.
Please also remove the quotes around None - it is not the string we need, but the not set variable.
Regarding the installation asyncio-paho issue I can't help. For me your command worked well and I could install the package. Maybe a network issue?
Hope that helps.

@thomasklein1975
Copy link
Author

thx a lot again, sorry to bother you. i should better read readme.
maybe lib issue is related to my python version. as i read it needs python >= 3.8

happy new year!

@kalinrow
Copy link
Owner

kalinrow commented Jan 2, 2023

Hi Thomas,
no worries. We all don't like to read documentation ;)
You assumption about the python version seems to be right. asyncio-paho needs at least Python 3.8. I have added this information in the README as well.
Please also update to 0.5.2. There is a bug in 0.5.1 preventing the script to run for more than 10 seconds.You need also to update the config.py and remove the quotes around 10 for BROKER_INTERVAL variable. Correct line shoudl look like:
BROKER_INTERVAL = 10

@thomasklein1975
Copy link
Author

Hi Frank,

thx agains for hints. Updated to newest version 0.5.2.

After updating to python 3.10 still issue to install needed mqtt lib :-(

grafik

Hope I will soon get it right.

@kalinrow
Copy link
Owner

Hi Thomas,
that is strange. Unluckily I do not have a glue on how to solve this. That is my only Python project (I normally work with Java) :-(
Maybe you seek for help in python/pip forums?
I keep fingers crossed, that you will be able to solve it quickly.

@thomasklein1975
Copy link
Author

I did it with "sudo pip3.10 install ..." :-)

@kalinrow
Copy link
Owner

Ah - that makes sense. I guess with sudo pip3 only the lower version had been taken and not 3.10.
Maybe you should consider to remove the lower 3.x versions.

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

2 participants