The error has everything to do with the database call. The question is not why does rr[0] raise an exception, but *why is rr None in the first place*? It is None because the record *was not in the database*. Why?
-tk On Thu, Apr 4, 2019 at 6:38 AM Luc Heijst <[email protected]> wrote: > On Thursday, 4 April 2019 10:26:56 UTC-3, Thomas Keffer wrote: >> >> #2 is what is happening here. >> > > Tom, > > The error has nothing to do with the database call. I agree: the value of > rr is None. > > When an object is None you can't get any attributes from it, like rr[0], > rr[1] etc. > So the exception is complaining you want an attribute from a NoneType > object > > Luc > > -- > 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. > -- 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.
