hassio-addons icon indicating copy to clipboard operation
hassio-addons copied to clipboard

Python 2.7 error

Open little-better opened this issue 2 years ago • 4 comments

i have a problem running this addon due :

  File "/usr/local/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/inverter/__main__.py", line 1, in <module>
    import Inverter
  File "/inverter/Inverter.py", line 10, in <module>
    import anyconfig
  File "/usr/local/lib/python2.7/site-packages/anyconfig/__init__.py", line 24, in <module>
    from .api import (
  File "/usr/local/lib/python2.7/site-packages/anyconfig/api/__init__.py", line 124
    def version() -> typing.List[str]:
                  ^
SyntaxError: invalid syntax```


i don't know it's trying to run it with python 2.7. I have home assisntant os

little-better avatar Dec 29 '22 12:12 little-better

I have exactly the same problem. Do you know any solution for that?

pniewiadowski avatar Feb 11 '23 11:02 pniewiadowski

I have exactly the same problem. Do you know any solution for that?

i've cloned this repo and i've fixed it to work with python 3 but this addon is useless for me. The best way for now and for me is to add my sofar solar on the ginlong website and scrape it with node red

little-better avatar Feb 11 '23 18:02 little-better

@little-better Seems there is a scrapper already available: https://github.com/hultenvp/solis-sensor

pniewiadowski avatar Feb 25 '23 13:02 pniewiadowski

Change the line with pip to this line in Dockerfile RUN pip install paho-mqtt==1.2.3 anyconfig==0.9.11

sophipl avatar Oct 12 '23 11:10 sophipl