Show hidden characters
Thanks for the script: I do have a question because of the way I am trying to use this script. I am using the python script as a cgi page. I can't seem to connect to the web from there. The idea is to have users connect to a hotspot through a Raspberry Pi and then they can connect the device to a wifi network via the script on the page. Can you help?
Traceback (most recent call last):
File "WifiModuleLibrary.py", line 101, in
print(Connect('uth-open2'))
File "WifiModuleLibrary.py", line 65, in Connect
scheme.activate()
File "/usr/local/lib/python3.6/dist-packages/wifi/scheme.py", line 173, in activate
ifup_output = subprocess.check_output(['/sbin/ifup'] + self.as_args(), stderr=subprocess.STDOUT)
File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 405, in run
stdout, stderr = process.communicate(input, timeout=timeout)
File "/usr/lib/python3.6/subprocess.py", line 830, in communicate
stdout = self.stdout.read()
Thanks. Unfortunately, I ran into a problem. I loaded wifi 'pip install wifi' earlier today. The error I got running the module, following the command, is:
python wifi_taylor.py
Traceback (most recent call last):
File "wifi_taylor.py", line 102, in
print Search()
File "wifi_taylor.py", line 9, in Search
cells = wifi.Cell.all('wlan0')
AttributeError: 'module' object has no attribute 'Cell'
Please advise.
Thanks. again.
hi, any body please help
i have struck with the following error when i tried to connect to the Cell(ssid=Vamsi).
[Cell(ssid=SPVF), Cell(ssid=Vamsi), Cell(ssid=Guest), Cell(ssid=ACT_Dlink3Pole)]
Traceback (most recent call last):
File "/home/pi/Desktop/configread.py", line 104, in
print(Connect('Vamsi', '12345678'))
File "/home/pi/Desktop/configread.py", line 49, in Connect
scheme = Add(cell, password)
File "/home/pi/Desktop/configread.py", line 81, in Add
scheme.save()
File "/home/pi/.local/lib/python3.5/site-packages/wifi/scheme.py", line 135, in save
with open(self.interfaces, 'a') as f:
PermissionError: [Errno 13] Permission denied: '/etc/network/interfaces'
I'm getting the next error:
Traceback (most recent call last):
File "ConnectWifi.py", line 86, in
print (Connect("stratux"))
File "ConnectWifi.py", line 33, in Connect
savedcell.activate()
File "/usr/local/lib/python3.6/site-packages/wifi/scheme.py", line 172, in activate
subprocess.check_output(['/sbin/ifdown', self.interface], stderr=subprocess.STDOUT)
File "/usr/local/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/local/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/sbin/ifdown', 'wlan0']' returned non-zero exit status 1
Please help me.
Thanks for the attention, I’m looking forward for any reply.
File "wifi.py", line 9, in Search
cells = wifi.Cell.all('wlan0')
AttributeError: 'module' object has no attribute 'Cell'
Why am I getting this error? Cant I use this in windows 10? I am new to python. Please let me know soon. Thanks
I am getting an error like this. wifi.exceptions.InterfaceError: b"wlan0 Interface doesn't support scanning.".
Any help is appreciated.
I am getting an error like this. wifi.exceptions.InterfaceError: b"wlan0 Interface doesn't support scanning.".
Any help is appreciated.
run ifconfig , and see ur interface, it is likely not wlan0, but something like wlp2s0
hi, any body please help
i have struck with the following error when i tried to connect to the Cell(ssid=Vamsi).
[Cell(ssid=SPVF), Cell(ssid=Vamsi), Cell(ssid=Guest), Cell(ssid=ACT_Dlink3Pole)]
Traceback (most recent call last):
File "/home/pi/Desktop/configread.py", line 104, in
print(Connect('Vamsi', '12345678'))
File "/home/pi/Desktop/configread.py", line 49, in Connect
scheme = Add(cell, password)
File "/home/pi/Desktop/configread.py", line 81, in Add
scheme.save()
File "/home/pi/.local/lib/python3.5/site-packages/wifi/scheme.py", line 135, in save
with open(self.interfaces, 'a') as f:
PermissionError: [Errno 13] Permission denied: '/etc/network/interfaces'
Did you find solution for this
Traceback (most recent call last):
File "", line 1, in
File "G:\Python\lib\site-packages\wifi\scan.py", line 38, in all
iwlist_scan = subprocess.check_output(['/sbin/iwlist', interface, 'scan'],
File "G:\Python\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "G:\Python\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "G:\Python\lib\subprocess.py", line 854, in
init
self._execute_child(args, executable, preexec_fn, close_fds,
File "G:\Python\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
File "", line 1, in
File "G:\Python\lib\site-packages\wifi\scan.py", line 38, in all
iwlist_scan = subprocess.check_output(['/sbin/iwlist', interface, 'scan'],
File "G:\Python\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "G:\Python\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "G:\Python\lib\subprocess.py", line 854, in
init
self._execute_child(args, executable, preexec_fn, close_fds,
File "G:\Python\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
File "", line 1, in
File "G:\Python\lib\site-packages\wifi\scan.py", line 38, in all
iwlist_scan = subprocess.check_output(['/sbin/iwlist', interface, 'scan'],
File "G:\Python\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "G:\Python\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "G:\Python\lib\subprocess.py", line 854, in
init
self._execute_child(args, executable, preexec_fn, close_fds,
File "G:\Python\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
It is because you are on windows 10.
I am looking for the interface to enter for windows 10 too ...
did you found any solution?
Traceback (most recent call last):
File "", line 1, in
File "G:\Python\lib\site-packages\wifi\scan.py", line 38, in all
iwlist_scan = subprocess.check_output(['/sbin/iwlist', interface, 'scan'],
File "G:\Python\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "G:\Python\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "G:\Python\lib\subprocess.py", line 854, in
init
self._execute_child(args, executable, preexec_fn, close_fds,
File "G:\Python\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
It is because you are on windows 10.
I am looking for the interface to enter for windows 10 too ...
did you found any solution?
Here you are (old code that worked a long time ago^^)