Strange, I wouldn't have thought that would bite with python2.7 ?
It's really one for an expert,  but you can try the following and see
if it gets you any further.

line 205 in owfs.py
try changing that from...

owbinding.init(iface)

to...

owbinding.init(iface.encode())

On 22/05/2020, Gazza <gazc...@gmail.com> wrote:
>
> I have just finished a new V4 python2 weewx build to overcome the
> python3-ow issues raised in another post.
>
> So far I have the SDR driver stuff working and my Fine Offset station and
> my other sensors are detected and are reporting correctly.
>
> I have just installed OWFS as a service for a one wire sensor and while it
> seems to have installed correctly and when I run the owfs.py directly I get
>
> the expected result.
>
> pi@GazPi4:/home/weewx $ sudo PYTHONPATH=/home/weewx/bin python /home/weewx/
> bin/user/owfs.py --sensors --iface /dev/i2c-1
> E10441040000: /28.E10441040000 DS18B20
>
> But when I run weewx directly it crashes with a bunch of critical errors.
> It looks like the OWFS interface is detected correctly on i2c-1 but then
> fail with engine.py and owfs errors.
>
> EMay 22 22:22:24 GazPi4 weewx[1817] INFO __main__: Locale is 'en_AU'
> May 22 22:22:24 GazPi4 weewx[1817] INFO __main__: Using configuration file
> weewx.conf
> May 22 22:22:24 GazPi4 weewx[1817] INFO weewx.engine: Loading station type
> SDR (user.sdr)
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.sdr: driver version is 0.77
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.sdr: sensor map is
> {u'windGust'
> : u'wind_gust.38.FOWHx080Packet', u'outTempBatteryStatus': u
> 'battery.38.FOWHx080Packet', u'rain_total': u'rain_total.38.FOWHx080Packet',
>
> u'windSpeed': u'wind_speed.38.FOWHx080Packet', u'windDir': u
> 'wind_dir.38.FOWHx080Packet', u'outHumidity': u'humidity.38.FOWHx080Packet',
>
> u'outTemp': u'temperature.38.FOWHx080Packet', u'extraTemp1': u
> 'temperature.32D1.AcuriteTowerPacketV2', u'batteryStatus1': u
> 'battery.32D1.AcuriteTowerPacketV2', u'extraTemp2': u
> 'temperature.39.ProloguePacket', u'extraHumid2': u
> 'humidity.39.ProloguePacket', u'batteryStatus2': u
> 'battery.39.ProloguePacket', u'extraTemp3': u
> 'temperature.1:180.NexusTemperaturePacket', u'extraHumid3': u
> 'humidity.1:180.NexusTemperaturePacket', u'batteryStatus3': u
> 'battery.1:180.NexusTemperaturePacket', u'extraTemp4': u
> 'temperature.5.ProloguePacket', u'extraHumid4':
> u'humidity.5.ProloguePacket'
> , u'batteryStatus4': u'battery.5.ProloguePacket'}
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.sdr: deltas is {'strikes':
> 'strikes_total', 'rain': 'rain_total'}
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.sdr: startup process 'rtl_433
> -M utc -F json'
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: service version is 0.23
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: binding is archive
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: interface is /dev/i2c-1
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: sensor map is {u
> 'extraTemp5': u'/uncached/28.E10441040000/temperature'}
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: sensor type map is {}
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.owfs: sensor unit system is
> metric
> May 22 22:22:24 GazPi4 weewx[1817] INFO user.sdr: shutdown process rtl_433
> -M
> utc -F json
> May 22 22:22:25 GazPi4 kernel: [ 2598.911132] r820t 8-001a: destroying
> instance
> May 22 22:22:25 GazPi4 kernel: [ 2598.911503] dvb_usb_v2: 'Realtek RTL2832U
>
> reference design:1-1.2' successfully deinitialized and disconnected
> May 22 22:22:34 GazPi4 weewx[1817] INFO user.sdr: timed out waiting for
> stdout-thread
> May 22 22:22:44 GazPi4 weewx[1817] INFO user.sdr: timed out waiting for
> stderr-thread
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__: Caught unrecoverable
> exception:
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****  in method
> 'init', argument 1 of type 'char const *'
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****  Traceback
> (most
> recent call last):
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****    File
> "./bin/weewxd", line 148, in main
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****      engine =
>
> weewx.engine.StdEngine(config_dict)
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****    File
> "/home/weewx/bin/weewx/engine.py", line 75, in __init__
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****      self.
> loadServices(config_dict)
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****    File
> "/home/weewx/bin/weewx/engine.py", line 138, in loadServices
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****      obj =
> weeutil.weeutil.get_object(svc)(self,config_dict)
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****    File
> "/home/weewx/bin/user/owfs.py", line 574, in __init__
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****
> ow.init(
> self.interface)
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****    File
> "/home/weewx/bin/user/owfs.py", line 205, in init
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****
>  owbinding.init(iface)
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****    File
> "/usr/lib/python2.7/dist-packages/ow/__init__.py", line 220, in init
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****      if not
> _OW.init( iface ):
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****  TypeError:
> in method 'init', argument 1 of type 'char const *'
> May 22 22:22:44 GazPi4 weewx[1817] CRITICAL __main__:     ****  Exiting.
> May 22 22:22:46 GazPi4 kernel: [ 2620.490958] usb 1-1.2: dvb_usb_v2: found
> a 'Realtek RTL2832U reference design' in warm state
> May 22 22:22:46 GazPi4 kernel: [ 2620.547959] usb 1-1.2: dvb_usb_v2: will
> pass the complete MPEG2 transport stream to the software demuxer
> May 22 22:22:46 GazPi4 kernel: [ 2620.548004] dvbdev: DVB: registering new
> adapter (Realtek RTL2832U reference design)
> May 22 22:22:46 GazPi4 kernel: [ 2620.563832] i2c i2c-7: Added multiplexed
> i2c bus 8
> May 22 22:22:46 GazPi4 kernel: [ 2620.563857] rtl2832 7-0010: Realtek
> RTL2832 successfully attached
> May 22 22:22:46 GazPi4 kernel: [ 2620.563964] usb 1-1.2: DVB: registering
> adapter 0 frontend 0 (Realtek RTL2832 (DVB-T))...
> May 22 22:22:46 GazPi4 kernel: [ 2620.564273] r820t 8-001a: creating new
> instance
> May 22 22:22:46 GazPi4 kernel: [ 2620.571436] r820t 8-001a: Rafael Micro
> r820t successfully identified
> May 22 22:22:46 GazPi4 kernel: [ 2620.599402] Registered IR keymap rc-empty
> May 22 22:22:46 GazPi4 kernel: [ 2620.599555] rc rc0: Realtek RTL2832U
> reference design as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:
> 00.0/0000:01:00.0/usb1/1-1/1-1.2/rc/rc0
> May 22 22:22:46 GazPi4 kernel: [ 2620.599752] input: Realtek RTL2832U
> reference design as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:
> 00.0/0000:01:00.0/usb1/1-1/1-1.2/rc/rc0/input9
> May 22 22:22:46 GazPi4 kernel: [ 2620.600104] rc rc0: lirc_dev: driver
> dvb_usb_rtl28xxu registered at minor = 0, raw IR receiver, no transmitter
> May 22 22:22:46 GazPi4 kernel: [ 2620.600310] usb 1-1.2: dvb_usb_v2:
> schedule remote query interval to 200 msecs
> May 22 22:22:46 GazPi4 kernel: [ 2620.608788] usb 1-1.2: dvb_usb_v2:
> 'Realtek
> RTL2832U reference design' successfully initialized and connected
> May 22 22:22:47 GazPi4 systemd-udevd[1842]: Process '/usr/sbin/th-cmd
> --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
>
>
> My current weewx.conf with a few bits removed is attached.
>
>
> Gaz
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/fea093e6-b69d-4749-9244-35fe0227f225%40googlegroups.com.
>


-- 


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAAraAzh00gWO3qX4CR2jtc_yCrDhc7J4kJmiPV3WQ5S9ojVh-w%40mail.gmail.com.

Reply via email to