mrgmarsh / wfrog

Automatically exported from code.google.com/p/wfrog
GNU General Public License v3.0
0 stars 0 forks source link

wflogger.py unsupported operand types #104

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start wflogger

What is the expected output? What do you see instead?
Expected events to be logged to wfrog.csv

What happens instead: nothing logged to wfrog.csv. 
wflogger.log is full of same error:

2012-02-07 19:26:22,431 ERROR [wflogger] Could not send event to 
<wfcommon.generic.YamlMultiElement object at 0x40d33a30>
Traceback (most recent call last):
  File "/share/MD0_DATA/.qpkg/wfrog/wflogger/wflogger.py", line 127, in output_loop
    self.collector.send_event(event, context=context)
  File "/share/MD0_DATA/.qpkg/wfrog/wfcommon/generic/multi.py", line 62, in _call
    result[name] = r.__getattribute__(attr).__call__(*args, **keywords)
  File "/share/MD0_DATA/.qpkg/wfrog/wflogger/collector/buffer.py", line 99, in send_event
    self.forward_event(event_to_send, context)
  File "/share/MD0_DATA/.qpkg/wfrog/wflogger/collector/buffer.py", line 133, in forward_event
    self.do_send(flush_event, context)
  File "/share/MD0_DATA/.qpkg/wfrog/wflogger/collector/buffer.py", line 139, in do_send
    self.collector.send_event(event, context)
  File "/share/MD0_DATA/.qpkg/wfrog/wflogger/collector/base.py", line 47, in send_event
    self.flush(context)
  File "/share/MD0_DATA/.qpkg/wfrog/wflogger/collector/aggregator.py", line 179, in flush
    sample = self.get_data()
  File "/share/MD0_DATA/.qpkg/wfrog/wflogger/collector/aggregator.py", line 123, in get_data
    data['temp'] = round(sum(self._temp)/len(self._temp), 1)
TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'

What version of the product are you using? On what operating system?
wfrog: 0.8.1
OS: QNAP TS-209
Station: Fine Offset WH3081
driver: wh1080

Please provide any additional information below.

Original issue reported on code.google.com by warren.c...@gmail.com on 7 Feb 2012 at 8:40

GoogleCodeExporter commented 9 years ago
Also the same error with driver wh1080.py 
Station: Fine Offset WH1080
lubuntu 11.10 on eeepc701
writing to firebird2.5 database
python2.6 with also python2.7

/var/log/wfrog.log
2012-02-17 15:51:37,062 ERROR [wflogger] Could not send event to 
<wfcommon.generic.YamlMultiElement object at 0x9661f6c>
Traceback (most recent call last):
  File "/usr/lib/wfrog/wflogger/wflogger.py", line 127, in output_loop
    self.collector.send_event(event, context=context)
  File "/usr/lib/wfrog/wfcommon/generic/multi.py", line 62, in _call
    result[name] = r.__getattribute__(attr).__call__(*args, **keywords)
  File "/usr/lib/wfrog/wflogger/collector/buffer.py", line 99, in send_event
    self.forward_event(event_to_send, context)
  File "/usr/lib/wfrog/wflogger/collector/buffer.py", line 133, in forward_event
    self.do_send(flush_event, context)
  File "/usr/lib/wfrog/wflogger/collector/buffer.py", line 139, in do_send
    self.collector.send_event(event, context)
  File "/usr/lib/wfrog/wflogger/collector/base.py", line 47, in send_event
    self.flush(context)
  File "/usr/lib/wfrog/wflogger/collector/aggregator.py", line 179, in flush
    sample = self.get_data()
  File "/usr/lib/wfrog/wflogger/collector/aggregator.py", line 123, in get_data
    data['temp'] = round(sum(self._temp)/len(self._temp), 1)
TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'

Original comment by duinzi...@gmail.com on 17 Feb 2012 at 7:58