Closed ZheyuanXie closed 5 years ago
profile=pywifi.Profile() profile.ssid="apssid" iface.remove_all_network_profiles() tmp_profile=iface.add_network_profile(pf) iface.connect(tmp_profile)
I got this and when iface.connect(tmp_profile) gets executed.
iface.connect(tmp_profile)
AttributeError: 'NoneType' object has no attribute 'ssid'
it seems the add_network_profile method is returning a NoneType object instead of a profile object, is there anything wrong with my code? Thanks
@ZheyuanXie Yes, if the AP is no security mode, the profile will not be returned in the add_network_profile() call. I fix this issue by 521b143
add_network_profile()
I got this and when
iface.connect(tmp_profile)
gets executed.it seems the add_network_profile method is returning a NoneType object instead of a profile object, is there anything wrong with my code? Thanks