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

Access Point: ValueError: not enough values to unpack (expected 4, got 1) #20

Closed lucasmauro closed 7 years ago

lucasmauro commented 7 years ago

Hello, kootenpv. First of all, creating thanks for the project!

Kootenpv, every time I try to learn (e.g. whereami learn -l bedroom) I get the following error:

0%| | 0/100 [00:00<?, ?it/s] Traceback (most recent call last): File "/home/lucas/anaconda3/bin/whereami", line 11, in sys.exit(main()) File "/home/lucas/anaconda3/lib/python3.5/site-packages/whereami/main.py", line 39, in main learn(args.location, args.num_samples) File "/home/lucas/anaconda3/lib/python3.5/site-packages/whereami/learn.py", line 22, in learn new_sample = sample() File "/home/lucas/anaconda3/lib/python3.5/site-packages/whereami/get_data.py", line 15, in sample aps = wifi_scanner.get_access_points() File "/home/lucas/anaconda3/lib/python3.5/site-packages/access_points/init.py", line 77, in get_access_points results = self.parse_output(out) File "/home/lucas/anaconda3/lib/python3.5/site-packages/access_points/init.py", line 210, in parse_output ssid, bssid, quality, security = split_escaped(line, ':') ValueError: not enough values to unpack (expected 4, got 1)

I imported the project into PyCharm and all the tests were run successfuly. That seems weird.

Can we fix this?

kootenpv commented 7 years ago

Thanks for taking the time to file an issue. I would certainly like to try and get it fixed!

Looks like you're running on linux, so could you post what you see when you run sudo iwlist scan 2>/dev/null?

lucasmauro commented 7 years ago

Kootenpv, nothing is returned!

lucas@Inspiron-5420:~$ sudo iwlist scan 2>/dev/null
lucas@Inspiron-5420:~$ sudo iwlist scan 2>/dev/null
lucas@Inspiron-5420:~$ 
lucasmauro commented 7 years ago

Oh, my! @kootenpv nevermind my issue. The error is due to a lack of perception and/or memory of mine. I forgot that I was connected through cable and the Wi-Fi card was disabled! It is rather rare that I use cable.

Sincerely, many thanks for being ready to help and sorry for using your time like this.

Also, whereami just learned where my bedroom is. (Yeah!)

kootenpv commented 7 years ago

I've posted my fair share of issues that got resolved by myself ;) Glad it was resolved.