Category : user-interface

I am a tkinter beginner and I would like to ask what is this Traceback (most recent call last): File "C:UsersHPDesktop.py", line 23, in <module> box.insert( "win2",x) File "C:UsersHPAppDataLocalProgramsThonnylibtkinter__init__.py", line 3272, in insert self.tk.call((self._w, ‘insert’, index, chars) + args) _tkinter.TclError: bad text index "win2" although i change ‘win2’ to others but the error still have ..

Read more

import mysql.connector conn = mysql.connector.connect(‘table_name.db’) When i run this program, the following error occurs:- Traceback (most recent call last): File "C:UsersReal Project MYSQL.py", line 3, in <module> conn = mysql.connector.connect(‘PAYSLIP.db’) File "C:UsersAppDataLocalProgramsPythonPython38-32libsite-packagesmysqlconnector__init__.py", line 265, in connect return MySQLConnection(*args, **kwargs) File "C:UsersAppDataLocalProgramsPythonPython38-32libsite-packagesmysqlconnectorconnection.py", line 64, in __init__ super(MySQLConnection, self).__init__(*args, **kwargs) TypeError: __init__() takes 1 positional argument but ..

Read more

I’m making a program that will list files and want to implement a function that will refresh the current working folder import sys from PyQt5.QtWidgets import QApplication, QWidget, QTreeView, QFileSystemModel, QVBoxLayout from PyQt5.QtCore import QModelIndex class FileSystemView(QWidget): def __init__(self, dir_path): super().__init__() appWidth = 800 appHeight = 300 self.setWindowTitle(‘File System Viewer’) self.setGeometry(300, 300, appWidth, appHeight) self.model ..

Read more

I have a very small 10 x 10 pixel jpg image that I want to repeat it in the whole background using tkinter. from tkinter import * root = Tk() img = Image.open(resource_path("FILE LOCATION//filename.jpg")) for i in range(0,1000): image1 = ImageTk.PhotoImage(i) label1 = Label(root, image=image1) label1.pack() root.mainloop() This code this iterating but not sequentially.. I ..

Read more