ValueError: depythonifying 'unsigned long', got 'str'
zaizailong opened this issue · 1 comments
mac os 10.15
python 2.7
profile = pywifi.Profile()
profile.ssid = 'testap'
profile.auth = const.AUTH_ALG_OPEN
profile.akm.append(const.AKM_TYPE_WPA2PSK)
profile.cipher = const.CIPHER_TYPE_CCMP
profile.key = '12345678'
iface.remove_all_network_profiles()
tmp_profile = iface.add_network_profile(profile)
Traceback (most recent call last):
File "", line 1, in
File "/Python/2.7/lib/python/site-packages/pywifi/iface.py", line 68, in add_network_profile
return self._wifi_ctrl.add_network_profile(self._raw_obj, params)
File "/Python/2.7/lib/python/site-packages/pywifi/wifiutil_macos.py", line 103, in add_network_profile
ssid_data = NSData.dataWithBytes_length(ssid_bytes, len(ssid_bytes))
ValueError: depythonifying 'unsigned long', got 'str'