comma in label in Seasons skin.conf causes failure

46 views
Skip to first unread message

cric...@pobox.com

unread,
Aug 30, 2023, 7:09:43 PM8/30/23
to weewx-user
I'm setting up yet another weewx instance, this time for plotting a solar charge controller.
Not stuck on this, but ran into an issue where having a comma in a label name causes
the traceback below.  I didn't try quoting the string, but removing the comma cleared
the issue.
This is the latest version; 4.10.2.
  Here's the config that causes the issue:
        [[[dayBatteryPwr]]]
            [[[[battV]]]]
            [[[[battC]]]]
               label = Battery Voltage, Current
and the error:
Traceback (most recent call last):
  File "/home/crichmon/weewx/bin/weewx/reportengine.py", line 197, in run
    obj.start()
  File "/home/crichmon/weewx/bin/weewx/reportengine.py", line 385, in start
    self.run()
  File "/home/crichmon/weewx/bin/weewx/imagegenerator.py", line 42, in run
    self.gen_images(self.gen_ts)
  File "/home/crichmon/weewx/bin/weewx/imagegenerator.py", line 107, in gen_images
    plot = self.gen_plot(plotgen_ts,
  File "/home/crichmon/weewx/bin/weewx/imagegenerator.py", line 293, in gen_plot
    label = self.text_dict.get(label, label)
  File "/usr/lib/python3/dist-packages/configobj.py", line 642, in get
    return self[key]
  File "/usr/lib/python3/dist-packages/configobj.py", line 554, in __getitem__
    val = dict.__getitem__(self, key)
TypeError: unhashable type: 'list'

Thx,Chris

Tom Keffer

unread,
Aug 30, 2023, 8:49:02 PM8/30/23
to weewx...@googlegroups.com
If a string has a comma in it, configobj, the configuration manager, interprets it as a list. That's why you have to quote it.

--
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/06808da0-95e7-4b9b-aad9-11fe17648360n%40googlegroups.com.

Graham Eddy

unread,
Aug 31, 2023, 1:53:52 AM8/31/23
to WeeWX User
for the forum search record, you can do a lot of stuff (especially using services) within one instance of weewx. you only *must* use separate instances when you need multiple drivers, or services conflict with each other. you *may* separate instances for operational or scalability purposes
⊣GE⊢

cric...@pobox.com

unread,
Aug 31, 2023, 9:09:19 AM8/31/23
to weewx-user
Thanks Graham,
   Yes, I'm aware, and have run multilple weewxes from a single directory (still multiple daemons) in the past.
In this case, it was a deliberate decision since the solar setup will be remote and I also intend on reproducing it
for a friend that's really remote, so this one is fully self contained.

Tom,
    I surmised that the comma was a configobj problem interpreting that entry as a list.  It still seems a bit
odd that labels with spaces also don't need to be quoted, but..."when in Rome..."  :^)  Learn something new
every day.

Thx, Chris

Reply all
Reply to author
Forward
0 new messages