-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executable python application may fail depending on temp folder #2129
Comments
This might be a contender for one of the most obscure bugs I've seen. Not only does it depend on the fact that your last name begins with "egg" but it also depends on the fact that the egg-prefixed name appears in the last segment of the pathname, and it depends on the fact that you're on Windows, which provides compatibility with the decades-old 8.3 convention. I suspect there's another factor at play too that's causing the 8.3 filename to be used instead of the proper full filename. |
"This might be a contender for one of the most obscure bugs I've seen." |
…ython egg. Now the path must be an unpacked egg or a zip file. Fixes #2129.
…ython egg. Now the path must be an unpacked egg or a zip file. Fixes #2129.
I took a stab at a fix in #2153, but was unsuccessful. I welcome help on this one. |
This bug motivated me to quit software development and start woodworking. |
I could totally understand this. 😃 It was actually the first time that my last name had an impact to an application crash. |
As obscure this bug may be, one of our users may have run into this or something related today. At least the error message matches, and the username begins with "egg" too. Generally, we're using up-to-date software versions, so I would have imagined that the fix for this issue should be in. I haven't verified this explicitly yet though. |
The fix was added in 49.6.0, so I'd compare your installed version of Setuptools to determine if it's affected. |
Ah, there we go. In CI, our version of python was pinned at chocolatey's 3.9.2, which was shipping 49.1.0. Thanks for the pointer! |
Hi
I've analyzed a strange issue with python based windows executable built with pyinstaller. The executable could be built without an issue, but when the tool was started the following error occurs:
After a while I've found out that the same executable works properly on other workstations or even with other user accounts.
I guess I've found the root cause for my problem in the file "pkg_ressources.py" of the setuptools. In the function "_setup_prefix" is a test if a path ends with ".egg", what is the case in my situation for my temporairy folder (=> "C:\Users\A9447~1.EGG"). This causes that a new invalid path was built and afterwards caused the assertion. "C:\Users\A9447~1.EGG" is the default temp folder for my user "a.eggenberger".
The quick solution was to set another user temp folder "C\:Temp". This solved the behavior and it works as expected.
To avoid that other users with a lastname starting with "egg" the code in the _setup_prefix function should be improved.
Regards Adrian
The text was updated successfully, but these errors were encountered: