Weather by You!

Templates and Projects support => Php templates => Topic started by: rammo on April 10, 2016, 04:41:19 PM

Title: PROBLEM: Pywws Weather Nature Template
Post by: rammo on April 10, 2016, 04:41:19 PM
Hi there!
Unfortunatly I have a problem with Pywws Weather Nature Template.

When I try to run command
Code: [Select]
python -m pywws.Hourly -vvv ~/weather/data on my Raspberry the system return me:

Code: [Select]
python -m pywws.Hourly -vvv ~/weather/data
23:35:19:pywws.Logger:pywws version 15.12.0
23:35:19:pywws.Logger:Python version 2.7.9 (default, Mar  8 2015, 00:52:26)
[GCC 4.9.2]
23:35:19:pywws.WeatherStation.CUSBDrive:using pywws.device_pyusb
23:35:20:pywws.weather_station:avoid 2.56633710861
23:35:25:pywws.DataLogger:Synchronising to weather station
23:35:25:pywws.weather_station:read period 10
23:35:25:pywws.weather_station:delay 3, pause 26.4986
23:35:52:pywws.weather_station:delay 3, pause 0.5
23:35:52:pywws.weather_station:avoid 5.68533110619
23:35:58:pywws.weather_station:delay 3, pause 0.5
23:35:59:pywws.weather_station:delay 3, pause 0.5
23:35:59:pywws.weather_station:delay 3, pause 0.5
23:36:00:pywws.weather_station:delay 3, pause 0.5
23:36:01:pywws.weather_station:delay 3, pause 0.5
23:36:02:pywws.weather_station:live_data missed
23:36:02:pywws.weather_station:delay 3, pause 37.8409
23:36:40:pywws.weather_station:delay 3, pause 0.5
23:36:40:pywws.weather_station:avoid 5.76910209656
23:36:46:pywws.weather_station:live_data new data
23:36:46:pywws.DataLogger:Reading time 21:36:43
23:36:46:pywws.DataLogger:log time 21:32:21
23:36:46:pywws.DataLogger:Fetching data
23:36:47:pywws.Process:Generating summary data
23:36:47:pywws.Calib:Using default calibration
23:36:47:pywws.Tasks.RegularTasks:Templating 1hrs.txt
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/pywws/Hourly.py", line 111, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/pywws/Hourly.py", line 108, in main
    return Hourly(args[0])
  File "/usr/local/lib/python2.7/dist-packages/pywws/Hourly.py", line 79, in Hourly
    hourly_data, daily_data, monthly_data).do_tasks():
  File "/usr/local/lib/python2.7/dist-packages/pywws/Tasks.py", line 340, in do_tasks
    self._do_common(sections)
  File "/usr/local/lib/python2.7/dist-packages/pywws/Tasks.py", line 239, in _do_common
    upload = self.do_template(template, live_data)
  File "/usr/local/lib/python2.7/dist-packages/pywws/Tasks.py", line 414, in do_template
    self.templater.make_file(input_file, output_file, live_data=data)
  File "/usr/local/lib/python2.7/dist-packages/pywws/Template.py", line 510, in make_file
    for text in self.process(live_data, template_file):
  File "/usr/local/lib/python2.7/dist-packages/pywws/Template.py", line 412, in process
    x = eval(command[3])
  File "<string>", line 1, in <module>
TypeError: tuple indices must be integers, not float

How to resolve?  :o
Title: Re: PROBLEM: Pywws Weather Nature Template
Post by: Mr.Meteo on April 12, 2016, 12:02:01 PM
Hi Rammo,

This Template is a bit "outdated" as Pywws has updated many times since then.
I recommand you that you check the file included in the templace against files
in recent pywws package.

I'm sorry, my pywws installation is "broken"; I've bought a new PI to play with it,
but time is rare these days.

Regards,
Jacques
Title: Re: PROBLEM: Pywws Weather Nature Template
Post by: rammo on April 12, 2016, 01:30:17 PM
Hi dear!
I solved the issue following these topics:

http://weatherbyyou.com/forum/index.php?topic=1015.0
http://weatherbyyou.com/forum/index.php?topic=1007.0

Now work perfectly!  ;)

I need to change also the wind from mph to km/h; I'll try to follow this topic:
http://weatherbyyou.com/forum/index.php?topic=472.0

Many thanks to you!!   :D