What's the best way to get that stack trace? I did find this bug, not at all related to weewx, but is it possible that the config parser for the report engine is not pleased with that config syntax? https://github.com/nose-devs/nose/issues/733
On Wednesday, September 30, 2020 at 8:58:31 AM UTC-6 tke...@gmail.com wrote: > A bit of explanation of how logging works: each module in weewx uses a > different 'logger.' If you look at the top of reportengine.py, you'll see > > log = logging.getLogger(__name__) > > This sets the logger for the module reportengine.py to __name__, or > 'weewx.reportengine'. That's why the error is marked as weewx.reportengine. > That's just who is making the log entry. It does not necessarily reflect > where the error occurred. > > The exception was actually raised deeper down the call stack. To see > exactly where, we'd have to ask for a stack trace. The log entry is being > made by weewx.reportengine because that's where the exception was caught. > > The report engine runs in its own thread. It can crash, as it did, without > bringing down the rest of WeeWX. That's why MQTT and the rest of the > program continue to run. > > -tk > > On Wed, Sep 30, 2020 at 6:57 AM Tom Quinn <tjq...@gmail.com> wrote: > >> I'm running Python 3.8.5. >> >> I'm slightly confused though, because the format specifier %(asctime)s >> is doing exactly what it should.... >> it seems to me, that weewx.reportengine: Syntax error: missing option >> "asctime" in interpolation. would be the report engine trying to do >> something with a bit of weewx.conf that it shouldn't be... that's also the >> only thing that stops working (no reports are generated, but data is still >> logged and MQTT still operates) when I uncomment those 3 lines in my >> weewx.conf file. >> am I wrong? (I totally could be!) >> >> On Wednesday, September 30, 2020 at 5:48:16 AM UTC-6 tke...@gmail.com >> wrote: >> >>> The format specifier %(asctime)s is supplied by the Python library, not >>> WeeWX. Documentation >>> <https://docs.python.org/3/library/logging.html#logrecord-attributes>. >>> >>> Looks like there's a bug in either your copy of the library, or in the >>> OS. I don't know what version of Python you are using, but perhaps you >>> could upgrade to a later version...? >>> >>> On Tue, Sep 29, 2020 at 7:52 PM Tom Quinn <tjq...@gmail.com> wrote: >>> >>>> I’m on Alpine Linux inside a docker container... the reason the log >>>> goes in the user directory is because syslog doesn’t work properly in >>>> python 3 under alpine... for some reason that’s beyond my ability to >>>> fix... >>>> >>>> Everything works fine if I remove the format deceleration... but if >>>> it’s there, the archive process never seems to complete successfully. >>>> >>>> On Tue, Sep 29, 2020 at 19:31 Tom Keffer <tke...@gmail.com> wrote: >>>> >>>>> Putting aside the wisdom of putting the log in the user subdirectory, >>>>> this worked for me and results in log entries that look like: >>>>> >>>>> 2020-09-29 18:16:32,402 wee_reports[16734] DEBUG weewx.engine: Loading >>>>> service weewx.restx.StdCWOP >>>>> 2020-09-29 18:16:32,402 wee_reports[16734] DEBUG weewx.engine: >>>>> Finished loading service weewx.restx.StdCWOP >>>>> 2020-09-29 18:16:32,402 wee_reports[16734] DEBUG weewx.engine: Loading >>>>> service weewx.restx.StdWOW >>>>> 2020-09-29 18:16:32,402 wee_reports[16734] DEBUG weewx.engine: >>>>> Finished loading service weewx.restx.StdWOW >>>>> 2020-09-29 18:16:32,402 wee_reports[16734] DEBUG weewx.engine: Loading >>>>> service weewx.restx.StdAWEKAS >>>>> 2020-09-29 18:16:32,402 wee_reports[16734] DEBUG weewx.engine: >>>>> Finished loading service weewx.restx.StdAWEKAS >>>>> etc. >>>>> >>>>> What platform are you running on? >>>>> >>>>> -tk >>>>> >>>>> On Tue, Sep 29, 2020 at 12:31 PM Tom Quinn <tjq...@gmail.com> wrote: >>>>> >>>>>> Hello, >>>>>> I've put the below into my weewx.conf file to modify the logging >>>>>> since I'm running this in a docker container: >>>>>> >>>>>> [Logging] >>>>>> # Root logger >>>>>> [[root]] >>>>>> handlers = rotate, # 1 >>>>>> [[loggers]] >>>>>> [[[weewx.restx]]] >>>>>> level = WARNING >>>>>> [[handlers]] >>>>>> # Log to a set of rotating files >>>>>> [[[rotate]]] >>>>>> level = DEBUG # 2 >>>>>> formatter = standard # 3 >>>>>> class = logging.handlers.RotatingFileHandler # 4 >>>>>> filename = /home/weewx/bin/user/weewx.log # 5 >>>>>> maxBytes = 5000000 # 6 >>>>>> backupCount = 1 # 7 >>>>>> [[formatters]] >>>>>> [[[standard]]] >>>>>> format = "%(asctime)s {process_name}[%(process)d] >>>>>> %(levelname)s %(name)s: %(message)s" >>>>>> >>>>>> >>>>>> Everything works great! except, I get the following in the log when >>>>>> the archive runs: >>>>>> >>>>>> 2020-09-29 13:25:20,887 weewx[1] ERROR weewx.reportengine: Syntax >>>>>> error: missing option "asctime" in interpolation. >>>>>> 2020-09-29 13:25:20,887 weewx[1] ERROR weewx.reportengine: **** >>>>>> Report ignored >>>>>> 2020-09-29 13:25:20,958 weewx[1] ERROR weewx.reportengine: Syntax >>>>>> error: missing option "asctime" in interpolation. >>>>>> 2020-09-29 13:25:20,959 weewx[1] ERROR weewx.reportengine: **** >>>>>> Report ignored >>>>>> 2020-09-29 13:25:20,994 weewx[1] ERROR weewx.reportengine: Syntax >>>>>> error: missing option "asctime" in interpolation. >>>>>> 2020-09-29 13:25:20,994 weewx[1] ERROR weewx.reportengine: **** >>>>>> Report ignored >>>>>> 2020-09-29 13:25:21,010 weewx[1] ERROR weewx.reportengine: Syntax >>>>>> error: missing option "asctime" in interpolation. >>>>>> 2020-09-29 13:25:21,010 weewx[1] ERROR weewx.reportengine: **** >>>>>> Report ignored >>>>>> >>>>>> Any thoughts on how to resolve that error? it seems to be >>>>>> misinterpreting the config options as something it should do something >>>>>> with.... >>>>>> >>>>>> Thanks! >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>> >>>>>> >>>>>> 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+...@googlegroups.com. >>>>>> >>>>>> >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/weewx-user/dd79c7f4-df93-4116-a693-8de6d720f825n%40googlegroups.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/weewx-user/dd79c7f4-df93-4116-a693-8de6d720f825n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "weewx-user" group. >>>>> >>>>> >>>>> To unsubscribe from this topic, visit >>>>> https://groups.google.com/d/topic/weewx-user/qpIkYTTegwo/unsubscribe. >>>>> >>>>> >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> weewx-user+...@googlegroups.com. >>>>> >>>>> >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/weewx-user/CAPq0zECaHT9egDROde%3DaHkhQJ7LUq0XmOGC1epL_DpYuLpCTCg%40mail.gmail.com >>>>> >>>>> <https://groups.google.com/d/msgid/weewx-user/CAPq0zECaHT9egDROde%3DaHkhQJ7LUq0XmOGC1epL_DpYuLpCTCg%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>>> >>>>> -- >>>> ------------------------------------ >>>> Tom Quinn >>>> >>>> -- >>>> 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+...@googlegroups.com. >>>> >>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/weewx-user/CAOemRRG%2Bs%2BC%2BjAuXeQxmr-i8W8siTnY-iUPHH53ipdP2R8Spig%40mail.gmail.com >>>> >>>> <https://groups.google.com/d/msgid/weewx-user/CAOemRRG%2Bs%2BC%2BjAuXeQxmr-i8W8siTnY-iUPHH53ipdP2R8Spig%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> 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+...@googlegroups.com. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/be1c1759-8463-4738-99bd-e640e0a1fc6dn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/be1c1759-8463-4738-99bd-e640e0a1fc6dn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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/ab83d074-1bd5-440d-bdae-9f49713cdff1n%40googlegroups.com.