Comments (13)
I had this error as well: ValueError: numpy.dtype has the wrong size, try recompiling
.
It can be solved by:
pip install --upgrade numpy
pip install --upgrade scipy
pip install --upgrade pandas
as found at http://stackoverflow.com/questions/17709641/valueerror-numpy-dtype-has-the-wrong-size-try-recompiling
.
Maybe even try upgrading scikit-learn afterwards.
Does it work now?
from whereami.
Thanks for taking the time to post! I'm very curious how your scanning looks like. Could you post the output of access_points
? I guess it is going wrong there. So maybe you could directly post the output of /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s
?
from whereami.
+1
macOS 10.12.1-beta (16B2327e)
Python 2.7.10
whereami learn -l tv
Traceback (most recent call last):
File "/usr/local/bin/whereami", line 7, in <module>
from whereami.__main__ import main
File "/Library/Python/2.7/site-packages/whereami/__main__.py", line 1, in <module>
from whereami.predict import predict
File "/Library/Python/2.7/site-packages/whereami/predict.py", line 3, in <module>
from whereami.pipeline import get_model
File "/Library/Python/2.7/site-packages/whereami/pipeline.py", line 3, in <module>
from sklearn.ensemble import RandomForestClassifier
File "/Library/Python/2.7/site-packages/sklearn/__init__.py", line 57, in <module>
from .base import clone
File "/Library/Python/2.7/site-packages/sklearn/base.py", line 11, in <module>
from .utils.fixes import signature
File "/Library/Python/2.7/site-packages/sklearn/utils/__init__.py", line 10, in <module>
from .murmurhash import murmurhash3_32
File "numpy.pxd", line 155, in init sklearn.utils.murmurhash (sklearn/utils/murmurhash.c:5029)
ValueError: numpy.dtype has the wrong size, try recompiling
/path/to/airport -s
SSID BSSID RSSI CHANNEL HT CC SECURITY (auth/unicast/group)
Name [BSSID] -91 9 Y -- WPA2(PSK/AES/AES)
Name [BSSID] -76 36,+1 Y DE WPA2(PSK/AES/AES)
Name4 [BSSID] -87 11 Y -- WPA(PSK/TKIP/TKIP) WPA2(PSK/AES/TKIP)
Name3 [BSSID] -88 11 Y -- WPA(PSK/TKIP/TKIP) WPA2(PSK/AES/TKIP)
Name2 [BSSID] -71 11 Y -- WPA2(PSK/AES/AES)
Name [BSSID] -70 11 Y -- WPA2(PSK/AES/AES)
access_points
[{
"security": "WPA2(PSK/AES/AES)",
"quality": 48,
"ssid": "Name",
"bssid": "[BSSID]"
}, {
"security": "WPA2(PSK/AES/AES)",
"quality": 24,
"ssid": "Name",
"bssid": "[BSSID]"
}, {
"security": "WPA(PSK/TKIP/TKIP) WPA2(PSK/AES/TKIP)",
"quality": 24,
"ssid": "Name 4",
"bssid": "[BSSID]"
}, {
"security": "WPA(PSK/TKIP/TKIP) WPA2(PSK/AES/TKIP)",
"quality": 24,
"ssid": "Name 3",
"bssid": "[BSSID]"
}, {
"security": "WPA2(PSK/AES/AES)",
"quality": 64,
"ssid": "Name 2",
"bssid": "[BSSID]"
}, {
"security": "WPA2(PSK/AES/AES)",
"quality": 64,
"ssid": "Name",
"bssid": "[BSSID]"
}]
from whereami.
I have a lot of access points near me, so I've pastebin'd the output of the commands:
Output of access_points
@ http://pastebin.com/TbcfDZrV.
And from airport -s
@ http://pastebin.com/7AGaDja5
from whereami.
Updating solved it for me.
Note:
Running mac and having some permission issues I had to run:
sudo pip install --ignore-installed numpy
sudo pip install --ignore-installed spicy
sudo pip install --ignore-installed pandas
from whereami.
@Others Could you perhaps try an upgrade? pip install -U --no-cache whereami
? The fact that you're able to print this should mean the problem has been solved? Another idea is to throw away ~/.whereami folder one time. The output on pastebin looks fine.
from whereami.
I've tried updating and I've gotten another error:
peachg@deino ~> pip install -U --no-cache whereami
Requirement already up-to-date: whereami in /usr/local/lib/python2.7/site-packages
Collecting scipy (from whereami)
Downloading scipy-0.18.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (21.8MB)
100% |████████████████████████████████| 21.8MB 70.3MB/s
Requirement already up-to-date: numpy in /usr/local/lib/python2.7/site-packages (from whereami)
Collecting access-points (from whereami)
Downloading access_points-0.0.18-py2.py3-none-any.whl
Requirement already up-to-date: tqdm in /usr/local/lib/python2.7/site-packages (from whereami)
Collecting scikit-learn (from whereami)
Downloading scikit_learn-0.17.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.9MB)
100% |████████████████████████████████| 3.9MB 47.2MB/s
Installing collected packages: scipy, access-points, scikit-learn
Found existing installation: scipy 0.16.1
Uninstalling scipy-0.16.1:
Successfully uninstalled scipy-0.16.1
Found existing installation: access-points 0.0.11
Uninstalling access-points-0.0.11:
Successfully uninstalled access-points-0.0.11
Found existing installation: scikit-learn 0.17
Uninstalling scikit-learn-0.17:
Successfully uninstalled scikit-learn-0.17
Successfully installed access-points-0.0.18 scikit-learn-0.17.1 scipy-0.18.1
peachg@deino ~> whereami learn -l my_room
0%| | 0/100 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/usr/local/bin/whereami", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/whereami/__main__.py", line 34, in main
learn(args.location, args.num_samples)
File "/usr/local/lib/python2.7/site-packages/whereami/learn.py", line 22, in learn
write_data(label_path, sample())
File "/usr/local/lib/python2.7/site-packages/whereami/get_data.py", line 14, in sample
aps = wifi_scanner.get_access_points()
File "/usr/local/lib/python2.7/site-packages/access_points/__init__.py", line 34, in get_access_points
results = self.parse_output(out)
File "/usr/local/lib/python2.7/site-packages/access_points/__init__.py", line 60, in parse_output
for network in read_plist(output):
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 103, in readPlistFromString
return readPlist(StringIO(data))
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist
rootObject = p.parse(pathOrFile)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: no element found: line 3051, column 27
peachg@deino ~> rm -rf ~/.whereami/
peachg@deino ~> whereami learn -l my_room
0%| | 0/100 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/usr/local/bin/whereami", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/whereami/__main__.py", line 34, in main
learn(args.location, args.num_samples)
File "/usr/local/lib/python2.7/site-packages/whereami/learn.py", line 22, in learn
write_data(label_path, sample())
File "/usr/local/lib/python2.7/site-packages/whereami/get_data.py", line 14, in sample
aps = wifi_scanner.get_access_points()
File "/usr/local/lib/python2.7/site-packages/access_points/__init__.py", line 34, in get_access_points
results = self.parse_output(out)
File "/usr/local/lib/python2.7/site-packages/access_points/__init__.py", line 60, in parse_output
for network in read_plist(output):
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 103, in readPlistFromString
return readPlist(StringIO(data))
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist
rootObject = p.parse(pathOrFile)
File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: no element found: line 5437, column 27
from whereami.
I can confirm that this issue is also present using python3:
peachg@deino ~> pip3 install whereami
Collecting whereami
Using cached whereami-0.2.29-py2.py3-none-any.whl
Collecting access-points (from whereami)
Downloading access_points-0.0.18-py2.py3-none-any.whl
Collecting numpy (from whereami)
Downloading numpy-1.11.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.9MB)
100% |████████████████████████████████| 3.9MB 369kB/s
Collecting scipy (from whereami)
Downloading scipy-0.18.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (21.0MB)
100% |████████████████████████████████| 21.0MB 69kB/s
Collecting scikit-learn (from whereami)
Downloading scikit_learn-0.17.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.7MB)
100% |████████████████████████████████| 3.7MB 412kB/s
Collecting tqdm (from whereami)
Using cached tqdm-4.8.4-py2.py3-none-any.whl
Installing collected packages: access-points, numpy, scipy, scikit-learn, tqdm, whereami
Successfully installed access-points-0.0.18 numpy-1.11.1 scikit-learn-0.17.1 scipy-0.18.1 tqdm-4.8.4 whereami-0.2.29
peachg@deino ~> whereami learn -l my_room
1%|█ | 1/100 [00:03<06:30, 3.94s/it]
Traceback (most recent call last):
File "/usr/local/bin/whereami", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/site-packages/whereami/__main__.py", line 34, in main
learn(args.location, args.num_samples)
File "/usr/local/lib/python3.5/site-packages/whereami/learn.py", line 22, in learn
write_data(label_path, sample())
File "/usr/local/lib/python3.5/site-packages/whereami/get_data.py", line 14, in sample
aps = wifi_scanner.get_access_points()
File "/usr/local/lib/python3.5/site-packages/access_points/__init__.py", line 34, in get_access_points
results = self.parse_output(out)
File "/usr/local/lib/python3.5/site-packages/access_points/__init__.py", line 60, in parse_output
for network in read_plist(output):
File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/plistlib.py", line 1006, in loads
fp, fmt=fmt, use_builtin_types=use_builtin_types, dict_type=dict_type)
File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/plistlib.py", line 997, in load
return p.parse(fp)
File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/plistlib.py", line 325, in parse
self.parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: no element found: line 3295, column 27
(And rm -rm ~/.whoami
doesn't help.)
from whereami.
@Others what's shown when you use: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s
Could it be a different language...
from whereami.
@kootenpv I've posted that above /path/to/airport -s
@ http://pastebin.com/7AGaDja5
from whereami.
@Others Ah, my bad, I meant with an added -x
. We would try to parse your XML output in all python versions.
from whereami.
I rolled it back. Please try it once more, I think there won't be any more errors as of whereami==0.3.37
from whereami.
Updating resolved the issue :)
from whereami.
Related Issues (20)
- Does not refresh locations between each sample (Win 10) HOT 4
- ValueError: Valid presets for class_weight include "auto" and "subsample". Given "balanced". HOT 1
- nonfunctional due to alternative wifi device name HOT 2
- Don't show stacktrace when using Ctrl-C
- missing documentation for mac 10.11.6
- add a time dimension to locations?
- Reset knowledge HOT 1
- Update dependencies
- UnicodeDecodeError when learning HOT 1
- ValueError: n_splits=10 cannot be greater than the number of members in each class. HOT 4
- Locations lose trailing 't' or 'x' HOT 1
- How can I track my phone? HOT 8
- Does deleting {{location}}.txt files affect the model? HOT 1
- whereami rename old_label new_label not working HOT 2
- Unable to run whereami from a launch agent HOT 1
- Installing whereami on MacBook with M1 Chip running Big Sur HOT 2
- Please cooperate with the Openhab project to make binding.
- Support for different floors, aka 3D triangulation. HOT 1
- De HOT 1
- Duplicates of options still not working. When we add options and hit "save" and then the page return with 2x options
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whereami.