-
Notifications
You must be signed in to change notification settings - Fork 54
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
Password contains double quotation marks in helper.make_wifi_data result #95
Comments
Thanks for your report. I cannot reproduce this, maybe the JSON data already contain quotation marks? >>> import segno.helpers
>>> segno.helpers.make_wifi_data(ssid='MySSID', password='MyPassword', security='wpa')
'WIFI:T:WPA;S:MySSID;P:MyPassword;;'
>>> segno.helpers.make_wifi_data(ssid='MySSID', password='MyPassword', security='wpa', hidden=True)
'WIFI:T:WPA;S:MySSID;P:MyPassword;H:true;' |
Hi, @heuer In my case, I got different results as below. ------- my source code ------
------- success case ------- ['helpers.make_wifi_data' result] ------- failed case ------- ['helpers.make_wifi_data' result] |
Thanks for providing more insight into your code. Now I understand why the password is quoted. It should only happen if the password / SSID can be interpreted as an integer. |
@heuer Thank you for the quick answer. ^^ |
Try to get the qrcode value by using helper.make_wifi_data.
However, among the generated qrcode result values, double quotation marks are included in the password.
Because of this, a password error occurs when scanning with a qrcode scanner.
I hope to check if there is a problem with my code.
My Code ====
qrVal = helpers.make_wifi_data(
ssid=contentJson.get('ssid'),
password=contentJson.get('password'),
security=contentJson.get('security'),
hidden=contentJson.get('hidden') == True)
Result ====
WIFI:T:WPA;S:"MySSID";P:"MyPassword";;
The text was updated successfully, but these errors were encountered: