Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 type eror for getAPinfo() #14

Open
pandazc31 opened this issue Jun 2, 2021 · 6 comments
Open

python3 type eror for getAPinfo() #14

pandazc31 opened this issue Jun 2, 2021 · 6 comments

Comments

@pandazc31
Copy link

i try to follow your tutorial as per bellow picture
Q1

but i got some error like this picture
Q2

there is any solution ?

@pandazc31
Copy link
Author

in this case it was clear ,i was using python 2 it's work

@vladivanovic
Copy link

@pandazc31 looks like you need to go to the init.py file and add a line to line 68 to convert the output to utf-8 - the exact code is here: #11

@vladivanovic
Copy link

ok maybe that didn't fix it for me either... looks like some digging needed.

Python 3.8.5 (default, May 27 2021, 13:30:53)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import rssi
interface = 'wlan0'
rssi_scanner = rssi.RSSI_Scan(interface)
ap_info = rssi_scanner.getAPinfo(sudo=True)
Traceback (most recent call last):
File "", line 1, in
File "/home/vlad/.local/lib/python3.8/site-packages/rssi/init.py", line 305, in getAPinfo
all_access_points = self.formatCells(raw_scan_output)
File "/home/vlad/.local/lib/python3.8/site-packages/rssi/init.py", line 203, in formatCells
raw_cells = raw_cell_string.split('Cell') # Divide raw string into raw cells.
TypeError: a bytes-like object is required, not 'str'

@vladivanovic
Copy link

Just checking now, the Github version of RSSI vs the pip3 version is dramatically different, going to try and see what happens if I use the Github version.

@nabsha
Copy link

nabsha commented Aug 27, 2021

Getting the same error on raspberry pi, any plans to resolve the issues and update pip please?

image

@ksirirux
Copy link

$ pip show rssi #to find location library
2022-03-12_100609
go to library
2022-03-12_100754
add raw_output= raw_output.decode("utf-8")
2022-03-12_100724

It work !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants