Templates and Projects support > Templates and Projects discussion

Nature Template and Raspberry Pi @PYWWS - error running Hourly


Hello, please can anyone help?

I'm new to Raspberry Pi and Linux but have managed to install pywws and get it running well enough to upload to my Met Office WOW site and tweet but I now want to create a webpage and found your helpful templates.
I followed the instructions and changed the winddir syntax after getting the integer error, but now have another error when running Hourly. I've copied the offending message here - I'm guessing it has something to do with the 1hrs.txt file, can anyone point me in the right direction? Many thanks!

pi@raspberrypi ~ $ python -m pywws.Hourly -vvv ~/weatherpywws/data
22:18:03:pywws.Logger:pywws version 14.06.1
22:18:03:pywws.Logger:Python version 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3]
22:18:03:pywws.WeatherStation.CUSBDrive:using pywws.device_pyusb
22:18:07:pywws.DataLogger:Synchronising to weather station
22:18:07:pywws.weather_station:delay 2, pause 10.4866
22:18:18:pywws.weather_station:delay 2, pause 0.5
22:18:18:pywws.weather_station:avoid 5.78733030967
22:18:24:pywws.weather_station:live_data new data
22:18:24:pywws.DataLogger:Reading time 22:18:21
22:18:24:pywws.DataLogger:log time 22:15:01
22:18:24:pywws.DataLogger:Fetching data
22:18:25:pywws.Process:Generating summary data
22:18:25:pywws.Calib:Using default calibration
22:18:25: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>
  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 334, in do_tasks
  File "/usr/local/lib/python2.7/dist-packages/pywws/Tasks.py", line 234, in _do_common
    upload = self.do_template(template, live_data)
  File "/usr/local/lib/python2.7/dist-packages/pywws/Tasks.py", line 408, 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 496, in make_file
    for text in self.process(live_data, template_file):
  File "/usr/local/lib/python2.7/dist-packages/pywws/Template.py", line 398, in process
    x = eval(command[3])
  File "<string>", line 1, in <module>
TypeError: 'function' object has no attribute '__getitem__'


When changing the wind_dir entry, I used [x] instead of (x). Fixed with the help of Jim Easterbrook. Now to work out why my homepage doesn't quite display correctly!

Hi all.
Any progress in this problem? Same situation on my OrangePI.
Seems like template doesnt support Python 2.7.

Thx for any help.


[0] Message Index

Go to full version