rgerganov / py-air-control

Command line app for controlling Philips air purifiers
MIT License
266 stars 53 forks source link

Does not run on Windows #77

Closed wldevries closed 3 years ago

wldevries commented 3 years ago

When running this project on Windows I get the following error:

❯ airctrl
Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\wouter\AppData\Roaming\Python\Python39\Scripts\airctrl.exe\__main__.py", line 7, in <module>
  File "C:\Users\wouter\AppData\Roaming\Python\Python39\site-packages\pyairctrl\airctrl.py", line 435, in main
    devices = HTTPAirCli.ssdp(debug=args.debug)
  File "C:\Users\wouter\AppData\Roaming\Python\Python39\site-packages\pyairctrl\airctrl.py", line 94, in ssdp
    response = HTTPAirClient.ssdp(timeout, repeats)
  File "C:\Users\wouter\AppData\Roaming\Python\Python39\site-packages\pyairctrl\http_client.py", line 71, in ssdp
    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
AttributeError: module 'socket' has no attribute 'SO_REUSEPORT'
rgerganov commented 3 years ago

Thanks for the report, it should be fixed now