Answer the question
In order to leave comments, you need to log in
I get an error while building the executable .exe file of python, what's the problem?
After building the python script into an executable exe file and running the exe script, an error occurs:
Traceback (most recent call last):
File "Logreader_from_SVIRID.py", line 11, in <module>
File "tkinter\__init__.py", line 4064, in __init__
File "tkinter\__init__.py", line 4009, in __init__
_tkinter.TclError: couldn't open "apple.png": no such file or directory
photo = PhotoImage(file = 'icon.png')
pyinstaller -F -w -i "C:\Users\Maksim\PycharmProjects\Free_projects\RTC\Logreader_r
elease_23.01.2022\Printer.ico" Logreader.py
from tkinter import *
import os, fnmatch, time
import shutil
import tkinter.filedialog as fd
from datetime import datetime
window = Tk() # создание главного окна
photo = PhotoImage(file = 'icon.png') # присвоение переменной реквизиты картинки
window.iconphoto(False, photo) # прикрепление картинки иконки главного окна
window.config(bg='gainsboro') # изменение фона главного окна
window.title('Logreader from SVIRID') # назнаие гланого окна
window.geometry('1000x600+80+50') # размер главного окна, ширина высота, отступ от левого верхнего угла в пикселях
window.resizable(True, True)
...
window.mainloop()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question