Comments (6)
I am unsure of why this is happening. Maybe this is happening because your system's language is Latin a language. I don't use Windows so I unfortunately can't debug this error.
from wifi-password.
My ststem language is korean
But this doesn't matter in code.
We need more examples.
from wifi-password.
This is likely affecting all windows boxes, at least it does on mine aswell. It likely has to do with the symbols the qrcode library is sending. I dont believe the windows terminal is UTF-8, therefore UTF-8 specific symbols dont display properly like they do on Mac and Linux. However in testing this I also noticed that outputting to image might also be broken? At least it is for me.
@sdushantha I think this might be an issue of the qrcode.print_tty()
function. The next best thing in Windows might be their print_ascii
function but I havent tested it
Confirmation of it being broken on mine:
Error when attempting to output to image file:
from wifi-password.
@sunrabbit123 @littlediobolic I think I found a solution to this issue.
In the beginning of the main
function, could you add this code:
import colorama
colorama.init()
This will emulate support for ANSI escape sequences, which is needed in order to display the QR code.
If you don't have colorama
installed, you'll have to install it through pip
:
python3 -m pip install --user colorama
from wifi-password.
Your solution works very sexy.
However, it would be better to write the phrase in generate_qr_code rather than main.
ex:
def generate_qr_code(ssid, password, image=False):
# Source: https://git.io/JtLIv
text = f"WIFI:T:WPA;S:{ssid};P:{password};;"
qr = qrcode.QRCode(version=2,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4)
qr.add_data(text)
if image:
file_name = ssid.replace(" ", "_") + ".png"
img = qr.make_image()
img.save(file_name)
print(f"QR code has been saved to {file_name}")
os.system(file_name)
else:
import colorama
colorama.init()
qr.make()
qr.print_tty()
from wifi-password.
This issue has been fixed in a4cbf0d
from wifi-password.
Related Issues (20)
- AttributeError: module 'utils' has no attribute 'get_platform'
- wifi QR
- Termux HOT 1
- Win10系统中文版执行命令返回的是中文字符串,不能用正则匹配key HOT 2
- Didn't fetch my password with `sudo nmcli ...`, only with `nmcli ...` HOT 1
- Wifi
- Wi-Fi password HOT 1
- Gg
- Unable to find the password HOT 1
- It work on Linux mint? HOT 1
- It's too troublesome to enter the user name password every time HOT 2
- [BUG] IndexError: list index out of range
- Don't work in termux
- Wifi password
- WIFI.PASSWORD HOT 4
- AIRPORT_PATH = "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport" HOT 1
- WiFi code
- Wifi password
- ![Screenshot_2023-12-24-05-43-49-284_com android settings](https://github.com/sdushantha/wifi-password/assets/154694173/a8575a50-9930-4a80-a7b1-ea6d1382fb76)
- TP-Link_E5F2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wifi-password.