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:

> Hello,
>
> If you share with us the code of your radiationhours.py script; it would 
> be more easy to help you. 
>
> Le 16 juil. 2022 à 17:08, Meteo Oberwallis <[email protected]> a écrit :
>
> Hello.
>
> I have under the Version 3.9.2 this Problem:
>
> Jul 16 17:04:44 Wetter systemd[1]: Starting LSB: weewx weather system...
> Jul 16 17:05:15 Wetter weewx[3751]: engine: Initializing weewx version 
> 3.9.2
> Jul 16 17:05:15 Wetter weewx[3751]: engine: Using Python 2.7.16 (default, 
> Oct 10 2019, 22:02:15) #012[GCC 8.3.0]
> Jul 16 17:05:15 Wetter weewx[3751]: engine: Platform 
> Linux-5.4.72-v7+-armv7l-with-debian-10.6
> Jul 16 17:05:15 Wetter weewx[3751]: engine: Locale is 'de_CH.UTF-8'
> Jul 16 17:05:15 Wetter weewx[3751]: engine: pid file is /var/run/weewx.pid
> Jul 16 17:05:15 Wetter weewx[3677]: Starting weewx weather system: weewx.
> Jul 16 17:05:15 Wetter systemd[1]: Started LSB: weewx weather system.
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Using configuration file 
> /etc/weewx/weewx.conf
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Debug is 1
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Initializing engine
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Loading station type Vantage 
> (weewx.drivers.vantage)
> Jul 16 17:05:15 Wetter weewx[3755]: vantage: Driver version is 3.1.1
> Jul 16 17:05:15 Wetter weewx[3755]: vantage: Opened up serial port 
> /dev/ttyUSB0; baud 19200; timeout 4.00
> Jul 16 17:05:15 Wetter weewx[3755]: vantage: Gentle wake up of console 
> successful
> Jul 16 17:05:15 Wetter weewx[3755]: vantage: Hardware type is 16
> Jul 16 17:05:15 Wetter weewx[3755]: vantage: ISS ID is 1
> Jul 16 17:05:15 Wetter weewx[3755]: vantage: Hardware name: Vantage Pro2
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Loading service 
> weewx.engine.StdTimeSynch
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Finished loading service 
> weewx.engine.StdTimeSynch
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Loading service 
> user.cputemp.AddCpuTemp
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Finished loading service 
> user.cputemp.AddCpuTemp
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Loading service 
> weewx.engine.StdConvert
> Jul 16 17:05:15 Wetter weewx[3755]: engine: StdConvert target unit is 0x1
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Finished loading service 
> weewx.engine.StdConvert
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Loading service 
> weewx.engine.StdCalibrate
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Finished loading service 
> weewx.engine.StdCalibrate
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Loading service 
> weewx.engine.StdQC
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Finished loading service 
> weewx.engine.StdQC
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Loading service 
> weewx.wxservices.StdWXCalculate
> Jul 16 17:05:15 Wetter weewx[3755]: wxcalculate: The following values will 
> be calculated: barometer=prefer_hardware, windchill=prefer_hardware, 
> dewpoint=prefer_hardware, appTemp=prefer_hardware, 
> rainRate=prefer_hardware, windrun=prefer_hardware, 
> heatindex=prefer_hardware, maxSolarRad=prefer_hardware, 
> humidex=prefer_hardware, pressure=prefer_hardware, 
> inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, 
> cloudbase=prefer_hardware
> Jul 16 17:05:15 Wetter weewx[3755]: wxcalculate: The following algorithms 
> will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Finished loading service 
> weewx.wxservices.StdWXCalculate
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Loading service 
> user.radiationhours.RadiationHours
> Jul 16 17:05:15 Wetter weewx[3755]: engine: Caught unrecoverable exception 
> in engine:
> Jul 16 17:05:15 Wetter weewx[3755]:     ****  Module 'user.radiationhours' 
> has no attribute 'RadiationHours' when searching for 
> 'user.radiationhours.RadiationHours'
> Jul 16 17:05:15 Wetter weewx[3755]:     ****  Traceback (most recent call 
> last):
> Jul 16 17:05:15 Wetter weewx[3755]:     ****    File 
> "/usr/share/weewx/weewx/engine.py", line 888, in main
> Jul 16 17:05:15 Wetter weewx[3755]:     ****      engine = 
> engine_class(config_dict)
> Jul 16 17:05:15 Wetter weewx[3755]:     ****    File 
> "/usr/share/weewx/weewx/engine.py", line 78, in __init__
> Jul 16 17:05:15 Wetter weewx[3755]:     ****     
>  self.loadServices(config_dict)
> Jul 16 17:05:15 Wetter weewx[3755]:     ****    File 
> "/usr/share/weewx/weewx/engine.py", line 142, in loadServices
> Jul 16 17:05:15 Wetter weewx[3755]:     ****     
>  self.service_obj.append(weeutil.weeutil._get_object(svc)(self, 
> config_dict))
> Jul 16 17:05:15 Wetter weewx[3755]:     ****    File 
> "/usr/share/weewx/weeutil/weeutil.py", line 1116, in _get_object
> Jul 16 17:05:15 Wetter weewx[3755]:     ****      "Module '%s' has no 
> attribute '%s' when searching for '%s'" % (mod.__name__, part, 
> module_class))
> Jul 16 17:05:15 Wetter weewx[3755]:     ****  AttributeError: Module 
> 'user.radiationhours' has no attribute 'RadiationHours' when searching for 
> 'user.radiationhours.RadiationHours'
> Jul 16 17:05:15 Wetter weewx[3755]:     ****  Exiting.
>
> Can you Help me?
>
>
> -- 
> 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/badb290a-dd5f-41d8-b0a6-1365e2734bd9n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/badb290a-dd5f-41d8-b0a6-1365e2734bd9n%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/e50560aa-d030-4096-97b4-7b9b614dc4cdn%40googlegroups.com.

Reply via email to