Open zaizailong opened 4 years ago
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.dataWithByteslength(ssid_bytes, len(ssid_bytes)) ValueError: depythonifying 'unsigned long', got 'str'
ssid_data = NSData.dataWithByteslength(ssid_bytes, len(ssid_bytes))