On 05/05/2023, Jarmo Seppänen <jarmo.t.seppa...@gmail.com> wrote:
> After installation I'm getting the following error to logs:
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__: Caught
> unrecoverable exception:
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****
>  'unit_system'
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****  Traceback
> (most recent call last):
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****    File
> "/home/weewx/bin/weewxd", line 148, in main
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****
>  engine = weewx.engine.StdEngine(config_dict)
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****    File
> "/home/weewx/bin/weewx/engine.py", line 93, in __init__
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****
>  self.loadServices(config_dict)
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****    File
> "/home/weewx/bin/weewx/engine.py", line 161, in loadServices
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****      obj =
> weeutil.weeutil.get_object(svc)(self, config_dict)
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****    File
> "/home/weewx/bin/user/wxtoot.py", line 290, in __init__
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****      usn =
>
> config_dict['StdReport']['Defaults']['unit_system']
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****    File
> "/usr/lib/python3/dist-packages/configobj.py", line 554, in __getitem__
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****      val =
> dict.__getitem__(self, key)
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****  KeyError:
> 'unit_system'
> May  5 10:57:35 raspi3b weewx[19058] CRITICAL __main__:     ****  Exiting.
> Any hints?

It's looking for the unit_system section in your weewx.conf file.
In the default weewx.conf for Weewx 4.10.2 it appears as follows...
[StdReport]
    [...]
    [[Defaults]]
            [...]
            unit_system = us

Do you have an entry for unit_system in your weewx.conf file?
If it's missing, then put one in and see if that fixes that hiccup
(and I'll rethink if that's the best place to discover the
unit_system, or what to do if it goes missing)

Which leads to...
 What version of weewx are you running,
 What's the version of wxtoot.py (at line 177)
 Have you edited the weewx.conf file and removed that entry?

> Also the parameter: server_url_mastodon = 'replace_me' confuses me. What is
> this exactly?

See the README, but to recap, it is as follows.

You are going to post to a Mastodon server. It lives somewhere and has
an address.
So, which one? What is its address? URL, IP?

That information replaces the place-holder  'replace_me' within your
weewx.conf file, as follows.

[StdRESTful]
    [...]
    [Mastodon]
        [...]
        server_url_mastodon = 'replace_me'

You will also need a 'key_access_token' which you can only get by
following the instructions on that server. It's available from your
account there.

Review the README.md , in particular the last section, after 'Options'

https://github.com/glennmckechnie/weewx-mastodon

If you are still having problems then attach the log and a sanitised
(password free) copy of weewx.conf to your next post, or send it
directly to me.

-- 

Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

-- 
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/CAAraAzjY8OqF9hUqxvPN%3DjO8dvedTi9hhGum7fLjNcTi2YPCiA%40mail.gmail.com.

Reply via email to