Mám nahoře
import webbrowser
funkce bropen()
def bropen():
xyza=vstup.get()
print xyza
webbrowser.open(xyza)
A výstup je
C:/Documents and Settings/Ondřej Surý/Plocha/html.html
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Program Files\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
return self.func(*args)
File "C:\Program Files\Python24\wmymaster.py", line 82, in bropen
webbrowser.open(xyza)
File "C:\Program Files\Python24\lib\webbrowser.py", line 43, in open
get().open(url, new, autoraise)
File "C:\Program Files\Python24\lib\webbrowser.py", line 250, in open
os.startfile(url)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0159' in position 29: ordinal not in range(128)
Prosím v čem je problém možná vím, ale jak ho opravit?
Edit: v tom kodu je toho vic ale nechci to tu zahltit, myslim ze je to jasne...