If a string has a comma in it, configobj
<https://configobj.readthedocs.io/en/latest/>, the configuration manager,
interprets it as a list. That's why you have to quote it.

On Wed, Aug 30, 2023 at 4:09 PM cric...@pobox.com <crich...@pobox.com>
wrote:

> 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
>
> --
> 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/06808da0-95e7-4b9b-aad9-11fe17648360n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/06808da0-95e7-4b9b-aad9-11fe17648360n%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/CAPq0zEDYC_pcw4XW22oMe1wqnhhOD%3D_wZS40_3jwCXZm7kvwzQ%40mail.gmail.com.

Reply via email to