python ibeacon rasp pi localization - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: python ibeacon rasp pi localization (/thread-16046.html) Pages:
1
2
|
python ibeacon rasp pi localization - joefreedy - Feb-12-2019 Hello, I'm trying to find the distance of ibeacon with raspberry pi and when I run the python code I get the following error; File "indoor.py", line 29 if 0<= calculate_accuracy(txpower, rssi)calculate_accuracy< 2: ^ SyntaxError: invalid syntax RE: python ibeacon rasp pi localization - buran - Feb-12-2019 You have extra calculate_accuracy on that line RE: python ibeacon rasp pi localization - joefreedy - Feb-12-2019 (Feb-12-2019, 03:00 PM)buran Wrote: You have extra calculate_accuracy on that lineI've solved this problem, but now I'm suffering from a bluepy installation.
RE: python ibeacon rasp pi localization - buran - Feb-12-2019 are you running behind proxy? If you google the error you will see it could be number of reasons RE: python ibeacon rasp pi localization - joefreedy - Feb-12-2019 I guess that's why I'm using the dorm Internet. I think there's restriction. @buran I have now installed the internet from my phone. Now I have this problem. Traceback (most recent call last): File "indoor.py", line 1, in <module> import blescan ImportError: No module named blescan RE: python ibeacon rasp pi localization - buran - Feb-12-2019 where your code comes from? what is bluescan? i.e. if you create the code you should now what package module it is. is it installed? is it the one part of bluepy? Obviously it's this one https://github.com/magitnus/bluescan/blob/master/blescan.py and it is based on https://github.com/adamf/BLE/blob/master/ble-scanner.py RE: python ibeacon rasp pi localization - joefreedy - Feb-12-2019 @buran I apologize, but I can't find the ibeacon this time. so I could not access the files that solved the problem. pi@raspberrypi:~/Desktop/bluetooth_indoor_localization $ python indoor.py ble thread started error accessing bluetooth device... I just can't find the device right now. RE: python ibeacon rasp pi localization - buran - Feb-12-2019 I really cannot help more RE: python ibeacon rasp pi localization - joefreedy - Feb-12-2019 (Feb-12-2019, 04:33 PM)buran Wrote: I really cannot help moreokay but why ? RE: python ibeacon rasp pi localization - buran - Feb-12-2019 sorry, i didn't realise it's your code that print that error accessing bluetooth device... and I didn't have any idea why you cannot access the device. remove the try/except block. by using blank except you shadow any exception message that will tell what's wrong you should always use specific error that you can catch EDIT: I see - scan(sock) should be scan_sock(sock)
|