no module named alarm

126 views
Skip to first unread message

Constantine Samaklis

unread,
Mar 13, 2017, 8:29:43 AM3/13/17
to weewx-user
Hi,

One of the included examples for a "custom" service is alarm.py included in the examples directory. 

I just upgraded from 3.5 to 3.7 and I started getting the following error:

Mar 13 08:10:44 raspberrypi weewx[18326]: ****      engine = engine_class(config_dict)
Mar 13 08:10:44 raspberrypi weewx[18326]: ****    File "/home/weewx/bin/weewx/engine.py", line 77, in __init__
Mar 13 08:10:44 raspberrypi weewx[18326]: ****      self.loadServices(config_dict)
Mar 13 08:10:44 raspberrypi weewx[18326]: ****    File "/home/weewx/bin/weewx/engine.py", line 141, in loadServices
Mar 13 08:10:44 raspberrypi weewx[18326]: ****      self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Mar 13 08:10:44 raspberrypi weewx[18326]: ****    File "/home/weewx/bin/weeutil/weeutil.py", line 1132, in _get_object
Mar 13 08:10:44 raspberrypi weewx[18326]: ****      mod = __import__(module)
Mar 13 08:10:44 raspberrypi weewx[18326]: ****  ImportError: No module named alarm
Mar 13 08:10:44 raspberrypi weewx[18326]: ****  Exiting.

The alarm module is present in the examples directory and my configuration points to examples.alarm.MyAlarm in the report_services section

This was working fine up to version 3.5

What am I missing?



Constantine Samaklis

unread,
Mar 13, 2017, 8:47:46 AM3/13/17
to weewx-user
I copied the alarm.py module to <user_dir>/bin/user and it works fine. I guess the examples dir is no longer included in the paths that modules could be loaded from...

gjr80

unread,
Mar 13, 2017, 9:13:17 AM3/13/17
to weewx-user
Hi,

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.

Gary

vince

unread,
Mar 13, 2017, 6:45:36 PM3/13/17
to weewx-user
On Monday, March 13, 2017 at 6:13:17 AM UTC-7, gjr80 wrote:
Hi,

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.

yeah, that broke me too.

I'll just stick with 3.6.2 for the forseeable future until some cool feature appears making it worth the work to catch up.


vince

unread,
Mar 13, 2017, 6:46:17 PM3/13/17
to weewx-user
On Monday, March 13, 2017 at 3:45:36 PM UTC-7, vince wrote:

yeah, that broke me too.


Thank goodness for having this stuff all in github and automated in Vagrant for testing.  Whew. 
Reply all
Reply to author
Forward
0 new messages