ERROR[Sat Jan 11 06:40:03 2014]:Exception during aggregate: empty string for float()Traceback (most recent call last): File "/home/bwscanner/torflow/NetworkScanners/BwAuthority/aggregate.py", line 876, in <module> main(sys.argv) File "/home/bwscanner/torflow/NetworkScanners/BwAuthority/aggregate.py", line 424, in main timestamp = float(fp.readline())ValueError: empty string for float()
Could it be that we have a race here?
$ cat .git/refs/heads/master 229e5e64680a1a3caf496ce2c1e5d064b5edd080$ git submodule status 4fdd2031e6b231ed4bbaa79940f67e9b8f691382 TorCtl (2013-10-16)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
AFAICT from reading code all bws--done are being processed and there's nothing in the traceback indicating which it's stumbling over. I have 1874 matching files in my system atm.
Furthermore, this error has shown once and that was several hours ago. The problematic file is apparently not problematic any more.
Perhaps a bws-* file was still open and being written to while aggregate.py was trying to read it? We could add exclusive locking (see fcntl) to make sure that the bws-* files are written atomically.
ERROR[Wed Apr 02 08:40:04 2014]:Exception during aggregate: empty string for float()Traceback (most recent call last): File "/home/bwscanner/torflow/NetworkScanners/BwAuthority/aggregate.py", line 876, in <module> main(sys.argv) File "/home/bwscanner/torflow/NetworkScanners/BwAuthority/aggregate.py", line 424, in main timestamp = float(fp.readline())ValueError: empty string for float()
ERROR[Wed Apr 30 21:40:04 2014]:Exception during aggregate: empty string for float()Traceback (most recent call last): File "/home/bwscanner/torflow/NetworkScanners/BwAuthority/aggregate.py", line 876, in <module> main(sys.argv) File "/home/bwscanner/torflow/NetworkScanners/BwAuthority/aggregate.py", line 424, in main timestamp = float(fp.readline())ValueError: empty string for float()
I've started getting this now on longclaw. It appears that I'm not submitting bwauth data because of this. Its slightly different error, but looks like the exact same part of the code:
ERROR[Sat Jan 24 21:45:02 2015]:Exception during aggregate: could not convert string to float:Traceback (most recent call last): File "/home/bwscanner/torflow/NetworkScanners/BwAuthority/aggregate.py", line 876, in <module> main(sys.argv) File "/home/bwscanner/torflow/NetworkScanners/BwAuthority/aggregate.py", line 424, in main timestamp = float(fp.readline())ValueError: could not convert string to float:
I can't tell which scanner, or file it is operating, as there are four scanners and hundreds of files. Perhaps it would be useful to add some debug information when this happens to try and narrow it down?
I just added an exception to the part of the code to print out which file it is:
for da in argv[1:-1]: # First, create a list of the most recent files in the # scan dirs that are recent enough for root, dirs, f in os.walk(da): for ds in dirs: if re.match("^scanner.[\d+]$", ds): newest_timestamp = 0 for sr, sd, files in os.walk(da+"/"+ds+"/scan-data"): for f in files: if re.search("^bws-[\S]+-done-", f): try: fp = file(sr+"/"+f, "r") slicenum = sr+"/"+fp.readline() timestamp = float(fp.readline()) fp.close() except ValueError: print("ValueError on file: "+f)
and then I ran it, and it said:
ValueError on file: bws-41.4:42.1-done-2015-01-21-17:03:13