kootenpv / whereami

Uses WiFi signals :signal_strength: and machine learning to predict where you are
GNU Affero General Public License v3.0
5.1k stars 247 forks source link

invalid literal for int() with base 10: '86 1' #12

Closed djui closed 7 years ago

djui commented 7 years ago
Please provide the output of the error below this line at github.com/kootenpv/access_points/issues
invalid literal for int() with base 10: '86  1'
kootenpv commented 7 years ago

@djui Could you see successful parses where there is an access point with a score of around 86 somewhere in your ~/.whereami?

kootenpv commented 7 years ago

I added more details to the logging. Could you please try a couple of more scans after upgrading and see what the error says:

pip install -U --no-cache access_points
pip install -U --no-cache whereami
djui commented 7 years ago

If I read this correctly, I got two successful parses:

$ ag '[^:]86' ~/.whereami/office.txt
:
{..."Foo f0:0f:00:f0:0f:00": 86, ...}
:
{..."Foo f0:0f:00:f0:0f:00": 86, ...}
:

With the new log output (but different outcome):

$ whereami learn -l office -n 100
 97%|█████████████████████████████████████████████████████████████████████▊  | 97/100 [05:27<00:11,  3.79s/it]
Please provide the output of the error below this line at github.com/kootenpv/access_points/issues
invalid literal for int() with base 10: '91  9'
Line:
              Foo f0:0f:00:f0:0f:00 -91  9       Y  -- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)
 98%|██████████████████████████████████████████████████████████████████████▌ | 98/100 [05:31<00:07,  3.79s/it]
Please provide the output of the error below this line at github.com/kootenpv/access_points/issues
invalid literal for int() with base 10: '91  9'
Line:
              Foo f0:0f:00:f0:0f:00 -91  9       Y  -- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)
 99%|███████████████████████████████████████████████████████████████████████▎| 99/100 [05:35<00:03,  3.79s/it]
Please provide the output of the error below this line at github.com/kootenpv/access_points/issues
invalid literal for int() with base 10: '91  9'
Line:
              Foo f0:0f:00:f0:0f:00 -91  9       Y  -- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)

However this time I can't find the result in the output:

$ ag '[^:]91' ~/.whereami/office.txt
$ echo $?
1
kootenpv commented 7 years ago

@djui I have no clue where that quote came from? Ah wait, now I see, it is about

'91    9'

I'll try to see if I can fix that :)

We can see the line is a character shifted. It should have gotten -91 [without 9].

kootenpv commented 7 years ago

I made it a regex parser, as I assume the finger print is always the same format (thus the only safe thing in there).

Please try once more after pip install -U --no-cache access_points :)

djui commented 7 years ago

Works. Dank je!