matthewwall / weewx-sftp

report generator that uploads files using sftp
GNU General Public License v3.0
13 stars 3 forks source link

Generator ignored #1

Closed JWarmenhoven closed 6 years ago

JWarmenhoven commented 6 years ago

Hi,

I installed as instructed but the module is being ignored by the reportengine. It has been a while since I navigated the weewx code so I am not sure what is going on here. I think it is a naming/path issue.

reportengine: Unable to instantiate generator user.SFTPGenerator
Sep 16 08:40:18 4core weewx[16120]:         ****  Module 'user' has no attribute 'SFTPGenerator' when searching for 'user.SFTPGenerator'
Sep 16 08:40:18 4core weewx[16120]:         ****  Traceback (most recent call last):
Sep 16 08:40:18 4core weewx[16120]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 220, in run
Sep 16 08:40:18 4core weewx[16120]:         ****      obj = weeutil.weeutil._get_object(generator)(
Sep 16 08:40:18 4core weewx[16120]:         ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1140, in _get_object
Sep 16 08:40:18 4core weewx[16120]:         ****      raise AttributeError("Module '%s' has no attribute '%s' when searching for '%s'" % (mod.__name__, part, module_class))
Sep 16 08:40:18 4core weewx[16120]:         ****  AttributeError: Module 'user' has no attribute 'SFTPGenerator' when searching for 'user.SFTPGenerator'
Sep 16 08:40:18 4core weewx[16120]:         ****  Generator ignored

/etc/weewx/skins/sftp/skin.conf looks ok.

[Generators]
    generator_list = user.SFTPGenerator

/etc/weewx/weewx.conf contains the [[sftp]] report config entry as indicated in the install instructions.

sftp.py has been installed in /usr/share/weewx/user

Do you know what is causing weewx to ignore the module?

Great idea to have this sftp module by the way!

matthewwall commented 6 years ago

the skin.conf should be:

[Generators]
    generator_list = user.sftp.SFTPGenerator

fixed at commit 78df7e7