Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

scheme.activate() returns non zero exit status 1 #118

Open
nadeemnehru opened this issue Apr 25, 2019 · 2 comments
Open

scheme.activate() returns non zero exit status 1 #118

nadeemnehru opened this issue Apr 25, 2019 · 2 comments

Comments

@nadeemnehru
Copy link

I am trying to connect to a wireless network using wifi library in python script and am running python 3.6.8
Upon executing scheme.activate(), I get the following output
subprocess.CalledProcessError: Command '['/sbin/ifup', 'wlp6s0=wlp6s0-home', '-o', 'wpa-ssid=DataRoom', '-o', 'wpa-psk=902456bdc9a0ff7e7fecf72c303e75d87d4e6bf209e24c36453bc6cc8a9e1ee1', '-o', 'wireless-channel=auto']' returned non-zero exit status 1

I tried to search for the solution but found no related issue.
Thanks for the help

@jLynx
Copy link

jLynx commented Sep 14, 2019

Same issue. Any update?

@Chazpanzee
Copy link

Also having the same issue with this, I have found a couple of threads that seem to be quite old and no longer relevant / closed and have not solved my issue.

The code i am using is:

`from future import print_function

from wifi import Cell, Scheme, SchemeWPA

get all cells from the air

ssids = [cell.ssid for cell in Cell.all('wlan0')]

schemes = list(Scheme.all())

cell = list(Cell.all('wlan0'))

for scheme in schemes:
ssid = scheme.options.get('wpa-ssid', scheme.options.get('wireless-essid'))
if ssid in ssids:
print('Connecting to %s' % ssid)
scheme.activate()
break`

"SchemeWPA" is a monkey patch job i found in another thread that helped get me here

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

No branches or pull requests

3 participants