Verwandte Themen

Python Ladebalken funktioniert nicht?

Hi,

Ich habe mit Python einen Ladebalken für ein kleines GUI erstellt. Dieser Ladebalken soll anzeigen wieviele Dateien schon Kopiert wurden. Wenn ich den Ladebalken herausnehme läuft alles. Wenn ich ihn jedoch einfüge kommen fehlermeldungen und die Dateien werden manchmal nicht korrekt Kopiert. Ich komme mitleiweile nicht mehr weiter und hoffe dass mir hier einer helfen kann.

Lg McCrafterIV

Fehlermeldung:

"C:\Users*\PycharmProjects\MakeBackup\venv\Scripts\python.exe" "C:/Users/*/PycharmProjects/MakeBackup/main.py"

Exception in Tkinter callback

ERROR! Cannot create folder.

ERROR! Cannot copy files.

ERROR! Cannot copy files.

ERROR! Cannot copy files.

Traceback (most recent call last):

File "C:\Users****\AppData\Local\Programs\Python\Python36-32\lib\tkinter__init__.py", line 1702, in __call__

return self.func(*args)

File "C:/Users//PycharmProjects/MakeBackup/main.py", line 112, in <lambda>

save_1_button = Button(fenster, text="Save", command=lambda: save.savedata())

File "C:\Users****\PycharmProjects\MakeBackup\save.py", line 40, in savedata

pb = ttk.Progressbar(fenster, orient='horizontal', length=300, mode='determinate', maximum=line, value=saved)

File "C:\Users****\AppData\Local\Programs\Python\Python36-32\lib\tkinter\ttk.py", line 1014, in __init__

Widget.__init__(self, master, "ttk::progressbar", kw)

File "C:\Users****\AppData\Local\Programs\Python\Python36-32\lib\tkinter\ttk.py", line 559, in __init__

tkinter.Widget.__init__(self, master, widgetname, kw=kw)

File "C:\Users****\AppData\Local\Programs\Python\Python36-32\lib\tkinter__init__.py", line 2296, in __init__

(widgetName, self._w) + extra + self._options(cnf))

_tkinter.TclError: expected floating-point number but got "

"

Process finished with exit code 0

Hier mein Quellcode:

https://gist.github.com/McCrafterIV/682f23b2962153beb7b640d304548dac

Error, Python, ladebalken, GUI, Tkinter