I'm just guessing, but you could try to change line 488 in owfs.py from this

ow.init(self.interface)

to this

ow.init(self.interface.encode())

-tk


On Mon, Dec 23, 2019 at 3:46 PM Jaap de Munck <jaapdemu...@gmail.com> wrote:

> Hello,
>
> No problems with Vantage (Pro) and Weewx 4!
> But I also have a 1-wire sensor. OWFS isn't Python3 ready yet, so I tried
> to do that myself.
> The result seemed not so bad. It is running on Python3!
> It's also running on Python2.7: I copied it back to the 'production'
> system running weewx 3.9.2.
> Later the Weewx 4 test environment was switched back to Python2 resulting
> in:
>
> CRITICAL weewx.engine: Caught unrecoverable exception:
> CRITICAL weewx.engine:     ****  in method 'init', argument 1 of type
> 'char const *'
> CRITICAL weewx.engine:     ****  Traceback (most recent call last):
> CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/engine.py",
> line 886, in main
> CRITICAL weewx.engine:     ****      engine = StdEngine(config_dict)
> CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/engine.py",
> line 83, in __init__
> CRITICAL weewx.engine:     ****      self.loadServices(config_dict)
> CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/engine.py",
> line 143, in loadServices
> CRITICAL weewx.engine:     ****      obj =
> weeutil.weeutil.get_object(svc)(self,config_dict)
> CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/owfs.py",
> line 488, in __init__
> CRITICAL weewx.engine:     ****      ow.init(self.interface)
> CRITICAL weewx.engine:     ****    File
> "/usr/lib/python2.7/dist-packages/ow/__init__.py", line 220, in init
> CRITICAL weewx.engine:     ****      if not _OW.init( iface ):
> CRITICAL weewx.engine:     ****  TypeError: in method 'init', argument 1
> of type 'char const *'
> CRITICAL weewx.engine:     ****  Exiting.
>
> The logging (attached) is from a (virtual) Debian10 environment and Weewx4
> + Simulator driver. But it also occurs with Ubuntu 19.04 and Weewx4 +
> Vantage driver.
>
> Best wishes,
> Jaap
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-development+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-development/a160e60b-57fd-444f-bfb2-7bb9fb139366%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-development/a160e60b-57fd-444f-bfb2-7bb9fb139366%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

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

Reply via email to