wizcon icon indicating copy to clipboard operation
wizcon copied to clipboard

Works fine but getting an error

Open rp1231 opened this issue 3 years ago • 8 comments

Hi, this works absolutely fine, but I get an error while executing it via cmd

Exception ignored in: <function wizlight.__del__ at 0x0000025A84156440>
Traceback (most recent call last):
  File "C:\Python310\lib\site-packages\pywizlight\bulb.py", line 781, in __del__
    self.loop.call_soon_threadsafe(self._async_close)
  File "C:\Python310\lib\asyncio\base_events.py", line 795, in call_soon_threadsafe
    self._check_closed()
  File "C:\Python310\lib\asyncio\base_events.py", line 515, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x0000025A84038A60>
Traceback (most recent call last):
  File "C:\Python310\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
  File "C:\Python310\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Python310\lib\asyncio\base_events.py", line 750, in call_soon
    self._check_closed()
  File "C:\Python310\lib\asyncio\base_events.py", line 515, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Thought I'd post it here just in case.

Thanks

rp1231 avatar Apr 20 '22 19:04 rp1231

Just curious, what version of pywizlight do you have installed? Mine below... FYI, pywizlight requires Python 3.

$ pip3 show pywizlight Name: pywizlight Version: 0.4.16 Summary: A python connector for WiZ light bulbs (e.g SLV Play) Home-page: https://github.com/sbidy/pywizlight Author: Stephan Traub Author-email: [email protected] License: MIT Location: /home/pi/src/pywizlight Requires: asyncio-dgram, click Required-by: wizcon

djacobson avatar Apr 21 '22 01:04 djacobson

I think that error is due to newer versions of Python, as described in https://github.com/sbidy/pywizlight/issues/140. @sbidy created a commit to address this, so I think this should be addressed in an upcoming version of pywizlight.

rgomezjnr avatar Apr 21 '22 04:04 rgomezjnr

@rgomezjnr Glad to hear that!

@djacobson Here is my version of pywizlight

Name: pywizlight
Version: 0.5.13
Summary: A python connector for WiZ light bulbs (e.g SLV Play)
Home-page: https://github.com/sbidy/pywizlight
Author: Stephan Traub
Author-email: [email protected]
License: MIT
Location: c:\python310\lib\site-packages
Requires: click
Required-by: wizcon

Also I noticed that you've used a '$' before the actual command. Why is that? I always get this error when I use the $ sign:

$ pip3 show pywizlight
'$' is not recognized as an internal or external command,
operable program or batch file.

I've seen the $ sign before commands in many places but never could figure out what it was for?

Thanks

rp1231 avatar Apr 21 '22 11:04 rp1231

Also I noticed that you've used a '$' before the actual command.

It's just part of the command prompt. You don't actually enter $ as part of the command in this case.

rgomezjnr avatar Apr 24 '22 00:04 rgomezjnr

Thanks for the explanation!

rp1231 avatar Apr 24 '22 12:04 rp1231

I have been having this issue as well, but in my case, the bulb is not reacting. The pywizlight version I am using is: 0.5.14 with python 3.7. Additionally, my buld is A19 - 1.27.0 (23007) Any help is appreciated!

vvenkatesh-ML avatar Aug 19 '22 18:08 vvenkatesh-ML

@vvenkatesh-ML Here's some troubleshooting steps:

  1. Verify the IP address of the bulb, either using your router or the Wiz app on your phone
  2. Try pinging the bulb e.g. ping IP
  3. Try using wizlight command that comes installed with pywizlight e.g. wizlight on

rgomezjnr avatar Aug 23 '22 04:08 rgomezjnr