Skip to content

Ensure the working directory is correct#118

Merged
LOUDO56 merged 1 commit intoLOUDO56:mainfrom
fiedlerp:main
Apr 5, 2026
Merged

Ensure the working directory is correct#118
LOUDO56 merged 1 commit intoLOUDO56:mainfrom
fiedlerp:main

Conversation

@fiedlerp
Copy link
Copy Markdown
Contributor

@fiedlerp fiedlerp commented Oct 31, 2025

When the working directory is wrong, the program fails when it tries to access the icon in the assets directory. This happens, for example, when launching the main.py directly from the Windows shell.

Traceback (most recent call last):
  File "C:\path\to\PyMacroRecord-1.4.2\src\main.py", line 11, in <module>
    MainApp()
           ^^
  File "C:\path\to\PyMacroRecord-1.4.2\src\windows\main\main_app.py", line 45, in __init__
    self.iconbitmap(resource_path(path. join("assets", "logo.ico")))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python313\Lib\tkinter\__init__.py", line 2275, in wm_iconbitmap
    return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: bitmap "C:\WINDOWS\system32\assets\logo.ico" not defined

When the working directory is wrong, the program fails, when it tries to access the icon in the assets directory
@LOUDO56 LOUDO56 merged commit 6109050 into LOUDO56:main Apr 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants