On Monday, June 5, 2017 at 11:32:21 PM UTC-4, Don wrote: > > > Jun 04 06:05:25 wee weewx[1729]: **** File > "/usr/share/weewx/weewx/drivers/fousb.py", line 715, in power_cycle_station > Jun 04 06:05:25 wee weewx[1729]: **** devid = "%s:%03d" % > (bus.dirname, dev.devnum) > Jun 04 06:05:25 wee weewx[1729]: **** TypeError: %d format: a number > is required, not NoneType > Jun 04 06:05:25 wee weewx[1729]: **** Exiting. > > the code for managing a powered hub in fousb.py assumes pyusb version 0.1. newer versions of pyusb return None for dirname and devnum.
as a workaround, you could change line 715 from this: devid = "%s:%03d" % (bus.dirname, dev.devnum) to this: devid = "%s:%s" % (bus.dirname, dev.devnum) but that will probably only prevent the exception - it won't enable the power cycling because you won't get a match for dirname:devnum. another option is to downgrade to pyusb 0.1 instead of pyusb 1.0 one of these days i'll have to make the hub control stuff into a standalone weewx service... m -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
