简体   繁体   中英

python application won't start after changing the manifest name

I created a python application and used PyInstaller to convert it into .exe. My problem is: I was playing around with the .exe files for practicing, And i changed the manifest name and the application doesn't work (indeed) but the wired thing is: when I re-named that manifest file to the original name. The application is still not working with the same error: '380 Ordinal not found'. And I also tried to uninstall the application and re-install it, but again still not working ( BUT if I install it with a different name OR path the application will work fine).

I think it is something related to Temp files some of the settings are stored somewhere and in order to let my application work I need to clear these files (Am guessing).

So please could someone explain to me the cause of the problem and why it happened and how to resolve it?

Python 3.7, Pyinstaller 4.5, win 10

I found the solution: the problem happened because the manifest becomes tattooed into that executable name after the launch.

So modifying the modification date of the exe file will do the job and the application will works fine again.

Here is a python script that can fix this kind of problem:

import os
import time
import datetime

path = './/run_application//run_application.exe'

modified_ts = time.mktime(datetime.datetime.now().timetuple())
os.utime(path, (modified_ts, modified_ts))
print("Executable modification time has been updated.")

Here you can see the topic with more explanation https://github.com/pyinstaller/pyinstaller/issues/6223

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM