from tkinter import Canvas, Tk, Frame import locale # use German locale to make it crash # - might have to use "deu_deu" on Windows #locale.setlocale(locale.LC_ALL, 'deu_deu') # - on Ubuntu, use "locale -a" in a terminal to find available locales locale.setlocale(locale.LC_ALL, 'de_DE.utf8') # use C locale to make it work: #locale.setlocale(locale.LC_NUMERIC, 'C') print("locale =", locale.getlocale(locale.LC_NUMERIC)) master = Tk() master.title("Test") w = 10.0 # the evil float width frame = Frame(master) Canvas(master=frame, width=w, height=2, borderwidth=4)