cannot find "alltime"

275 views
Skip to first unread message

VM_83

unread,
Mar 11, 2017, 6:54:43 PM3/11/17
to weewx-user
Hey guys,

i made an update on the newest version and now i get this failure









Mar 12 00:50:23 raspberrypi weewx[2485]: cheetahgenerator: Generate failed with exception '<class 'NameMapper.NotFound'>'


Mar 12 00:50:23 raspberrypi weewx[2485]: cheetahgenerator: **** Ignoring template /etc/weewx/skins/sofaskin/record.html.tmpl


Mar 12 00:50:23 raspberrypi weewx[2485]: cheetahgenerator: **** Reason: cannot find 'alltime'


Mar 12 00:50:23 raspberrypi weewx[2485]: ****  Traceback (most recent call last):


Mar 12 00:50:23 raspberrypi weewx[2485]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 329, in generate


Mar 12 00:50:23 raspberrypi weewx[2485]: ****      print >> _file, compiled_template


Mar 12 00:50:23 raspberrypi weewx[2485]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__


Mar 12 00:50:23 raspberrypi weewx[2485]: ****      rc = getattr(self, mainMethName)()


Mar 12 00:50:23 raspberrypi weewx[2485]: ****    File "_etc_weewx_skins_sofaskin_record_html_tmpl.py", line 221, in respond


Mar 12 00:50:23 raspberrypi weewx[2485]: ****  NotFound: cannot find 'alltime'


do you have any idea how to fix?

Thanks 
VM

mwall

unread,
Mar 11, 2017, 7:03:40 PM3/11/17
to weewx-user
On Saturday, March 11, 2017 at 6:54:43 PM UTC-5, VM_83 wrote:
i made an update on the newest version and now i get this failure

Mar 12 00:50:23 raspberrypi weewx[2485]: ****  NotFound: cannot find 'alltime'

do you have any idea how to fix?
 
the skin cannot find the 'alltime' search list extension.  cannot say how to fix it without knowing more about your configuration.

how did you do the upgrade?  what version of weewx were you running before?

what's in the skin.conf for sofaskin?

what's in your weewx configuration file?

m
Message has been deleted
Message has been deleted
Message has been deleted

VM_83

unread,
Mar 12, 2017, 6:40:43 AM3/12/17
to weewx-user
First i made an update from V.3.6.2 to v.3.7.0

Then i get this Error:

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****  No module named examples.xsearch

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****  Traceback (most recent call last):

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 239, in run

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****      obj.start()

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 273, in start

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****      self.run()

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 154, in run

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****      self.initExtensions(gen_dict[section_name])

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 196, in initExtensions

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****      class_ = weeutil.weeutil._get_object(x)

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1132, in _get_object

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****      mod = __import__(module)

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****  ImportError: No module named examples.xsearch

Mar 12 11:30:16 raspberrypi weewx[2485]:         ****  Generator terminated


So i deactivated this in the skin.conf
[CheetahGenerator]
    # This section is used by the generator CheetahGenerator, and specifies
    # which files are to be generated from which template.
    # Possible encodings are 'html_entities', 'utf8', or 'strict_ascii'
    encoding = html_entities
    # search_list_extensions = examples.xsearch.MyXSearch

This results in the "alltime" issue

ma...@erwinheger.de

unread,
Mar 12, 2017, 6:50:47 AM3/12/17
to weewx...@googlegroups.com
It won't solve itself by posting several times ...

First answer the questions of matthew, afterwards we know a bit more and can give better advise.

Erwin

> Am 12.03.2017 um 11:40 schrieb VM_83 <webm...@tinneff-blog.de>:
>
> First i made an update from V.3.6.2 to v.3.7.0
>

Eelco F

unread,
Mar 15, 2017, 5:17:52 AM3/15/17
to weewx-user
I'm having the same issue, as I posted in a separate post. Sorry, I overlooked this thread.

I have weewx running on ubuntu 16.04.2. I upgraded from 3.6.2 to 3.7.0. I must say I always performed a manual update until 3.6.2. Now I added the repository and upgraded by apt-get.

