PYWWS error: usbdevice.read_data failed

22 views
Skip to first unread message

Rostislav Laifr

unread,
Sep 12, 2024, 7:49:35 AM9/12/24
to pywws
Hello, I am new on this forum and not a very experienced user of Python.
Recently, I have bought WH-1080 weather station.
Communication with applications like Easyweather and Cumulus 1 by USB is OK.
I tried to use Python software PYWWS (with Python 3.10 64bit on Windows 10).
Running Testweatherstation.py was repeatedly interrupted with this message:
-------------------------------------------------------------------------------
Python 3.10.2 (tags/v3.10.2:a58ebcc, Jan 17 2022, 14:12:15) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.

= RESTART: D:\Internet_C\Python\Pywws\pywws-master\src\pywws\testweatherstation.py
11:49:56:pywws.logger:pywws version 24.8.0, build 1711 (7883e71)
Traceback (most recent call last):
  File "D:\Internet_C\Python\Pywws\pywws-master\src\pywws\testweatherstation.py", line 190, in <module>
    sys.exit(main())
  File "D:\Internet_C\Python\Pywws\pywws-master\src\pywws\testweatherstation.py", line 118, in main
    raw_fixed = ws.get_raw_fixed_block()
  File "C:\Users\Rostislav\AppData\Local\Programs\Python\Python310\lib\site-packages\pywws\weatherstation.py", line 728, in get_raw_fixed_block
    self._fixed_block = self._read_fixed_block()
  File "C:\Users\Rostislav\AppData\Local\Programs\Python\Python310\lib\site-packages\pywws\weatherstation.py", line 772, in _read_fixed_block
    result += self._read_block(mempos)
  File "C:\Users\Rostislav\AppData\Local\Programs\Python\Python310\lib\site-packages\pywws\weatherstation.py", line 760, in _read_block
    new_block = self.cusb.read_block(ptr)
  File "C:\Users\Rostislav\AppData\Local\Programs\Python\Python310\lib\site-packages\pywws\weatherstation.py", line 346, in read_block
    return self.dev.read_data(32)
  File "C:\Users\Rostislav\AppData\Local\Programs\Python\Python310\lib\site-packages\pywws\device_libusb1.py", line 103, in read_data
    raise IOError('pywws.device_libusb1.USBDevice.read_data failed')
OSError: pywws.device_libusb1.USBDevice.read_data failed
-------------------------------------------------------------------------------
What can be the problem and how it could be solved?

Jim Easterbrook

unread,
Sep 12, 2024, 7:56:17 AM9/12/24
to py...@googlegroups.com
On 12/09/2024 12:48, Rostislav Laifr wrote:
> Hello, I am new on this forum and not a very experienced user of Python.
> Recently, I have bought WH-1080 weather station.
> Communication with applications like Easyweather and Cumulus 1 by USB is OK.
> I tried to use Python software PYWWS (with Python 3.10 64bit on Windows 10).
> Running Testweatherstation.py was repeatedly interrupted with this message:

>   File
> "C:\Users\Rostislav\AppData\Local\Programs\Python\Python310\lib\site-packages\pywws\device_libusb1.py", line 103, in read_data
>     raise IOError('pywws.device_libusb1.USBDevice.read_data failed')
> OSError: pywws.device_libusb1.USBDevice.read_data failed
> -------------------------------------------------------------------------------
> What can be the problem and how it could be solved?

I don't know much about Windows, but I know USB can be a problem. I
think you may need to uninstall any driver assigned to the weather
station, and then assign it to libusb.

This might help:
https://github.com/libusb/libusb/wiki/Windows#user-content-How_to_use_libusb_on_Windows

--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

Rostislav Laifr

unread,
Sep 12, 2024, 12:33:30 PM9/12/24
to py...@googlegroups.com
Thank you very much for your advice. I tried to use Zadig application to replace hidUSB driver, which is used by Easyweather and Cumulus, 
by WinUSB driver. After that, Testweatherstation.py ran without errors. But with this new driver, Easyweather and Cumulus did not work normally.
So, for to be able to run these applications, I had to return former driver using system settings in Windows.

--
You received this message because you are subscribed to a topic in the Google Groups "pywws" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pywws/QZCGzJKZsvE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/74ccacbc-13cd-44bb-8f05-00663b8333c8%40jim-easterbrook.me.uk.

Jim Easterbrook

unread,
Sep 12, 2024, 12:36:19 PM9/12/24
to py...@googlegroups.com
On 12/09/2024 17:33, Rostislav Laifr wrote:
> Thank you very much for your advice. I tried to use Zadig application to
> replace hidUSB driver, which is used by Easyweather and Cumulus,
> by WinUSB driver. After that, Testweatherstation.py ran without errors.
> But with this new driver, Easyweather and Cumulus did not work normally.
> So, for to be able to run these applications, I had to return former
> driver using system settings in Windows.

That's what I would expect.

Most of us run pywws on a Raspberry Pi or similar small Linux computer
that stays on continuously, and can't run Easyweather or Cumulus.
Reply all
Reply to author
Forward
0 new messages