I looked at the code in my GitHub, and it appeared that the last line
schema_with_sunshine_time = schemas.wview.schema + [('sunshine_time', 'REAL')]
had a wrong indentation.
This is corrected now. Sorry !
> Le 18 juil. 2022 à 15:43, Jon B <[email protected]> a écrit :
>
> Sorry for piggybacking on this conversation, but it seemed like an
> appropriate place to ask this.
>
> I'm trying to install the sunshine duration extension
> (https://github.com/Jterrettaz/sunduration) but I'm getting an error when
> trying to create the new database. I've followed the installation
> instructions as follows:
>
> - Saved sunduration.py to /usr/share/weewx/user/
> - Added user.sunduration.SunshineDuration to the process_services list
> - Changed the wx_binding schema to user.sunduration.schema_with_sunshine_time
> - Stopped weewx and ran wee_database weewx.conf --reconfigure
>
> This gives the following error:
>
> Using configuration file weewx.conf
> Using database binding 'wx_binding', which is bound to database
> 'archive_sqlite'
> Traceback (most recent call last):
> File "/usr/share/weewx/weeutil/weeutil.py", line 1155, in get_object
> mod = getattr(mod, part)
> AttributeError: module 'user.sunduration' has no attribute
> 'schema_with_sunshine_time'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "/usr/share/weewx/wee_database", line 1170, in <module>
> main()
> File "/usr/share/weewx/wee_database", line 216, in main
> reconfigMainDatabase(config_dict, db_binding)
> File "/usr/share/weewx/wee_database", line 439, in reconfigMainDatabase
> manager_dict = weewx.manager.get_manager_dict_from_config(config_dict,
> File "/usr/share/weewx/weewx/manager.py", line 727, in
> get_manager_dict_from_config
> manager_dict['schema'] = weeutil.weeutil.get_object(schema_name)
> File "/usr/share/weewx/weeutil/weeutil.py", line 1158, in get_object
> raise AttributeError(
> AttributeError: Module 'user.sunduration' has no attribute
> 'schema_with_sunshine_time' when searching for
> 'user.sunduration.schema_with_sunshine_time'
> On Sunday, 17 July 2022 at 10:12:51 UTC+1 [email protected] wrote:
>
>
> --
> You received this message because you are subscribed to a topic in the Google
> Groups "weewx-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe
> <https://groups.google.com/d/topic/weewx-user/19ylVTRqbh4/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/e50560aa-d030-4096-97b4-7b9b614dc4cdn%40googlegroups.com
>
> <https://groups.google.com/d/msgid/weewx-user/e50560aa-d030-4096-97b4-7b9b614dc4cdn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/92838455-6527-413E-8A0B-FBC8AFD5D890%40gmail.com.