On Saturday, October 8, 2016 at 8:49:43 PM UTC-7, mwall wrote:
>
>
>
> On Saturday, October 8, 2016 at 11:25:31 PM UTC-4, Sam Roza wrote:
>>
>> Not sure what happened there...any ideas?
>>
>
> i do not know what made it start working, but that is what working output 
> looks like.
>
> the OKOKOKOK is simply multiple OK responses from the interceptor.  we do 
> not care about that, so you can send it to /dev/null.  put the working 
> capture into a shell script, say capture.sh, like this:
>
> #!/bin/sh
> ngrep -l -q -d eth0 '0004a369e0d6' | sed '/mac=/!d' | xargs -n 1 curl 
> http://localhost:9999 -s -d
>
> then run the script like this:
>
> sudo capture.sh > /dev/null
>
> as for the interceptor, the stack trace is from a string value of '365' 
> for uv that did not get converted to int.
>
> the continued capture by the socket server is due to improper shutdown.
>
> both of these are fixed in interceptor 0.12.
>
> m
>

Looks like the behavior is repeatable. After the first one (from my last 
post), I restarted at 2023, and kept the capture running. At 2045, it 
barfed all at once, and produce the stack trace:

~~~
Oct  8 20:45:25 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=c2&pv=0&lb=0&ac=0&reg=1009&lost=0000&baro=1004&ptr=0&wfor=3&p=1
Oct  8 20:45:25 raspberrypi weewx[1427]: interceptor: MainThread: raw data: 
mac=0004a369e0d6&id=c2&pv=0&lb=0&ac=0&reg=1009&lost=0000&baro=1004&ptr=0&wfor=3&p=1
Oct  8 20:45:25 raspberrypi weewx[1427]: interceptor: MainThread: raw 
packet: {'id..0004a369e0d6': 'c2', 'baro..0004a369e0d6': 1004.0, 
'mac..0004a369e0d6': '0004a369e0d6', 'ptr..0004a369e0d6': '0', 
'pv..0004a369e0d6': '0', 'lost..0004a369e0d6': '0000', 'dateTime': 
1475984726, 'reg..0004a369e0d6': '1009', 'wfor..0004a369e0d6': '3', 
'ac..0004a369e0d6': '0', 'p..0004a369e0d6': '1', 'usUnits': 17, 
'lb..0004a369e0d6': '0'}
Oct  8 20:45:25 raspberrypi weewx[1427]: interceptor: MainThread: mapped 
packet: {'barometer': 1004.0, 'usUnits': 17, 'dateTime': 1475984726}
Oct  8 20:45:25 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:25 raspberrypi weewx[1427]: reportengine: Running reports for 
latest time in the database.
Oct  8 20:45:25 raspberrypi weewx[1427]: reportengine: Running report 
StandardReport
Oct  8 20:45:25 raspberrypi weewx[1427]: interceptor: MainThread: raw data: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:25 raspberrypi weewx[1427]: interceptor: MainThread: raw 
packet: {'wd.1d0.0004a369e0d6': 135.0, 'id.1d0.0004a369e0d6': '90', 
'wg.1d0.0004a369e0d6': 0.9, 'ch.1d0.0004a369e0d6': '1', 
'pwr.1d0.0004a369e0d6': '0', 'av.1d0.0004a369e0d6': '0', 'dateTime': 
1475984726, 'ws.1d0.0004a369e0d6': 0.0, 'rid.1d0.0004a369e0d6': 'd0', 
'mac.1d0.0004a369e0d6': '0004a369e0d6', 'p.1d0.0004a369e0d6': '1', 
'gw.1d0.0004a369e0d6': '0', 'usUnits': 17}
Oct  8 20:45:25 raspberrypi weewx[1427]: interceptor: MainThread: mapped 
packet: {'windDir': 135.0, 'windSpeed': 0.0, 'windGust': 0.9, 'usUnits': 
17, 'dateTime': 1475984726}
Oct  8 20:45:25 raspberrypi weewx[1427]: reportengine: Found configuration 
file /etc/weewx/skins/Standard/skin.conf for report StandardReport
Oct  8 20:45:25 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=84&rid=e6&pwr=0&htr=1&cz=2&oh=36&ttr=1&ot=19.6&ch=3&p=1
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: MainThread: raw data: 
mac=0004a369e0d6&id=84&rid=e6&pwr=0&htr=1&cz=2&oh=36&ttr=1&ot=19.6&ch=3&p=1
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: MainThread: raw 
packet: {'mac.3e6.0004a369e0d6': '0004a369e0d6', 'oh.3e6.0004a369e0d6': 
36.0, 'htr.3e6.0004a369e0d6': '1', 'rid.3e6.0004a369e0d6': 'e6', 
'ot.3e6.0004a369e0d6': 19.6, 'id.3e6.0004a369e0d6': '84', 'dateTime': 
1475984726, 'pwr.3e6.0004a369e0d6': '0', 'cz.3e6.0004a369e0d6': '2', 
'ch.3e6.0004a369e0d6': '3', 'ttr.3e6.0004a369e0d6': '1', 
'p.3e6.0004a369e0d6': '1', 'usUnits': 17}
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: MainThread: mapped 
packet: {'outHumidity': 36.0, 'outTemp': 19.6, 'usUnits': 17, 'dateTime': 
1475984726}
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=8e&rid=63&pwr=0&or=0&uvh=0&uv=365&ch=1&p=1
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: MainThread: raw data: 
mac=0004a369e0d6&id=8e&rid=63&pwr=0&or=0&uvh=0&uv=365&ch=1&p=1
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: MainThread: raw 
packet: {'uvh.163.0004a369e0d6': '0', 'ch.163.0004a369e0d6': '1', 
'pwr.163.0004a369e0d6': '0', 'p.163.0004a369e0d6': '1', 
'uv.163.0004a369e0d6': '365', 'dateTime': 1475984727, 
'mac.163.0004a369e0d6': '0004a369e0d6', 'id.163.0004a369e0d6': '8e', 
'rid.163.0004a369e0d6': '63', 'or.163.0004a369e0d6': '0', 'usUnits': 17}
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: MainThread: mapped 
packet: {'uv': '365', 'usUnits': 17, 'dateTime': 1475984727}
Oct  8 20:45:26 raspberrypi weewx[1427]: engine: Main loop exiting. 
Shutting engine down.
Oct  8 20:45:26 raspberrypi weewx[1427]: engine: Shutting down StdReport 
thread
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=84&rid=e6&pwr=0&htr=1&cz=2&oh=36&ttr=1&ot=19.5&ch=3&p=1
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=8e&rid=63&pwr=0&or=0&uvh=0&uv=365&ch=1&p=1
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=c2&pv=0&lb=0&ac=0&reg=1009&lost=0000&baro=1004&ptr=0&wfor=3&p=1
Oct  8 20:45:26 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=84&rid=e6&pwr=0&htr=1&cz=2&oh=36&ttr=1&ot=19.4&ch=3&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=8e&rid=63&pwr=0&or=0&uvh=0&uv=365&ch=1&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=c2&pv=0&lb=0&ac=0&reg=1009&lost=0000&baro=1004&ptr=0&wfor=3&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=84&rid=e6&pwr=0&htr=1&cz=2&oh=37&ttr=1&ot=19.3&ch=3&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=8e&rid=63&pwr=0&or=0&uvh=0&uv=365&ch=1&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=84&rid=e6&pwr=0&htr=1&cz=2&oh=37&ttr=1&ot=19.2&ch=3&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=8e&rid=63&pwr=0&or=0&uvh=0&uv=365&ch=1&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=c2&pv=0&lb=0&ac=0&reg=1009&lost=0000&baro=1004&ptr=0&wfor=3&p=1
Oct  8 20:45:27 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:28 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=84&rid=e6&pwr=0&htr=1&cz=2&oh=37&ttr=1&ot=19.0&ch=3&p=1
Oct  8 20:45:28 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:28 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=8e&rid=63&pwr=0&or=0&uvh=0&uv=365&ch=1&p=1
Oct  8 20:45:29 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=84&rid=e6&pwr=0&htr=1&cz=2&oh=37&ttr=1&ot=18.8&ch=3&p=1
Oct  8 20:45:29 raspberrypi weewx[1427]: interceptor: ServerThread: POST: 
mac=0004a369e0d6&id=90&rid=d0&pwr=0&gw=0&av=0&wd=135&wg=0.9&ws=0.0&ch=1&p=1
Oct  8 20:45:33 raspberrypi weewx[1427]: cheetahgenerator: Generated 14 
files for report StandardReport in 7.30 seconds
Oct  8 20:45:34 raspberrypi weewx[1427]: genimages: Generated 12 images for 
StandardReport in 1.26 seconds
Oct  8 20:45:34 raspberrypi weewx[1427]: reportengine: copied 9 files to 
/var/www/weewx
Oct  8 20:45:34 raspberrypi weewx[1427]: reportengine: Running report FTP
Oct  8 20:45:34 raspberrypi weewx[1427]: reportengine: Found configuration 
file /etc/weewx/skins/Ftp/skin.conf for report FTP
Oct  8 20:45:34 raspberrypi weewx[1427]: reportengine: FTP upload not 
requested. Skipped.
Oct  8 20:45:34 raspberrypi weewx[1427]: reportengine: Running report RSYNC
Oct  8 20:45:34 raspberrypi weewx[1427]: reportengine: Found configuration 
file /etc/weewx/skins/Rsync/skin.conf for report RSYNC
Oct  8 20:45:34 raspberrypi weewx[1427]: reportengine: rsync upload not 
requested. Skipped.
Oct  8 20:45:34 raspberrypi weewx[1427]: engine: StdReport thread has been 
terminated
Oct  8 20:45:34 raspberrypi weewx[1427]: restx: Shut down CWOP thread.
Oct  8 20:45:34 raspberrypi weewx[1427]: restx: Shut down Wunderground-PWS 
thread.
Oct  8 20:45:34 raspberrypi weewx[1427]: interceptor: MainThread: shutting 
down server thread
Oct  8 20:45:35 raspberrypi weewx[1427]: engine: Caught unrecoverable 
exception in engine:
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****  unsupported operand 
type(s) for +=: 'float' and 'str'
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****  Traceback (most recent 
call last):
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 859, in main
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****      engine.run()
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 185, in run
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****     
 self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 218, in dispatchEvent
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****      callback(event)
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 546, in new_loop_packet
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****     
 self.accumulator.addRecord(event.packet, self.loop_hilo)
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****    File 
"/usr/share/weewx/weewx/accum.py", line 240, in addRecord
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****      func(self, record, 
obs_type, add_hilo)
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****    File 
"/usr/share/weewx/weewx/accum.py", line 310, in add_value
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****     
 self[obs_type].addSum(val)
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****    File 
"/usr/share/weewx/weewx/accum.py", line 87, in addSum
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****      self.sum     += val
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****  TypeError: unsupported 
operand type(s) for +=: 'float' and 'str'
Oct  8 20:45:35 raspberrypi weewx[1427]:     ****  Exiting.
~~~

I had to restart it again. 

I put the script into a shell script, and I'm running it. I'll report back. 

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to