Re: [weewx-user] KeyError: 'skin'

393 views
Skip to first unread message

Thomas Keffer

unread,
Feb 4, 2013, 10:55:33 AM2/4/13
to weewx...@googlegroups.com
Hi, Dave and welcome to the weewx user's group.

I suspect the problem is that your configuration file, weewx.conf, got messed up. Look in section [StdReport], subsection [[StandardReport]]. It should contain an option skin. So, it looks something like this:

[StdReport]
  
  SKIN_ROOT = skins

  HTML_ROOT = public_html

  [[StandardReport]]

    skin = Standard   # <---- Either this is missing, or got nested in the wrong subsection.

    .
    .
    .

Don't worry about not knowing Python. Unless you are doing customization, there is no reason you should know/care what language it is written in. The vast majority of the support questions have to do with things like operating systems permissions, or configuration, for which you will be well-equipped!

-tk

On Mon, Feb 4, 2013 at 6:49 AM, Dave Vaughan <jdvaug...@gmail.com> wrote:
I have just installed weewx and am trying to understand how it works. It seems to be working, at least as far as I can tell at the moment. I do have one error in the syslog that I cannot understand. Hope someone can get me started searching in the right direction. I have been using linux since the very beginning of linux, but I am a complete newby to python, bought the books but haven't read them yet.

Here is the syslog file entry.

Feb  4 15:40:17 spanky weewx[1995]: genimages: Generated 11 images in 0.10 seconds
Feb  4 15:40:17 spanky weewx[1995]: reportengine: Caught unrecoverable exception in generator weewx.reportengine.CopyGenerator
Feb  4 15:40:17 spanky weewx[1995]:         ****  'skin'
Feb  4 15:40:17 spanky weewx[1995]:         ****  Traceback (most recent call last):
Feb  4 15:40:17 spanky weewx[1995]:         ****    File "/opt/home/weewx/bin/weewx/reportengine.py", line 131, in run
Feb  4 15:40:17 spanky weewx[1995]:         ****      obj.start()
Feb  4 15:40:17 spanky weewx[1995]:         ****    File "/opt/home/weewx/bin/weewx/reportengine.py", line 154, in start
Feb  4 15:40:17 spanky weewx[1995]:         ****      self.run()
Feb  4 15:40:17 spanky weewx[1995]:         ****    File "/opt/home/weewx/bin/weewx/reportengine.py", line 253, in run
Feb  4 15:40:17 spanky weewx[1995]:         ****      self.skin_dict['skin']))
Feb  4 15:40:17 spanky weewx[1995]:         ****    File "/usr/lib/python2.7/dist-packages/configobj.py", line 567, in __getitem__
Feb  4 15:40:17 spanky weewx[1995]:         ****      val = dict.__getitem__(self, key)
Feb  4 15:40:17 spanky weewx[1995]:         ****  KeyError: 'skin'
Feb  4 15:40:17 spanky weewx[1995]:         ****  Generator terminated...


Thanks,
Dave

--
You received this message because you are subscribed to the Google Groups "Weewx Weather Station Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
  

Dave Vaughan

unread,
Feb 4, 2013, 11:37:55 AM2/4/13
to weewx...@googlegroups.com

I've been staring at this section for several days now, can't see anything wrong with it. Here is the section:
[StdReport]

    #
    # This section specifies what reports, using which skins, are to be generated.
    #

    # Where the skins reside, relative to WEEWX_ROOT:
    SKIN_ROOT = skins
   
    # Where the generated reports should go, relative to WEEWX_ROOT:
    HTML_ROOT = public_html

    # Each subsection represents a report you wish to run:
    [[StandardReport]]
   
        # What skin this report should be based on:
        skin = Standard

        # You can override values in the skin configuration file from here.
        # For example, uncommenting the next 3 lines would have pressure reported
        # in millibars, irregardless of what was in the skin configuration file
        # [[[Units]]]
        #     [[[[Groups]]]]
        #         group_pressure=mbar
   
    #
    # Here is an example where we create a custom report, still using the standard
    # skin, but where the image size is overridden, and the results are put in a
    # separate subdirectory 'public_html/big'
    #           
    #[[BigReport]]
    #    skin = Standard
    #    HTML_ROOT = public_html/big
    #    [[[Images]]]
    #        image_width = 600
    #        image_height = 360

I copied the weewx.conf back in after I had run setup.py, because I was trying to understand the error. I edited the file changing WEEWX_ROOT and the latitude and longitude, but it did not change anything.
The html files look OK.
Afterwards I unpacked everything again and ran setup.py again so that everything should be virgin, only the WEEWX_ROOT, latitude, longitude were changed.

Dave

Thomas Keffer

unread,
Feb 4, 2013, 12:13:15 PM2/4/13
to weewx...@googlegroups.com
OK, I'll need two things:
  1. Your complete weewx.conf. Obfuscate any passwords and send it directly to me tkeffer at gmail dot com. Make sure it is the one you are specifying on the command line!
  2. Exactly how you are running weewx. What working directory you are using and the command.
-tk
--
Tom Keffer
kef...@threefools.org
+1 541-386-8891 (h)
+1 541-490-9507 (c)
Skype: tkeffer

Dave Vaughan

unread,
Feb 4, 2013, 1:31:19 PM2/4/13
to weewx...@googlegroups.com
I just reread your post:

1. I sent the weewx.conf.
2. I am starting it in /etc/rc2.d/S85weex, I sent the file.

Thanks,
Dave Vaughan

Thomas Keffer

unread,
Feb 4, 2013, 3:57:29 PM2/4/13
to weewx...@googlegroups.com
Nothing obvious to me.

Could you please set debug=1 in weewx.conf, then try running from the command line?

$> cd /opt/home/weewx
$> ./bin/weewxd.py weewx.conf

Send the log from the startup. 

If I don't get a stroke of inspiration, we'll try instrumenting your code.

-tk

Dave Vaughan

unread,
Feb 4, 2013, 4:27:07 PM2/4/13
to weewx...@googlegroups.com
Oh heck, I've broken something else now:

Traceback (most recent call last):
  File "./bin/weewxd.py", line 68, in <module>
    weewx.wxengine.main(options, args)
  File "/opt/home/weewx/bin/weewx/wxengine.py", line 839, in main
    engine.run()
  File "/opt/home/weewx/bin/weewx/wxengine.py", line 139, in run
    self.dispatchEvent(weewx.Event(weewx.STARTUP))
  File "/opt/home/weewx/bin/weewx/wxengine.py", line 189, in dispatchEvent
    callback(event)
  File "/opt/home/weewx/bin/weewx/wxengine.py", line 430, in startup
    self._catchup()
  File "/opt/home/weewx/bin/weewx/wxengine.py", line 541, in _catchup
    self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, record=record))
  File "/opt/home/weewx/bin/weewx/wxengine.py", line 189, in dispatchEvent
    callback(event)
  File "/opt/home/weewx/bin/weewx/wxengine.py", line 496, in new_archive_record
    self.archive.addRecord(event.record)
  File "/opt/home/weewx/bin/weewx/archive.py", line 155, in addRecord
    "differs from the archive database (0x%x)" % (record['usUnits'], self.std_unit_system))
ValueError: Unit system of incoming record (0x1) differs from the archive database (0x10)

Looks as if copying the virgin file back in brought in usUnits and I had been running with Metric.

Tell you what, I will remove everything tomorrow and reinstall from the beginning and get back with you if it does not work.

Thanks for your quick response and help.

Best regards,
Dave Vaughan
----------------------------------------------------------------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages