PySimpleGUI / PySimpleGUI/PySimpleGUI
[Bug] Hard-coded Windows paths in (some) Qt demos
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.8k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Type of Issues (Enhancement, Error, Bug, Question)
Bug
Operating System
Linux (KDE Neon 5.18)
(although I imagine any non-Windows OS could have issues)
Python version
Python 3.6.9
PySimpleGUI Port and Version
PySimpleGUIQt 0.31.0
0.31.0. Released 24-Dec-2019 <module 'PySimpleGUIQt' from '/home/jaapie/.local/lib/python3.6/site-packages/PySimpleGUIQt/__init__.py'>
Your Experience Levels In Months or Years
~2 years, but very casually _________ Python programming experience
~6 or 7 years, fairly casually (hobby, taken a few C++ and Web Design courses) _________ Programming experience overall
No sir_________ Have used another Python GUI Framework (tkiner, Qt, etc) previously (yes/no is fine)?
You have completed these steps:
- Read instructions on how to file an Issue
- Searched through main docs http://www.PySimpleGUI.org for your problem
- Searched through the readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
- Looked for Demo Programs that are similar to your goal http://www.PySimpleGUI.com
- Note that there are also Demo Programs under each port on GitHub
- Run your program outside of your debugger (from a command line)
- Searched through Issues (open and closed) to see if already reported
Code or partial code causing the problem
Edit: I originally posted that the error occured when trying to run Demo_Tree_Element.py rather than Qt_Demo_Table_Element.py
I'm not sure if this even counts as a bug, so I apologize if I'm wasting somebody's time. I cloned the PySimpleGUI repo in order to have access to all the demo files, and when attempting to run Qt_Demo_Table_Element.py I got the following error:
$ ./Qt_Demo_Table_Element.py
Traceback (most recent call last):
File "./Qt_Demo_Table_Element.py", line 18, in <module>
with open(filename, "r") as infile:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Python\\PycharmProjects\\GooeyGUI\\ProgrammingClassExamples\\Win10 versions\\AFL2018 (sorted pts and %).csv'
I was a little confused as to why a Windows-style path was showing up in the error, but when I looked at the code I noticed that the full path is hard-coded into the demo code. I hunted around the rest of the cloned repo and found the appropriate folder and file pretty quickly, and after changing the code to the proper path the demo worked perfectly fine.
I also noticed similar paths in Demo_Tree_Element.py that point to some PNGs; the demo seems to work (no errors) but I'm wondering if there may be some icons or other graphics that aren't being displayed.

It's a pretty simple and straightforward fix and I doubt most people would have trouble figuring it out on their own, but I could understand someone who is very new to either Linux or python having some frustration over it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Qt_Demo_Table_Element.py and Demo_Tree_Element.py, focusing on the hard-coded Windows paths mentioned in the report. Run the demos on a non-Windows system and inspect the referenced CSV and PNG resources. Done means the demos locate their resources correctly and display the expected graphics without requiring machine-specific paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100