Thanks for the fix! It's working now for me.

A couple of other questions about this:

- How can I change it so that the units are hours, rather than minutes?
- How can I add a total daily sunshine duration field, rather than 
displaying the total sunshine within the last archive period?

Thanks!

On Monday, 18 July 2022 at 15:30:26 UTC+1 [email protected] wrote:

> 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.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' *
> 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.
> 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/571f223d-9f92-4056-b9ac-8c8aff15c501n%40googlegroups.com.

Reply via email to