79771798

Date: 2025-09-22 15:41:15
Score: 0.5
Natty:
Report link

I also have an auto-updating feature built into my PyInstaller application that detects a version mismatch and then calls a support (updater) application that essentially swaps out the old app with the new one.

In order to resolve the error you are running into, a separate PyInstaller app of any kind must be executed thus creating a new _MEIxxxx folder. This will "trick" the OS into moving on to a new _MEI naming convention.

My theory as to what happens when running for example, MyApp.exe, a folder is built and the OS for some reason get's stuck with its reference to that folder for MyApp.exe. So, the next time that same app is executed (within the chain reaction that is started on the update), it will try to use the same "randomly" generated number.

In your order of events, I would suggest something like this:

  1. Run MyApp.exe

  2. Oh no! An updated is needed! Execute our installer application and close MyApp.exe

  3. Once our original app is closed, replace MyApp.exe with the brand new one

  4. Now, either run a PyInstaller application of any kind that is not MyApp.exe (this will create a new _MEI naming convention) or for bonus points build your installer (updater) application using python and PyInstaller which will flush out the old _MEI folder name

  5. Launch the new MyApp.exe

  6. Close installer and our separate app we used to change the _MEI folder names if needed

This was quite a tricky one that I could not find anyone else running into this issue. As long as I run some sort of alternative PyInstaller app that is not the primary app, I avoid this error.

Hope this helps! Cheers

Reasons:
  • Blacklisted phrase (1): Cheers
  • Whitelisted phrase (-1): Hope this helps
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: bomtvedt4