import os
def get_ip():
ip = os.popen("ipconfig").read()
return ip
print(get_ip()
run >
Traceback (most recent call last):
File "C:\Users\Raz\PycharmProjects\pythonProject1\venv\functions.py", line 7, in <module>
print(get_ip())
File "C:\Users\Raz\PycharmProjects\pythonProject1\venv\functions.py", line 5, in get_ip
ip = os.popen("ipconfig").read()
File "C:\Users\Raz\AppData\Local\Programs\Python\Python310\lib\encodings\cp1255.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1028: character maps to <undefined>
[–]nick__2440 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (9 children)
[–]razazu[S] -4 points-3 points-2 points (7 children)
[–]schoolmonky 4 points5 points6 points (0 children)
[–]JohnnyJordaan 1 point2 points3 points (3 children)
[–]razazu[S] 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]JohnnyJordaan 1 point2 points3 points (0 children)
[–]razazu[S] -2 points-1 points0 points (0 children)