Error when encountering a premium-only cach with geo-nearest and basic membership [solved]
Hi,
geo-nearest fails for me when it happens to find a premium-only cache while I have only a basic account (yet). The error occurs in line 1400 of geo-common-gc, when trying to join the .csv and .xtra file. This is because the premium-only cache only turns up in $CSVFILE (as a line like GC2AA34 0.000 0.000 ...) and not in $XTRAFILE, which causes join to complain and the script to abort.
I have a quick workaround attached, which simply tells join to ignore unmatched lines. However, I believe it were possible to filter those caches out some time before. I just don't quite understand the code there yet to attempt it by myself.
There's one additional complication here, though: geo-nearest fails reliably as described when issuing the same query (same location) again and again. However, it happened to me that a subsequent query didn't fail (reliably if repeated), when in between the querys I either issued a query for another location, or just opened the failing premium-only cache in a browser (URL like
http://www.geocaching.com/seek/cache_details.aspx?wp=GC2AA34). Don't know how to make sense of that.
--- upstream/geo-12-01-06-02-37-49/geo-common-gc 2011-12-27 01:47:45.000000000 +0100
+++ geo/geo-common-gc 2012-01-07 11:07:52.025671512 +0100
@@ -1397,7 +1397,7 @@
# Convert CSV into CSV with puzzles...
csv2csv $GEOMYSTERY < $CSVFILE2 > $CSVFILE
- join -t ' ' $CSVFILE $XTRAFILE > $JOINFILE
+ join --nocheck-order -t ' ' $CSVFILE $XTRAFILE > $JOINFILE
if [ $? != 0 ]; then
cp $CSVFILE /tmp/geo.err.csv
cp $XTRAFILE /tmp/geo.err.xtra
Edit: Output of geo-nearest attached. There are three caches in geo.err.csv that don't show up in geo.err.xtra. geo-nearest was calles as
geo-nearest -H "$DIR/html" -s -n50 52.523369 13.475888
Edited 2 time(s). Last edit at 01/09/2012 10:27AM by rickrich.