jardiamj / wmII

GNU General Public License v3.0
4 stars 2 forks source link

Weewx wmII TypeError #6

Closed wjs33 closed 4 years ago

wjs33 commented 4 years ago

Hi.. I have Raspeberry 3 , weewx with wmII... When run weewx havethis error:

sudo weewxd /etc/weewx/weewx.conf Traceback (most recent call last): File "/usr/share/weewx/weewxd", line 261, in main() File "/usr/share/weewx/weewxd", line 154, in main engine.run() File "/usr/share/weewx/weewx/engine.py", line 158, in run self.dispatchEvent(weewx.Event(weewx.STARTUP)) File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent callback(event) File "/usr/share/weewx/weewx/engine.py", line 691, in startup self.do_sync() File "/usr/share/weewx/weewx/engine.py", line 705, in do_sync console_time = self.engine.console.getTime() File "/usr/share/weewx/user/wmII.py", line 96, in getTime return self.station.get_time() File "/usr/share/weewx/user/wmII.py", line 156, in get_time d = self.ReadWRD(6, 1, 0xBE) File "/usr/share/weewx/user/wmII.py", line 198, in ReadWRD "WRD" + chr((n << 4) | bankval) + chr(addr & 0x00FF) + chr(0xD) File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 532, in write d = to_bytes(data) File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 63, in to_bytes raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq)) TypeError: unicode strings are not supported, please encode to bytes: 'WRDd¾\r'

How fix ?

Thanks

Best Regards.

wjs33 commented 4 years ago

I changed Python 3 for Python 2 ,then run normally

jardiamj commented 4 years ago

It looks like I will have to make some changes to the driver for it to work with Python 3. I will get to it this week. Thanks for the heads up!