@Jacques: I initially had the same error (or a very similar one) as Jon B 
and had to comment out that last line. I had already manually added the 
sunshine_time field (as well as some others, previously) to my weewx 
database, so it didn't seem to be necessary or useful. My installation also 
did not seem to understand the schema assignment. Do you have a non-default 
extension loaded that enables this?

On Monday, July 18, 2022 at 9:59:20 AM UTC-4 [email protected] wrote:

> Hi,
>
> Please verify that the last line of the sunduration.py script is
>
>   schema_with_sunshine_time = schemas.wview.schema + [('sunshine_time', 
> 'REAL')]
>
>
> 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.confUsing 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' *
>
> -- 
> 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.
> To unsubscribe from this group and all its topics, send an email to 
> [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/a85805b1-dfe9-41de-9079-56f4a951546bn%40googlegroups.com.

Reply via email to