betaboon / philips-airpurifier-coap

💨 Philips AirPurifier custom component for Home Assistant. With support for new Devices with CoAP protocol. Tested on AC2729/10 (bought early 2020)
70 stars 31 forks source link

source aioairctrl no longer working #11

Closed kongo09 closed 3 years ago

kongo09 commented 3 years ago

I just pulled the latest code from git and now your cli tool doesn't work anymore:

pi@raspberrypi:~/philips-airpurifier $ source aioairctrl-shell.sh
Invalid requirement: '@'
Traceback (most recent call last):
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/packaging-19.0-py2.py3-none-any.whl/packaging/requirements.py", line 93, in __init__
    req = REQUIREMENT.parseString(requirement_string)
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1632, in parseString
    raise exc
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1622, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 3395, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 3717, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1379, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 3378, in parseImpl
    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 1383, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/pyparsing-2.2.0-py2.py3-none-any.whl/pyparsing.py", line 2689, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/philips-airpurifier/.venv/lib/python3.7/site-packages/pip/_internal/req/constructors.py", line 253, in install_req_from_line
    req = Requirement(req)
  File "/home/pi/philips-airpurifier/.venv/share/python-wheels/packaging-19.0-py2.py3-none-any.whl/packaging/requirements.py", line 97, in __init__
    requirement_string[e.loc : e.loc + 8], e.msg
pip._vendor.packaging.requirements.InvalidRequirement: Parse error at "'@'": Expected W:(abcd...)
networkpotato commented 3 years ago

Same here

admin@NAS1:/$ cd philips-airpurifier
admin@NAS1:/philips-airpurifier$ source aioairctrl-shell.sh
-sh: source: aioairctrl-shell.sh: file not found
Blackhawk386 commented 3 years ago

Same problem here.

`/config # git clone https://github.com/betaboon/philips-airpurifier.git
Cloning into 'philips-airpurifier'...
remote: Enumerating objects: 253, done.
remote: Counting objects: 100% (253/253), done.
remote: Compressing objects: 100% (109/109), done.
remote: Total 515 (delta 131), reused 228 (delta 107), pack-reused 262
Receiving objects: 100% (515/515), 94.46 KiB | 848.00 KiB/s, done.
Resolving deltas: 100% (217/217), done.
/config # cd philips-airpurifier
/config/philips-airpurifier # source aioairctrl-shell.sh
ERROR: Invalid requirement: '@'
WARNING: You are using pip version 20.2.1; however, version 20.3.3 is available.
You should consider upgrading via the '/config/philips-airpurifier/.venv/bin/python3 -m pip install --upgrade pip' command.
/bin/sh: aioairctrl-shell.sh: line 22: aioairctrl: not found

I hope there is a solution.,,`

WerderFF commented 3 years ago

Hello, I think I've a similar problem. After installing the version from betaboon, I get the following error after resarting my HA: "No module named 'aioairctrl'". I there any solution for that?

Thanks in advance, Fabian!

o0v7r0o commented 3 years ago

@kongo09 it seems you can fix it by adjusting a regex a bit: change L4 in aioairctrl-shell.sh to: aioairctrl=$(grep -Po '(?<=aioairctrl\s@\s)[^"]+(?=")' $manifest)

betaboon commented 3 years ago

@kongo09 et al: i just released a new version which also might solve this issue.

if anyone has the time: please test and report back :)

kongo09 commented 3 years ago

aioairctrl seems to work again. There is an error when doing the source command, but in the end it looks ok:

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for pycryptodomex
  Running setup.py clean for pycryptodomex