after that, I got this:

Mar 15 09:50:17 weerstation weewx[1446]: reportengine: Caught unrecoverable exception in generator weewx.cheetahgenerator.CheetahGenerator
Mar 15 09:50:17 weerstation weewx[1446]:         ****  No module named examples.xsearch
Mar 15 09:50:17 weerstation weewx[1446]:         ****  Traceback (most recent call last):
Mar 15 09:50:17 weerstation weewx[1446]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 239, in run
Mar 15 09:50:17 weerstation weewx[1446]:         ****      obj.start()
Mar 15 09:50:17 weerstation weewx[1446]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 273, in start
Mar 15 09:50:17 weerstation weewx[1446]:         ****      self.run()
Mar 15 09:50:17 weerstation weewx[1446]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 154, in run
Mar 15 09:50:17 weerstation weewx[1446]:         ****      self.initExtensions(gen_dict[section_name])
Mar 15 09:50:17 weerstation weewx[1446]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 196, in initExtensions
Mar 15 09:50:17 weerstation weewx[1446]:         ****      class_ = weeutil.weeutil._get_object(x)
Mar 15 09:50:17 weerstation weewx[1446]:         ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1132, in _get_object
Mar 15 09:50:17 weerstation weewx[1446]:         ****      mod = __import__(module)
Mar 15 09:50:17 weerstation weewx[1446]:         ****  ImportError: No module named examples.xsearch
Mar 15 09:50:17 weerstation weewx[1446]:         ****  Generator terminated
Mar 15 09:50:17 weerstation weewx[1446]: imagegenerator: Generated 11 images for StandardReport in 0.13 seconds


In my skin .conf there is this reference:
search_list_extensions = examples.xsearch.MyXSearch
I also tried to comment this out, it breaks things even further, as was said by TS.




Op zondag 12 maart 2017 11:50:47 UTC+1 schreef Erwin Heger:

Eelco F

unread,
Mar 15, 2017, 5:41:00 AM3/15/17
to weewx-user
On a second system, I'm getting the same error after the update. After that i manually re-installed 3.7.0 by dpkg -i. The issue still persists.

gjr80

unread,
Mar 15, 2017, 5:54:00 AM3/15/17
to weewx-user
Hi Eelco and VM-83,

I thought this had been answered but apparently not. WeeWX 3.7.0 saw the examples moved out of the bin directory and the xsearch.py SLE example was renamed stats.py. Similarly, the MyXSearch SLE was renamed MyStats (the MyXSearch SLE, now MyStats,provides the $alltime and $seven_day tags). Admittedly it was the 28th item in the change log included in the release post:

Moved examples out of bin directory.  Eliminated experimental directory.
Reinforce the use of user directory, eliminate use of examples directory.
Renamed xsearch.py to stats.py.

To get things working again you will need to copy the file stats.py from the examples directory to your bin/user directory (the examples directory is now in /home/weewx for a setup.py install, not so sure about rpm or deb packages though). Also, in skin.conf the line:

search_list_extensions = examples.xsearch.MyXSearch

will need to be changed to:

search_list_extensions = user.stats.MyStats

This should restore the $alltime and $seven_day tags.

Gary

gjr80

unread,
Mar 15, 2017, 6:10:28 AM3/15/17
to weewx-user
Ok, as far as I can tell the examples directory is not in the deb package so anyone using apt-get or dpkg will not have an examples directory. You can download the stats.py file directly from GitHub by typing the following from the command line on your weeWX machine:


That will download stats.py to the current directory, you can then copy it to the bin/user directory.

Gary

Eelco F

unread,
Mar 15, 2017, 9:51:14 AM3/15/17
to weewx-user
Dear Gary,

I think this is the issue, thank you for pointing that out. Shouldn't the installer just take care of this?

However I'm afraid I don quite follow your references to the directories. There is no such directory as /bin/user on my systems. So where exactly should the stats.py reside on a ubuntu/debian system?

Eelco



Op woensdag 15 maart 2017 11:10:28 UTC+1 schreef gjr80:

mwall

