Skip to content

required Tkinter module the gui/widgets.py. #4

Description

@subof

I installed and launched the project, but I couldn't add any file to it, and the import window didn't work when I clicked or dragged the file. In the console:
2026-06-15 13:27:24,263 [INFO] Video Subtitle Remover Pro v3.17.0 started2026-06-15 13:27:24,264 [INFO] Log file: C:\Users\User\AppData\Roaming\VideoSubtitleRemoverPro\vsr_pro.logException in Tkinter callbackTraceback (most recent call last): File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\tkinter_init_.py", line 1948, in call return self.func(*args) ^^^^^^^^^^^^^^^^ File "H:\AI\VideoSubtitleRemover-main\gui\widgets.py", line 321, in _on_release self.command() File "H:\AI\VideoSubtitleRemover-main\gui\widgets.py", line 1208, in open_file_dialog files = filedialog.askopenfilenames( ^^^^^^^^^^NameError: name 'filedialog' is not definedException in Tkinter callbackTraceback (most recent call last): File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\tkinter_init.py", line 1948, in call return self.func(*args)................"

According to the error NameError: name 'filedialog' is not defined, the application developers simply forgot to import the required Tkinter module in the gui/widgets.py. interface file. This is a critical error in the project's code.

According to the error NameError: name 'filedialog' is not defined, the developers of the application simply forgot to import the required Tkinter module in the gui/widgets.py interface file. This is a critical error in the project's code. Since the bug is located within the code, reinstalling the application will not resolve the issue. You need to manually fix this line, which can be done in just half a minute. To resolve the file import error, follow these steps:
According to the error NameError: name 'filedialog' is not defined, the developers of the application simply forgot to import the necessary Tkinter module in the gui/widgets.py interface file. This is a critical error in the project's code.
Since the bug is located inside the code, reinstalling will not help. You need to fix this line manually, which only takes half a minute.

How to fix the file import error:

  1. Go to the project folder and then to the gui subfolder (H:\AI\VideoSubtitleRemover-main\gui).
  2. Find the widgets.py file and open it using any text editor (Notepad, Notepad++, VS Code).
  3. Scroll to the top of the file, where the import lines are located (they usually start with the words import or from).
  4. Find the line where tkinter is imported. It may look something like this:

import tkinter as tk

  1. Add the missing import immediately below the line:

from tkinter import filedialog

  1. Save the file (Ctrl + S) and close it.
    =========

Why doesn't Drag-and-Drop (drag-and-drop) work?

The standard Tkinter window in Windows doesn't support drag-and-drop of files out of the box without third-party libraries (like TkinterDnD2). The developers have tied both functions (click and drop) to the same method, _open_file_dialog, which currently crashes due to the absence of filedialog.
After adding the import line, the Choose files button will definitely work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions