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

AttributeError: 'NoneType' object has no attribute 'group' #20

Open
mastier opened this issue Mar 7, 2016 · 3 comments
Open

AttributeError: 'NoneType' object has no attribute 'group' #20

mastier opened this issue Mar 7, 2016 · 3 comments

Comments

@mastier
Copy link

mastier commented Mar 7, 2016

I pressume the problem lies with no iwprivs, despite i installed the driver and rebooted


pi@raspberrypi:~/piracast/scripts $ uname -r
4.1.13+

pi@raspberrypi:~/piracast/scripts $ sudo python piracast.py
Bring up wlan0 just in case...
ifup: interface wlan0 already configured
Increase rmem_default...

wpa_supplicant: no process found
hostapd: no process found
wlan0     no private ioctls.

wlan0     no private ioctls.

wlan0     no private ioctls.

wlan0     no private ioctls.

wlan0     no private ioctls.

wlan0     no private ioctls.

Waiting for incoming connection...
wlan0     no private ioctls.

Traceback (most recent call last):
  File "piracast.py", line 76, in <module>
    wfd.wfd_connection_wait()
  File "/home/pi/piracast/scripts/wfd.py", line 241, in wfd_connection_wait
    peer_status = p2p_status_get()
  File "/home/pi/piracast/scripts/wfd.py", line 56, in p2p_status_get
    return int(match.group(1))
AttributeError: 'NoneType' object has no attribute 'group'

@fab93282
Copy link

Hi, i have the same problem. Have you found a solution ?

@mastier
Copy link
Author

mastier commented May 10, 2016

Nope.

@abhishekes
Copy link

This is because the output of the command of "'iwpriv wlan0 p2p_get status" in file wfd.py is not being parsed correctly in the script (There is a missing space)

Output is of the form "Status = 1".

To fix the issue, change line 56 to the following:
match = re.search(r'Status =(\d*)', output)

from file wfd.py:

def p2p_status_get():
#print 'p2p_status_get:'
output = get_stdout('iwpriv wlan0 p2p_get status')
match = re.search(r'Status=(\d*)', output)
return int(match.group(1)

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

3 participants