unread,
Mar 15, 2017, 9:59:27 AM3/15/17
to weewx-user
On Wednesday, March 15, 2017 at 9:51:14 AM UTC-4, Eelco F wrote:
However I'm afraid I don quite follow your references to the directories. There is no such directory as /bin/user on my systems. So where exactly should the stats.py reside on a ubuntu/debian system?

if you installed using a deb package, then the user directory is /usr/share/weewx/user

if you installed using setup.py, then the user directory is nominally /home/weewx/bin/user

m

vince

unread,
Mar 15, 2017, 10:02:10 AM3/15/17
to weewx-user
On Wednesday, March 15, 2017 at 6:51:14 AM UTC-7, Eelco F wrote:
However I'm afraid I don quite follow your references to the directories. There is no such directory as /bin/user on my systems. So where exactly should the stats.py reside on a ubuntu/debian system?


Read carefully, he said bin/user (ie, the user directory under the weewx $BINDIR) and not /bin/user (a hyptothetical user subdirectory under the os /bin tree)

You probably want to check out http://www.weewx.com/docs/usersguide.htm#Where_to_find_things in the User's Guide to find the location.  Best guess is /usr/share/weewx/bin/user for a Debian system.  You might have to create the directory (sorry - I run setup.py so I can't check easily from here).

Eelco F

unread,
Mar 15, 2017, 10:17:16 AM3/15/17
to weewx-user
Allright, I did check  /usr/share/weewx/user but that isn't bin/user right? So I wasn't sure to where he was referring to. I know things are different for setup.py en deb install.

Originally there was no stats.py in /usr/share/weewx/user, after the upgrade to 3.7.0. So i copied it manually now from github to this directory as instructed.
my skin.conf now has this line:  search_list_extensions = user.stats.Mystats



I'm still having issues:
Mar 15 15:10:15 kwsweerstation weewx[13955]: reportengine: Caught unrecoverable exception in generator weewx.cheetahgenerator.CheetahGenerator
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****  Module 'user.stats' has no attribute 'Mystats' when searching for 'user.stats.Mystats'
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****  Traceback (most recent call last):
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 239, in run
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****      obj.start()
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 273, in start
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****      self.run()
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 154, in run
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****      self.initExtensions(gen_dict[section_name])
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 196, in initExtensions
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****      class_ = weeutil.weeutil._get_object(x)
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1140, in _get_object
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****      raise AttributeError("Module '%s' has no attribute '%s' when searching for '%s'" % (mod.__name__, part, module_class))
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****  AttributeError: Module 'user.stats' has no attribute 'Mystats' when searching for 'user.stats.Mystats'
Mar 15 15:10:15 kwsweerstation weewx[13955]:         ****  Generator terminated


Eelco F

unread,
Mar 15, 2017, 10:18:54 AM3/15/17
to weewx-user
Oops, it should read: search_list_extensions = user.stats.MyStats, Iĺl try again

Thomas Keffer

unread,
Mar 15, 2017, 10:39:16 AM3/15/17
to weewx-user
Simple typo. Should be MyStats, not Mystats.

-tk

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eelco F

unread,
Mar 15, 2017, 11:02:49 AM3/15/17
to weewx-user
I noticed the typo already. It works now, Thanks a lot everyone.

Why isn't the stats file included in the deb package? It's not an extension is it?

Eelco




Op woensdag 15 maart 2017 15:39:16 UTC+1 schreef Tom Keffer:
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Thomas Keffer

unread,
Mar 15, 2017, 11:05:45 AM3/15/17
to weewx-user
Why isn't the stats file included in the deb package? It's not an extension is it?

​An oversight. It will be included in v3.7.1.

-tk​

Eelco F

unread,
Mar 15, 2017, 11:31:08 AM3/15/17
to weewx-user
Ah, very well. We're all human aren't we? ;)

Keep up the good work Tom, I really apreciate weewx and all your effort very much.

Op woensdag 15 maart 2017 16:05:45 UTC+1 schreef Tom Keffer:
Reply all
Reply to author
Forward
0 new messages