From jacob at blindza.co.za Mon Apr 1 08:00:44 2024 From: jacob at blindza.co.za (Jacob Kruger) Date: Mon, 1 Apr 2024 14:00:44 +0200 Subject: [python-win32] PyInstaller giving me hassles the last week or so, operating under windows 11 64-bit - package required Message-ID: This started happening this past week, and, while it's worked fine in the past, the moment I try to launch the pyinstaller process at all, to generate compiled output, or even if just launch it with no command line options, I receive the following error message: pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found and is required by the application The full contents of the output string when I even try to just launch pyinstaller with no commands/arguments is the following: Traceback (most recent call last): ? File "", line 198, in _run_module_as_main ? File "", line 88, in _run_code ? File "C:\pythonScripts\monitoring_nssm\venv\Scripts\pyinstaller.exe\__main__.py", line 7, in ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\__main__.py", line 228, in _console_script_run run() ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\__main__.py", line 170, in run ??? parser = generate_parser() ^^^^^^^^^^^^^^^^^ ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\__main__.py", line 136, in generate_parser ??? import PyInstaller.building.build_main ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\building\build_main.py", line 28, in ??? from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\building\api.py", line 32, in ??? from PyInstaller.building.splash import Splash? # argument type validation in EXE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\building\splash.py", line 23, in ??? from PyInstaller.depend import bindepend ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\depend\bindepend.py", line 25, in ??? from PyInstaller.depend import dylib, utils ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\depend\utils.py", line 31, in ??? from PyInstaller.lib.modulegraph import modulegraph ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 34, in ??? from altgraph.ObjectGraph import ObjectGraph ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\altgraph\__init__.py", line 144, in ??? __version__ = pkg_resources.require("altgraph")[0].version ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\pkg_resources\__init__.py", line 952, in require ??? needed = self.resolve(parse_requirements(requirements)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\pkg_resources\__init__.py", line 813, in resolve ??? dist = self._resolve_dist( ^^^^^^^^^^^^^^^^^^^ ? File "C:\pythonScripts\monitoring_nssm\venv\Lib\site-packages\pkg_resources\__init__.py", line 854, in _resolve_dist ??? raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found and is required by the application # ---end of output--- I have tried completely removing python's installation, and, reinstalling it, but, same issue more or less immediately. If I freeze pip's installed list within this specific virtual environment, it lists the following: altgraph==0.17.4 packaging==24.0 pefile==2023.2.7 pyinstaller==6.5.0 pyinstaller-hooks-contrib==2024.3 pywin32-ctypes==0.2.2 # ---end of requirements.txt--- And, if, just for testing, I launch python interpreter, and, ask it to import altgraph, it provides the same last line of error output? If relevant, this was running with python 3.11.8, under windows 11 64-bit, and, can't think of anything that specifically occurred/changed this past week, besides normal things like windows updates, etc., but, don't really think that's likely to be relevant, unless something to do with pywin32 has caused an issue? Tried replacing python 3.11 with 3.12, but, exact same issue. Also, if relevant, while running under latest up-to-date version of windows 11 64 bit, have in any case enabled case-sensitivity on the folder I store all my python code in, just in case. Thoughts? TIA -- Jacob Kruger +2782 413 4791 "Resistance is futile!...Acceptance is versatile..." From tebjan at gmail.com Fri Apr 5 08:03:39 2024 From: tebjan at gmail.com (Tebjan Halm) Date: Fri, 5 Apr 2024 14:03:39 +0200 Subject: [python-win32] Which paths must be known by pythonnet to import the win32api module? Message-ID: Hello pywin32 mailing list. I am currently trying to run a simple script showing a message box using pythonnet. That is running python from the .NET runtime. I've started a discussion here: https://github.com/pythonnet/pythonnet/discussions/2356 Maybe someone can chime in to help me configure the venv to get it running? Ultimately I need it to run TensorRT model optimization scripts, which somewhere deep inside use a win32api import. Thanks for any help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From akbhargava at gmail.com Sun Apr 14 16:19:06 2024 From: akbhargava at gmail.com (Alok Bhargava) Date: Sun, 14 Apr 2024 16:19:06 -0400 Subject: [python-win32] Help in deciphering error Message-ID: Hello, I would appreciate any help in diagnosing why this error occurs. I have WinPython installed on my Windows 11 Pro machine and not registered (registering did not change the outcome). I installed pyinstaller and generated a single file .exe. This is what I have encountered as documented in a Windows Report.wer file: (Many thanks for all your help (please also see here )) Version=1 EventType=APPCRASH EventTime=133575902720464133 ReportType=2 Consent=1 UploadTime=133575902725050996 ReportStatus=268435456 ReportIdentifier=823493c6-5512-4b81-86a2-acfde51244ee IntegratorReportIdentifier=4598584a-fd33-4262-89ae-0e50fc817d5b Wow64Host=34404 NsAppName=test.exe AppSessionGuid=0000179c-0000-0009-95e6-c361938eda01 TargetAppId=W:00061dd68bdd826965f6c90daa8b7ff486660000ffff!0000ba8b2a53d175b81101916c75210fb20beb28423c!test.exe TargetAppVer=2024//04//14:17:42:06!7543d8!test.exe BootId=4294967295 TargetAsId=583 IsFatal=1 EtwNonCollectReason=1 Response.BucketId=9fa208ac7d6291b25d2a8a0a7614126c Response.BucketTable=4 Response.LegacyBucketId=2101643953657090668 Response.type=4 Sig[0].Name=Application Name Sig[0].Value=test.exe Sig[1].Name=Application Version Sig[1].Value=0.0.0.0 Sig[2].Name=Application Timestamp Sig[2].Value=661c156e Sig[3].Name=Fault Module Name Sig[3].Value=python312.dll Sig[4].Name=Fault Module Version Sig[4].Value=3.12.2150.1013 Sig[5].Name=Fault Module Timestamp Sig[5].Value=65c2a47f Sig[6].Name=Exception Code Sig[6].Value=c0000005 Sig[7].Name=Exception Offset Sig[7].Value=000000000000cc2f DynamicSig[1].Name=OS Version DynamicSig[1].Value=10.0.22631.2.0.0.256.48 DynamicSig[2].Name=Locale ID DynamicSig[2].Value=1033 DynamicSig[22].Name=Additional Information 1 DynamicSig[22].Value=fa6f DynamicSig[23].Name=Additional Information 2 DynamicSig[23].Value=fa6fb7dd40186b4810d26d1ca09a7044 DynamicSig[24].Name=Additional Information 3 DynamicSig[24].Value=a877 DynamicSig[25].Name=Additional Information 4 DynamicSig[25].Value=a87723ca5a16692a5a5ebf3576a4ef47 UI[2]=C:\Users\akbha\Desktop\test.exe UI[5]=Close UI[8]=test.exe stopped working and was closed UI[9]=A problem caused the application to stop working correctly. Windows will notify you if a solution is available. UI[10]=&Close LoadedModule[0]=C:\Users\akbha\Desktop\test.exe LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll LoadedModule[2]=C:\Windows\System32\KERNEL32.DLL LoadedModule[3]=C:\Windows\System32\KERNELBASE.dll LoadedModule[4]=C:\Windows\System32\USER32.dll LoadedModule[5]=C:\Windows\System32\win32u.dll LoadedModule[6]=C:\Windows\System32\GDI32.dll LoadedModule[7]=C:\Windows\System32\gdi32full.dll LoadedModule[8]=C:\Windows\System32\msvcp_win.dll LoadedModule[9]=C:\Windows\System32\ucrtbase.dll LoadedModule[10]=C:\Windows\System32\ADVAPI32.dll LoadedModule[11]=C:\Windows\System32\msvcrt.dll LoadedModule[12]=C:\Windows\System32\sechost.dll LoadedModule[13]=C:\Windows\System32\bcrypt.dll LoadedModule[14]=C:\Windows\System32\RPCRT4.dll LoadedModule[15]=C:\Windows\system32\_MEI27562\python312.dll LoadedModule[16]=C:\Windows\System32\WS2_32.dll LoadedModule[17]=C:\Windows\SYSTEM32\VERSION.dll LoadedModule[18]=C:\Windows\system32\_MEI27562\VCRUNTIME140.dll LoadedModule[19]=C:\Windows\System32\bcryptprimitives.dll LoadedModule[20]=C:\Windows\system32\_MEI27562\pywin32_system32\pywintypes312.dll LoadedModule[21]=C:\Windows\System32\ole32.dll LoadedModule[22]=C:\Windows\System32\combase.dll LoadedModule[23]=C:\Windows\System32\OLEAUT32.dll LoadedModule[24]=C:\Windows\system32\_MEI27562\VCRUNTIME140_1.dll LoadedModule[25]=C:\Windows\system32\_MEI27562\win32\win32api.pyd LoadedModule[26]=C:\Windows\System32\SHELL32.dll LoadedModule[27]=C:\Windows\SYSTEM32\secur32.dll LoadedModule[28]=C:\Windows\SYSTEM32\SSPICLI.DLL LoadedModule[29]=C:\Windows\system32\_MEI27562\win32\win32service.pyd LoadedModule[30]=C:\Windows\system32\_MEI27562\win32\servicemanager.pyd State[0].Key=Transport.DoneStage1 State[0].Value=1 OsInfo[0].Key=vermaj OsInfo[0].Value=10 OsInfo[1].Key=vermin OsInfo[1].Value=0 OsInfo[2].Key=verbld OsInfo[2].Value=22631 OsInfo[3].Key=ubr OsInfo[3].Value=3447 OsInfo[4].Key=versp OsInfo[4].Value=0 OsInfo[5].Key=arch OsInfo[5].Value=9 OsInfo[6].Key=lcid OsInfo[6].Value=1033 OsInfo[7].Key=geoid OsInfo[7].Value=244 OsInfo[8].Key=sku OsInfo[8].Value=48 OsInfo[9].Key=domain OsInfo[9].Value=0 OsInfo[10].Key=prodsuite OsInfo[10].Value=256 OsInfo[11].Key=ntprodtype OsInfo[11].Value=1 OsInfo[12].Key=platid OsInfo[12].Value=10 OsInfo[13].Key=sr OsInfo[13].Value=0 OsInfo[14].Key=tmsi OsInfo[14].Value=222623649 OsInfo[15].Key=osinsty OsInfo[15].Value=2 OsInfo[16].Key=iever OsInfo[16].Value=11.1.22621.0-11.0.1000 OsInfo[17].Key=portos OsInfo[17].Value=0 OsInfo[18].Key=ram OsInfo[18].Value=6143 OsInfo[19].Key=svolsz OsInfo[19].Value=63 OsInfo[20].Key=wimbt OsInfo[20].Value=0 OsInfo[21].Key=blddt OsInfo[21].Value=220506 OsInfo[22].Key=bldtm OsInfo[22].Value=1250 OsInfo[23].Key=bldbrch OsInfo[23].Value=ni_release OsInfo[24].Key=bldchk OsInfo[24].Value=0 OsInfo[25].Key=wpvermaj OsInfo[25].Value=0 OsInfo[26].Key=wpvermin OsInfo[26].Value=0 OsInfo[27].Key=wpbuildmaj OsInfo[27].Value=0 OsInfo[28].Key=wpbuildmin OsInfo[28].Value=0 OsInfo[29].Key=osver OsInfo[29].Value=10.0.22621.3447.amd64fre.ni_release.220506-1250 OsInfo[30].Key=buildflightid OsInfo[31].Key=edition OsInfo[31].Value=Professional OsInfo[32].Key=ring OsInfo[32].Value=Retail OsInfo[33].Key=expid OsInfo[33].Value=MD:283BAEF,ME:28279A6,ME:2A69053,MD:2E3923D OsInfo[34].Key=fconid OsInfo[34].Value=15546617,1,2,0;19193777,0,2,0;19638787,0,2,0;23531064,2,2,0;23562335,2,2,0;23563673,2,2,0;23877894,1,2,0;32862274,0,2,1;35681102,0,1,0;36803287,0,2,1;36803295,0,2,0;36803303,0,2,0;38277973,0,1,1;38859191,0,2,0;39145991,0,2,0;39263329,1,2,0;39281392,0,2,0;40025975,0,1,0;40616880,0,1,0;40883769,0,1,0;40981503,0,1,0;41135193,0,1,1;41137130,0,1,0;41342175,0,1,0;41655236,0,2,0;41772259,0,2,0;41799415,0,2,1;42052423,0,2,0;42105254,0,2,0;42963857,0,2,1;43133808,1,2,1;43169616,0,1,0;43203978,0,2,1;43231896,0,0,0;43572857,0,2,0;43772553,0,1,0;43844371,0,1,0;43978769,0,1,1;43998261,0,2,1;44325080,0,1,0;44470355,0,2,0;44521793,0,1,0;44533041,0,0,1;44552141,0,1,0;44776738,0,2,0;45113694,0,2,1;45185354,0,2,0;45668242,0,2,1;45732051,0,2,0;45786062,0,2,1;45796396,0,2,0;45930103,0,2,0;45949789,0,2,0;45951844,0,2,0;45952583,0,2,0;45952594,0,2,0;45952795,0,2,0;45952819,0,2,0;45952823,0,2,0;45952872,0,2,0;45991456,0,1,1;45994554,0,2,0;45999439,0,2,0;46009617,0,2,1;46111200,0,2,1;46251949,0,2,1;46541070,0,2,0;46551074,0,1,1;46557400,0,1,0;46604216,0,2,1;46619189,0,2,1;46656382,0,2,1;46715659,0,0,1;46717502,0,2,0;46982417,0,2,0;46984166,0,0,0;47134595,0,1,0;47205155,0,2,1;47270778,0,2,1;47381523,0,2,1;47526873,1,2,1;47681899,0,1,1;47916854,0,1,0;47942561,0,0,1;47973375,0,1,1;47991031,0,2,1;48057519,0,2,0;48082515,0,0,0;48128028,0,2,0;48141486,0,2,0;48433541,0,1,0;48433706,0,1,0;48433719,0,1,0;48468527,0,1,0;48468541,0,1,0;48503047,0,2,1;48797432,1,2,1 OsInfo[35].Key=containerid OsInfo[36].Key=containertype OsInfo[37].Key=edu OsInfo[37].Value=0 OsInfo[38].Key=servicinginprogress OsInfo[38].Value=0 OsInfo[39].Key=featureupdatependingreboot OsInfo[39].Value=0 FriendlyEventName=Stopped working ConsentKey=APPCRASH AppName=test.exe AppPath=C:\Users\akbha\Desktop\test.exe NsPartner=windows NsGroup=windows8 ApplicationIdentity=5BD169AF9E639B269B164A74EB1E980B MetadataHash=172243955 -------------- next part -------------- An HTML attachment was scrubbed... URL: From akbhargava at gmail.com Sun Apr 14 20:07:58 2024 From: akbhargava at gmail.com (Alok Bhargava) Date: Sun, 14 Apr 2024 20:07:58 -0400 Subject: [python-win32] Error running Python 3.12 app as a Windows Service (app created using pyinstaller 6.6.0) Message-ID: Hi all, I am running into an issue that I am unable to track down a resolution for. I have developed a Python Flask application for which I created a single-file executable using pyinstaller that I wish to run as a Windows Service. I researched on the internet to find the common Python framework to run a Windows Service - however I am unable to successfully run this framework: 1. I can install the service 2. I can run the service but it encounters an error. I was able to locate the Report.wer file and have pasted it below. >From the stack trace, it appears that the error is related to python312.dll or servicemanager.pyd - see details below from Error event log. I would greatly appreciate any help with diagnosing the root cause. Thanks so much for your help! AKB *General:* Faulting application name: test.exe, version: 0.0.0.0, time stamp: 0x661c156e Faulting module name: python312.dll, version: 3.12.2150.1013, time stamp: 0x65c2a47f Exception code: 0xc0000005 Fault offset: 0x000000000000cc2f Faulting process id: 0x0x24BC Faulting application start time: 0x0x1DA8EA65ADF806F Faulting application path: C:\Users\akbha\Desktop\test.exe Faulting module path: C:\Windows\system32\_MEI95962\python312.dll Report Id: 322db0de-6f24-4599-8745-ee26ce89e997 Faulting package full name: Faulting package-relative application ID: *Details:* Version=1 EventType=APPCRASH EventTime=133575902720464133 ReportType=2 Consent=1 UploadTime=133575902725050996 ReportStatus=268435456 ReportIdentifier=823493c6-5512-4b81-86a2-acfde51244ee IntegratorReportIdentifier=4598584a-fd33-4262-89ae-0e50fc817d5b Wow64Host=34404 NsAppName=test.exe AppSessionGuid=0000179c-0000-0009-95e6-c361938eda01 TargetAppId=W:00061dd68bdd826965f6c90daa8b7ff486660000ffff!0000ba8b2a53d175b81101916c75210fb20beb28423c!test.exe TargetAppVer=2024//04//14:17:42:06!7543d8!test.exe BootId=4294967295 TargetAsId=583 IsFatal=1 EtwNonCollectReason=1 Response.BucketId=9fa208ac7d6291b25d2a8a0a7614126c Response.BucketTable=4 Response.LegacyBucketId=2101643953657090668 Response.type=4 Sig[0].Name=Application Name Sig[0].Value=test.exe Sig[1].Name=Application Version Sig[1].Value=0.0.0.0 Sig[2].Name=Application Timestamp Sig[2].Value=661c156e Sig[3].Name=Fault Module Name Sig[3].Value=python312.dll Sig[4].Name=Fault Module Version Sig[4].Value=3.12.2150.1013 Sig[5].Name=Fault Module Timestamp Sig[5].Value=65c2a47f Sig[6].Name=Exception Code Sig[6].Value=c0000005 Sig[7].Name=Exception Offset Sig[7].Value=000000000000cc2f DynamicSig[1].Name=OS Version DynamicSig[1].Value=10.0.22631.2.0.0.256.48 DynamicSig[2].Name=Locale ID DynamicSig[2].Value=1033 DynamicSig[22].Name=Additional Information 1 DynamicSig[22].Value=fa6f DynamicSig[23].Name=Additional Information 2 DynamicSig[23].Value=fa6fb7dd40186b4810d26d1ca09a7044 DynamicSig[24].Name=Additional Information 3 DynamicSig[24].Value=a877 DynamicSig[25].Name=Additional Information 4 DynamicSig[25].Value=a87723ca5a16692a5a5ebf3576a4ef47 UI[2]=C:\Users\akbha\Desktop\test.exe UI[5]=Close UI[8]=test.exe stopped working and was closed UI[9]=A problem caused the application to stop working correctly. Windows will notify you if a solution is available. UI[10]=&Close LoadedModule[0]=C:\Users\akbha\Desktop\test.exe LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll LoadedModule[2]=C:\Windows\System32\KERNEL32.DLL LoadedModule[3]=C:\Windows\System32\KERNELBASE.dll LoadedModule[4]=C:\Windows\System32\USER32.dll LoadedModule[5]=C:\Windows\System32\win32u.dll LoadedModule[6]=C:\Windows\System32\GDI32.dll LoadedModule[7]=C:\Windows\System32\gdi32full.dll LoadedModule[8]=C:\Windows\System32\msvcp_win.dll LoadedModule[9]=C:\Windows\System32\ucrtbase.dll LoadedModule[10]=C:\Windows\System32\ADVAPI32.dll LoadedModule[11]=C:\Windows\System32\msvcrt.dll LoadedModule[12]=C:\Windows\System32\sechost.dll LoadedModule[13]=C:\Windows\System32\bcrypt.dll LoadedModule[14]=C:\Windows\System32\RPCRT4.dll LoadedModule[15]=C:\Windows\system32\_MEI27562\python312.dll LoadedModule[16]=C:\Windows\System32\WS2_32.dll LoadedModule[17]=C:\Windows\SYSTEM32\VERSION.dll LoadedModule[18]=C:\Windows\system32\_MEI27562\VCRUNTIME140.dll LoadedModule[19]=C:\Windows\System32\bcryptprimitives.dll LoadedModule[20]=C:\Windows\system32\_MEI27562\pywin32_system32\pywintypes312.dll LoadedModule[21]=C:\Windows\System32\ole32.dll LoadedModule[22]=C:\Windows\System32\combase.dll LoadedModule[23]=C:\Windows\System32\OLEAUT32.dll LoadedModule[24]=C:\Windows\system32\_MEI27562\VCRUNTIME140_1.dll LoadedModule[25]=C:\Windows\system32\_MEI27562\win32\win32api.pyd LoadedModule[26]=C:\Windows\System32\SHELL32.dll LoadedModule[27]=C:\Windows\SYSTEM32\secur32.dll LoadedModule[28]=C:\Windows\SYSTEM32\SSPICLI.DLL LoadedModule[29]=C:\Windows\system32\_MEI27562\win32\win32service.pyd LoadedModule[30]=C:\Windows\system32\_MEI27562\win32\servicemanager.pyd State[0].Key=Transport.DoneStage1 State[0].Value=1 OsInfo[0].Key=vermaj OsInfo[0].Value=10 OsInfo[1].Key=vermin OsInfo[1].Value=0 OsInfo[2].Key=verbld OsInfo[2].Value=22631 OsInfo[3].Key=ubr OsInfo[3].Value=3447 OsInfo[4].Key=versp OsInfo[4].Value=0 OsInfo[5].Key=arch OsInfo[5].Value=9 OsInfo[6].Key=lcid OsInfo[6].Value=1033 OsInfo[7].Key=geoid OsInfo[7].Value=244 OsInfo[8].Key=sku OsInfo[8].Value=48 OsInfo[9].Key=domain OsInfo[9].Value=0 OsInfo[10].Key=prodsuite OsInfo[10].Value=256 OsInfo[11].Key=ntprodtype OsInfo[11].Value=1 OsInfo[12].Key=platid OsInfo[12].Value=10 OsInfo[13].Key=sr OsInfo[13].Value=0 OsInfo[14].Key=tmsi OsInfo[14].Value=222623649 OsInfo[15].Key=osinsty OsInfo[15].Value=2 OsInfo[16].Key=iever OsInfo[16].Value=11.1.22621.0-11.0.1000 OsInfo[17].Key=portos OsInfo[17].Value=0 OsInfo[18].Key=ram OsInfo[18].Value=6143 OsInfo[19].Key=svolsz OsInfo[19].Value=63 OsInfo[20].Key=wimbt OsInfo[20].Value=0 OsInfo[21].Key=blddt OsInfo[21].Value=220506 OsInfo[22].Key=bldtm OsInfo[22].Value=1250 OsInfo[23].Key=bldbrch OsInfo[23].Value=ni_release OsInfo[24].Key=bldchk OsInfo[24].Value=0 OsInfo[25].Key=wpvermaj OsInfo[25].Value=0 OsInfo[26].Key=wpvermin OsInfo[26].Value=0 OsInfo[27].Key=wpbuildmaj OsInfo[27].Value=0 OsInfo[28].Key=wpbuildmin OsInfo[28].Value=0 OsInfo[29].Key=osver OsInfo[29].Value=10.0.22621.3447.amd64fre.ni_release.220506-1250 OsInfo[30].Key=buildflightid OsInfo[31].Key=edition OsInfo[31].Value=Professional OsInfo[32].Key=ring OsInfo[32].Value=Retail OsInfo[33].Key=expid OsInfo[33].Value=MD:283BAEF,ME:28279A6,ME:2A69053,MD:2E3923D OsInfo[34].Key=fconid OsInfo[34].Value=15546617,1,2,0;19193777,0,2,0;19638787,0,2,0;23531064,2,2,0;23562335,2,2,0;23563673,2,2,0;23877894,1,2,0;32862274,0,2,1;35681102,0,1,0;36803287,0,2,1;36803295,0,2,0;36803303,0,2,0;38277973,0,1,1;38859191,0,2,0;39145991,0,2,0;39263329,1,2,0;39281392,0,2,0;40025975,0,1,0;40616880,0,1,0;40883769,0,1,0;40981503,0,1,0;41135193,0,1,1;41137130,0,1,0;41342175,0,1,0;41655236,0,2,0;41772259,0,2,0;41799415,0,2,1;42052423,0,2,0;42105254,0,2,0;42963857,0,2,1;43133808,1,2,1;43169616,0,1,0;43203978,0,2,1;43231896,0,0,0;43572857,0,2,0;43772553,0,1,0;43844371,0,1,0;43978769,0,1,1;43998261,0,2,1;44325080,0,1,0;44470355,0,2,0;44521793,0,1,0;44533041,0,0,1;44552141,0,1,0;44776738,0,2,0;45113694,0,2,1;45185354,0,2,0;45668242,0,2,1;45732051,0,2,0;45786062,0,2,1;45796396,0,2,0;45930103,0,2,0;45949789,0,2,0;45951844,0,2,0;45952583,0,2,0;45952594,0,2,0;45952795,0,2,0;45952819,0,2,0;45952823,0,2,0;45952872,0,2,0;45991456,0,1,1;45994554,0,2,0;45999439,0,2,0;46009617,0,2,1;46111200,0,2,1;46251949,0,2,1;46541070,0,2,0;46551074,0,1,1;46557400,0,1,0;46604216,0,2,1;46619189,0,2,1;46656382,0,2,1;46715659,0,0,1;46717502,0,2,0;46982417,0,2,0;46984166,0,0,0;47134595,0,1,0;47205155,0,2,1;47270778,0,2,1;47381523,0,2,1;47526873,1,2,1;47681899,0,1,1;47916854,0,1,0;47942561,0,0,1;47973375,0,1,1;47991031,0,2,1;48057519,0,2,0;48082515,0,0,0;48128028,0,2,0;48141486,0,2,0;48433541,0,1,0;48433706,0,1,0;48433719,0,1,0;48468527,0,1,0;48468541,0,1,0;48503047,0,2,1;48797432,1,2,1 OsInfo[35].Key=containerid OsInfo[36].Key=containertype OsInfo[37].Key=edu OsInfo[37].Value=0 OsInfo[38].Key=servicinginprogress OsInfo[38].Value=0 OsInfo[39].Key=featureupdatependingreboot OsInfo[39].Value=0 FriendlyEventName=Stopped working ConsentKey=APPCRASH AppName=test.exe AppPath=C:\Users\akbha\Desktop\test.exe NsPartner=windows NsGroup=windows8 ApplicationIdentity=5BD169AF9E639B269B164A74EB1E980B MetadataHash=172243955 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mhammond at skippinet.com.au Mon Apr 15 11:05:03 2024 From: mhammond at skippinet.com.au (Mark Hammond) Date: Mon, 15 Apr 2024 11:05:03 -0400 Subject: [python-win32] Help in deciphering error In-Reply-To: References: Message-ID: The first comment of https://github.com/mhammond/pywin32/issues/2155 has STR that doesn't involve pyinstaller or custom executables. If you can reproduce that, then you are probably facing the same problem, so the solution is probably to use Python 3.11 until more information about the 3.12 specific problem is known. HTH, Mark On 2024-04-14 4:19 p.m., Alok Bhargava wrote: > Hello, > > I would appreciate any help in diagnosing why this error occurs. > > I have WinPython installed on my Windows 11 Pro machine and not > registered (registering did not change the outcome). > > I installed pyinstaller and generated a single file .exe. > > This is what I have encountered as documented in a Windows Report.wer > file: > > (Many thanks for all your help (please also see here > )) > |Version=1 EventType=APPCRASH EventTime=133575902720464133 > ReportType=2 Consent=1 UploadTime=133575902725050996 > ReportStatus=268435456 > ReportIdentifier=823493c6-5512-4b81-86a2-acfde51244ee > IntegratorReportIdentifier=4598584a-fd33-4262-89ae-0e50fc817d5b > Wow64Host=34404 NsAppName=test.exe > AppSessionGuid=0000179c-0000-0009-95e6-c361938eda01 > TargetAppId=W:00061dd68bdd826965f6c90daa8b7ff486660000ffff!0000ba8b2a53d175b81101916c75210fb20beb28423c!test.exe > TargetAppVer=2024//04//14:17:42:06!7543d8!test.exe BootId=4294967295 > TargetAsId=583 IsFatal=1 EtwNonCollectReason=1 > Response.BucketId=9fa208ac7d6291b25d2a8a0a7614126c > Response.BucketTable=4 Response.LegacyBucketId=2101643953657090668 > Response.type=4 Sig[0].Name=Application Name Sig[0].Value=test.exe > Sig[1].Name=Application Version Sig[1].Value=0.0.0.0 > Sig[2].Name=Application Timestamp Sig[2].Value=661c156e > Sig[3].Name=Fault Module Name Sig[3].Value=python312.dll > Sig[4].Name=Fault Module Version Sig[4].Value=3.12.2150.1013 > Sig[5].Name=Fault Module Timestamp Sig[5].Value=65c2a47f > Sig[6].Name=Exception Code Sig[6].Value=c0000005 Sig[7].Name=Exception > Offset Sig[7].Value=000000000000cc2f DynamicSig[1].Name=OS Version > DynamicSig[1].Value=10.0.22631.2.0.0.256.48 DynamicSig[2].Name=Locale > ID DynamicSig[2].Value=1033 DynamicSig[22].Name=Additional Information > 1 DynamicSig[22].Value=fa6f DynamicSig[23].Name=Additional Information > 2 DynamicSig[23].Value=fa6fb7dd40186b4810d26d1ca09a7044 > DynamicSig[24].Name=Additional Information 3 DynamicSig[24].Value=a877 > DynamicSig[25].Name=Additional Information 4 > DynamicSig[25].Value=a87723ca5a16692a5a5ebf3576a4ef47 > UI[2]=C:\Users\akbha\Desktop\test.exe UI[5]=Close UI[8]=test.exe > stopped working and was closed UI[9]=A problem caused the application > to stop working correctly. Windows will notify you if a solution is > available. UI[10]=&Close > LoadedModule[0]=C:\Users\akbha\Desktop\test.exe > LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll > LoadedModule[2]=C:\Windows\System32\KERNEL32.DLL > LoadedModule[3]=C:\Windows\System32\KERNELBASE.dll > LoadedModule[4]=C:\Windows\System32\USER32.dll > LoadedModule[5]=C:\Windows\System32\win32u.dll > LoadedModule[6]=C:\Windows\System32\GDI32.dll > LoadedModule[7]=C:\Windows\System32\gdi32full.dll > LoadedModule[8]=C:\Windows\System32\msvcp_win.dll > LoadedModule[9]=C:\Windows\System32\ucrtbase.dll > LoadedModule[10]=C:\Windows\System32\ADVAPI32.dll > LoadedModule[11]=C:\Windows\System32\msvcrt.dll > LoadedModule[12]=C:\Windows\System32\sechost.dll > LoadedModule[13]=C:\Windows\System32\bcrypt.dll > LoadedModule[14]=C:\Windows\System32\RPCRT4.dll > LoadedModule[15]=C:\Windows\system32\_MEI27562\python312.dll > LoadedModule[16]=C:\Windows\System32\WS2_32.dll > LoadedModule[17]=C:\Windows\SYSTEM32\VERSION.dll > LoadedModule[18]=C:\Windows\system32\_MEI27562\VCRUNTIME140.dll > LoadedModule[19]=C:\Windows\System32\bcryptprimitives.dll > LoadedModule[20]=C:\Windows\system32\_MEI27562\pywin32_system32\pywintypes312.dll > LoadedModule[21]=C:\Windows\System32\ole32.dll > LoadedModule[22]=C:\Windows\System32\combase.dll > LoadedModule[23]=C:\Windows\System32\OLEAUT32.dll > LoadedModule[24]=C:\Windows\system32\_MEI27562\VCRUNTIME140_1.dll > LoadedModule[25]=C:\Windows\system32\_MEI27562\win32\win32api.pyd > LoadedModule[26]=C:\Windows\System32\SHELL32.dll > LoadedModule[27]=C:\Windows\SYSTEM32\secur32.dll > LoadedModule[28]=C:\Windows\SYSTEM32\SSPICLI.DLL > LoadedModule[29]=C:\Windows\system32\_MEI27562\win32\win32service.pyd > LoadedModule[30]=C:\Windows\system32\_MEI27562\win32\servicemanager.pyd > State[0].Key=Transport.DoneStage1 State[0].Value=1 > OsInfo[0].Key=vermaj OsInfo[0].Value=10 OsInfo[1].Key=vermin > OsInfo[1].Value=0 OsInfo[2].Key=verbld OsInfo[2].Value=22631 > OsInfo[3].Key=ubr OsInfo[3].Value=3447 OsInfo[4].Key=versp > OsInfo[4].Value=0 OsInfo[5].Key=arch OsInfo[5].Value=9 > OsInfo[6].Key=lcid OsInfo[6].Value=1033 OsInfo[7].Key=geoid > OsInfo[7].Value=244 OsInfo[8].Key=sku OsInfo[8].Value=48 > OsInfo[9].Key=domain OsInfo[9].Value=0 OsInfo[10].Key=prodsuite > OsInfo[10].Value=256 OsInfo[11].Key=ntprodtype OsInfo[11].Value=1 > OsInfo[12].Key=platid OsInfo[12].Value=10 OsInfo[13].Key=sr > OsInfo[13].Value=0 OsInfo[14].Key=tmsi OsInfo[14].Value=222623649 > OsInfo[15].Key=osinsty OsInfo[15].Value=2 OsInfo[16].Key=iever > OsInfo[16].Value=11.1.22621.0-11.0.1000 OsInfo[17].Key=portos > OsInfo[17].Value=0 OsInfo[18].Key=ram OsInfo[18].Value=6143 > OsInfo[19].Key=svolsz OsInfo[19].Value=63 OsInfo[20].Key=wimbt > OsInfo[20].Value=0 OsInfo[21].Key=blddt OsInfo[21].Value=220506 > OsInfo[22].Key=bldtm OsInfo[22].Value=1250 OsInfo[23].Key=bldbrch > OsInfo[23].Value=ni_release OsInfo[24].Key=bldchk OsInfo[24].Value=0 > OsInfo[25].Key=wpvermaj OsInfo[25].Value=0 OsInfo[26].Key=wpvermin > OsInfo[26].Value=0 OsInfo[27].Key=wpbuildmaj OsInfo[27].Value=0 > OsInfo[28].Key=wpbuildmin OsInfo[28].Value=0 OsInfo[29].Key=osver > OsInfo[29].Value=10.0.22621.3447.amd64fre.ni_release.220506-1250 > OsInfo[30].Key=buildflightid OsInfo[31].Key=edition > OsInfo[31].Value=Professional OsInfo[32].Key=ring > OsInfo[32].Value=Retail OsInfo[33].Key=expid > OsInfo[33].Value=MD:283BAEF,ME:28279A6,ME:2A69053,MD:2E3923D > OsInfo[34].Key=fconid > OsInfo[34].Value=15546617,1,2,0;19193777,0,2,0;19638787,0,2,0;23531064,2,2,0;23562335,2,2,0;23563673,2,2,0;23877894,1,2,0;32862274,0,2,1;35681102,0,1,0;36803287,0,2,1;36803295,0,2,0;36803303,0,2,0;38277973,0,1,1;38859191,0,2,0;39145991,0,2,0;39263329,1,2,0;39281392,0,2,0;40025975,0,1,0;40616880,0,1,0;40883769,0,1,0;40981503,0,1,0;41135193,0,1,1;41137130,0,1,0;41342175,0,1,0;41655236,0,2,0;41772259,0,2,0;41799415,0,2,1;42052423,0,2,0;42105254,0,2,0;42963857,0,2,1;43133808,1,2,1;43169616,0,1,0;43203978,0,2,1;43231896,0,0,0;43572857,0,2,0;43772553,0,1,0;43844371,0,1,0;43978769,0,1,1;43998261,0,2,1;44325080,0,1,0;44470355,0,2,0;44521793,0,1,0;44533041,0,0,1;44552141,0,1,0;44776738,0,2,0;45113694,0,2,1;45185354,0,2,0;45668242,0,2,1;45732051,0,2,0;45786062,0,2,1;45796396,0,2,0;45930103,0,2,0;45949789,0,2,0;45951844,0,2,0;45952583,0,2,0;45952594,0,2,0;45952795,0,2,0;45952819,0,2,0;45952823,0,2,0;45952872,0,2,0;45991456,0,1,1;45994554,0,2,0;45999439,0,2,0;46009617,0,2,1;46111200,0,2,1;46251949,0,2,1;46541070,0,2,0;46551074,0,1,1;46557400,0,1,0;46604216,0,2,1;46619189,0,2,1;46656382,0,2,1;46715659,0,0,1;46717502,0,2,0;46982417,0,2,0;46984166,0,0,0;47134595,0,1,0;47205155,0,2,1;47270778,0,2,1;47381523,0,2,1;47526873,1,2,1;47681899,0,1,1;47916854,0,1,0;47942561,0,0,1;47973375,0,1,1;47991031,0,2,1;48057519,0,2,0;48082515,0,0,0;48128028,0,2,0;48141486,0,2,0;48433541,0,1,0;48433706,0,1,0;48433719,0,1,0;48468527,0,1,0;48468541,0,1,0;48503047,0,2,1;48797432,1,2,1 > OsInfo[35].Key=containerid OsInfo[36].Key=containertype > OsInfo[37].Key=edu OsInfo[37].Value=0 > OsInfo[38].Key=servicinginprogress OsInfo[38].Value=0 > OsInfo[39].Key=featureupdatependingreboot OsInfo[39].Value=0 > FriendlyEventName=Stopped working ConsentKey=APPCRASH AppName=test.exe > AppPath=C:\Users\akbha\Desktop\test.exe NsPartner=windows > NsGroup=windows8 ApplicationIdentity=5BD169AF9E639B269B164A74EB1E980B > MetadataHash=172243955| > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 -------------- next part -------------- An HTML attachment was scrubbed... URL: From akbhargava at gmail.com Mon Apr 15 11:09:19 2024 From: akbhargava at gmail.com (Alok Bhargava) Date: Mon, 15 Apr 2024 11:09:19 -0400 Subject: [python-win32] Help in deciphering error In-Reply-To: References: Message-ID: It absolutely does Mark - thanks so much! Based on the error details, I am fairly certain I am seeing the same issue (even though I use pyinstaller). So I will either use 3.11 or think of a solution that does not use Windows Service. Thank you for being so responsive - greatly appreciate your contributions to this community! On Mon, Apr 15, 2024 at 11:05?AM Mark Hammond wrote: > The first comment of https://github.com/mhammond/pywin32/issues/2155 has > STR that doesn't involve pyinstaller or custom executables. If you can > reproduce that, then you are probably facing the same problem, so the > solution is probably to use Python 3.11 until more information about the > 3.12 specific problem is known. > > HTH, > > Mark > On 2024-04-14 4:19 p.m., Alok Bhargava wrote: > > Hello, > > I would appreciate any help in diagnosing why this error occurs. > > I have WinPython installed on my Windows 11 Pro machine and not registered > (registering did not change the outcome). > > I installed pyinstaller and generated a single file .exe. > > This is what I have encountered as documented in a Windows Report.wer > file: > > (Many thanks for all your help (please also see here > )) > > > Version=1 > EventType=APPCRASH > EventTime=133575902720464133 > ReportType=2 > Consent=1 > UploadTime=133575902725050996 > ReportStatus=268435456 > ReportIdentifier=823493c6-5512-4b81-86a2-acfde51244ee > IntegratorReportIdentifier=4598584a-fd33-4262-89ae-0e50fc817d5b > Wow64Host=34404 > NsAppName=test.exe > AppSessionGuid=0000179c-0000-0009-95e6-c361938eda01 > TargetAppId=W:00061dd68bdd826965f6c90daa8b7ff486660000ffff!0000ba8b2a53d175b81101916c75210fb20beb28423c!test.exe > TargetAppVer=2024//04//14:17:42:06!7543d8!test.exe > BootId=4294967295 > TargetAsId=583 > IsFatal=1 > EtwNonCollectReason=1 > Response.BucketId=9fa208ac7d6291b25d2a8a0a7614126c > Response.BucketTable=4 > Response.LegacyBucketId=2101643953657090668 > Response.type=4 > Sig[0].Name=Application Name > Sig[0].Value=test.exe > Sig[1].Name=Application Version > Sig[1].Value=0.0.0.0 > Sig[2].Name=Application Timestamp > Sig[2].Value=661c156e > Sig[3].Name=Fault Module Name > Sig[3].Value=python312.dll > Sig[4].Name=Fault Module Version > Sig[4].Value=3.12.2150.1013 > Sig[5].Name=Fault Module Timestamp > Sig[5].Value=65c2a47f > Sig[6].Name=Exception Code > Sig[6].Value=c0000005 > Sig[7].Name=Exception Offset > Sig[7].Value=000000000000cc2f > DynamicSig[1].Name=OS Version > DynamicSig[1].Value=10.0.22631.2.0.0.256.48 > DynamicSig[2].Name=Locale ID > DynamicSig[2].Value=1033 > DynamicSig[22].Name=Additional Information 1 > DynamicSig[22].Value=fa6f > DynamicSig[23].Name=Additional Information 2 > DynamicSig[23].Value=fa6fb7dd40186b4810d26d1ca09a7044 > DynamicSig[24].Name=Additional Information 3 > DynamicSig[24].Value=a877 > DynamicSig[25].Name=Additional Information 4 > DynamicSig[25].Value=a87723ca5a16692a5a5ebf3576a4ef47 > UI[2]=C:\Users\akbha\Desktop\test.exe > UI[5]=Close > UI[8]=test.exe stopped working and was closed > UI[9]=A problem caused the application to stop working correctly. Windows will notify you if a solution is available. > UI[10]=&Close > LoadedModule[0]=C:\Users\akbha\Desktop\test.exe > LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll > LoadedModule[2]=C:\Windows\System32\KERNEL32.DLL > LoadedModule[3]=C:\Windows\System32\KERNELBASE.dll > LoadedModule[4]=C:\Windows\System32\USER32.dll > LoadedModule[5]=C:\Windows\System32\win32u.dll > LoadedModule[6]=C:\Windows\System32\GDI32.dll > LoadedModule[7]=C:\Windows\System32\gdi32full.dll > LoadedModule[8]=C:\Windows\System32\msvcp_win.dll > LoadedModule[9]=C:\Windows\System32\ucrtbase.dll > LoadedModule[10]=C:\Windows\System32\ADVAPI32.dll > LoadedModule[11]=C:\Windows\System32\msvcrt.dll > LoadedModule[12]=C:\Windows\System32\sechost.dll > LoadedModule[13]=C:\Windows\System32\bcrypt.dll > LoadedModule[14]=C:\Windows\System32\RPCRT4.dll > LoadedModule[15]=C:\Windows\system32\_MEI27562\python312.dll > LoadedModule[16]=C:\Windows\System32\WS2_32.dll > LoadedModule[17]=C:\Windows\SYSTEM32\VERSION.dll > LoadedModule[18]=C:\Windows\system32\_MEI27562\VCRUNTIME140.dll > LoadedModule[19]=C:\Windows\System32\bcryptprimitives.dll > LoadedModule[20]=C:\Windows\system32\_MEI27562\pywin32_system32\pywintypes312.dll > LoadedModule[21]=C:\Windows\System32\ole32.dll > LoadedModule[22]=C:\Windows\System32\combase.dll > LoadedModule[23]=C:\Windows\System32\OLEAUT32.dll > LoadedModule[24]=C:\Windows\system32\_MEI27562\VCRUNTIME140_1.dll > LoadedModule[25]=C:\Windows\system32\_MEI27562\win32\win32api.pyd > LoadedModule[26]=C:\Windows\System32\SHELL32.dll > LoadedModule[27]=C:\Windows\SYSTEM32\secur32.dll > LoadedModule[28]=C:\Windows\SYSTEM32\SSPICLI.DLL > LoadedModule[29]=C:\Windows\system32\_MEI27562\win32\win32service.pyd > LoadedModule[30]=C:\Windows\system32\_MEI27562\win32\servicemanager.pyd > State[0].Key=Transport.DoneStage1 > State[0].Value=1 > OsInfo[0].Key=vermaj > OsInfo[0].Value=10 > OsInfo[1].Key=vermin > OsInfo[1].Value=0 > OsInfo[2].Key=verbld > OsInfo[2].Value=22631 > OsInfo[3].Key=ubr > OsInfo[3].Value=3447 > OsInfo[4].Key=versp > OsInfo[4].Value=0 > OsInfo[5].Key=arch > OsInfo[5].Value=9 > OsInfo[6].Key=lcid > OsInfo[6].Value=1033 > OsInfo[7].Key=geoid > OsInfo[7].Value=244 > OsInfo[8].Key=sku > OsInfo[8].Value=48 > OsInfo[9].Key=domain > OsInfo[9].Value=0 > OsInfo[10].Key=prodsuite > OsInfo[10].Value=256 > OsInfo[11].Key=ntprodtype > OsInfo[11].Value=1 > OsInfo[12].Key=platid > OsInfo[12].Value=10 > OsInfo[13].Key=sr > OsInfo[13].Value=0 > OsInfo[14].Key=tmsi > OsInfo[14].Value=222623649 > OsInfo[15].Key=osinsty > OsInfo[15].Value=2 > OsInfo[16].Key=iever > OsInfo[16].Value=11.1.22621.0-11.0.1000 > OsInfo[17].Key=portos > OsInfo[17].Value=0 > OsInfo[18].Key=ram > OsInfo[18].Value=6143 > OsInfo[19].Key=svolsz > OsInfo[19].Value=63 > OsInfo[20].Key=wimbt > OsInfo[20].Value=0 > OsInfo[21].Key=blddt > OsInfo[21].Value=220506 > OsInfo[22].Key=bldtm > OsInfo[22].Value=1250 > OsInfo[23].Key=bldbrch > OsInfo[23].Value=ni_release > OsInfo[24].Key=bldchk > OsInfo[24].Value=0 > OsInfo[25].Key=wpvermaj > OsInfo[25].Value=0 > OsInfo[26].Key=wpvermin > OsInfo[26].Value=0 > OsInfo[27].Key=wpbuildmaj > OsInfo[27].Value=0 > OsInfo[28].Key=wpbuildmin > OsInfo[28].Value=0 > OsInfo[29].Key=osver > OsInfo[29].Value=10.0.22621.3447.amd64fre.ni_release.220506-1250 > OsInfo[30].Key=buildflightid > OsInfo[31].Key=edition > OsInfo[31].Value=Professional > OsInfo[32].Key=ring > OsInfo[32].Value=Retail > OsInfo[33].Key=expid > OsInfo[33].Value=MD:283BAEF,ME:28279A6,ME:2A69053,MD:2E3923D > OsInfo[34].Key=fconid > OsInfo[34].Value=15546617,1,2,0;19193777,0,2,0;19638787,0,2,0;23531064,2,2,0;23562335,2,2,0;23563673,2,2,0;23877894,1,2,0;32862274,0,2,1;35681102,0,1,0;36803287,0,2,1;36803295,0,2,0;36803303,0,2,0;38277973,0,1,1;38859191,0,2,0;39145991,0,2,0;39263329,1,2,0;39281392,0,2,0;40025975,0,1,0;40616880,0,1,0;40883769,0,1,0;40981503,0,1,0;41135193,0,1,1;41137130,0,1,0;41342175,0,1,0;41655236,0,2,0;41772259,0,2,0;41799415,0,2,1;42052423,0,2,0;42105254,0,2,0;42963857,0,2,1;43133808,1,2,1;43169616,0,1,0;43203978,0,2,1;43231896,0,0,0;43572857,0,2,0;43772553,0,1,0;43844371,0,1,0;43978769,0,1,1;43998261,0,2,1;44325080,0,1,0;44470355,0,2,0;44521793,0,1,0;44533041,0,0,1;44552141,0,1,0;44776738,0,2,0;45113694,0,2,1;45185354,0,2,0;45668242,0,2,1;45732051,0,2,0;45786062,0,2,1;45796396,0,2,0;45930103,0,2,0;45949789,0,2,0;45951844,0,2,0;45952583,0,2,0;45952594,0,2,0;45952795,0,2,0;45952819,0,2,0;45952823,0,2,0;45952872,0,2,0;45991456,0,1,1;45994554,0,2,0;45999439,0,2,0;46009617,0,2,1;46111200,0,2,1;46251949,0,2,1;46541070,0,2,0;46551074,0,1,1;46557400,0,1,0;46604216,0,2,1;46619189,0,2,1;46656382,0,2,1;46715659,0,0,1;46717502,0,2,0;46982417,0,2,0;46984166,0,0,0;47134595,0,1,0;47205155,0,2,1;47270778,0,2,1;47381523,0,2,1;47526873,1,2,1;47681899,0,1,1;47916854,0,1,0;47942561,0,0,1;47973375,0,1,1;47991031,0,2,1;48057519,0,2,0;48082515,0,0,0;48128028,0,2,0;48141486,0,2,0;48433541,0,1,0;48433706,0,1,0;48433719,0,1,0;48468527,0,1,0;48468541,0,1,0;48503047,0,2,1;48797432,1,2,1 > OsInfo[35].Key=containerid > OsInfo[36].Key=containertype > OsInfo[37].Key=edu > OsInfo[37].Value=0 > OsInfo[38].Key=servicinginprogress > OsInfo[38].Value=0 > OsInfo[39].Key=featureupdatependingreboot > OsInfo[39].Value=0 > FriendlyEventName=Stopped working > ConsentKey=APPCRASH > AppName=test.exe > AppPath=C:\Users\akbha\Desktop\test.exe > NsPartner=windows > NsGroup=windows8 > ApplicationIdentity=5BD169AF9E639B269B164A74EB1E980B > MetadataHash=172243955 > > > _______________________________________________ > python-win32 mailing listpython-win32 at python.orghttps://mail.python.org/mailman/listinfo/python-win32 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rileycaminiti at gmail.com Tue Apr 16 11:59:37 2024 From: rileycaminiti at gmail.com (Riley Caminiti) Date: Tue, 16 Apr 2024 10:59:37 -0500 Subject: [python-win32] Open VI reference error Message-ID: Hi, I'd like to read a string output by a Labview executable using Python. As a test, I built my own Labview exe, and can successfully read the string output in Python using the following script: import win32com.client LabVIEW = win32com.client.Dispatch("Application.Application") VI = LabVIEW.getvireference(r'C:\temp\ActiveXpractice\My Application\Application.exe\ActiveXpractice.vi') while True: result = VI.getcontrolvalue('String') print(result) The problem is that when I try to do the exact same thing with a different Labview exe that my coworker built, I get the following error at the third "getvireference" line: com_error: (-2147352567, 'Exception occurred.', (6945, 'LabVIEW', 'LabVIEW: (Hex 0x5A5) Open VI Reference no longer matches VIs in memory by filename. A filename is no longer sufficient because the full name of a VI now includes any owning libraries.', None, 0, 0), None) Can someone help me understand why the first exe works and the second does not? I can replicate the error for the first exe by changing the third line to VI = LabVIEW.getvireference('ActiveXpractice.vi') so the problem seems to be path related, but I am using the absolute path to the second exe same as the first. The second exe contains a Labview project with multiple subVIs while the first only holds the single vi, does that affect the formatting of the path to the vi? Thanks, Riley -------------- next part -------------- An HTML attachment was scrubbed... URL: From sven.bardos at googlemail.com Wed Apr 17 02:07:24 2024 From: sven.bardos at googlemail.com (Sven Bardos) Date: Wed, 17 Apr 2024 08:07:24 +0200 Subject: [python-win32] Dispatch vs EnsureDispatch performance Message-ID: Hi, shouldn't be EnsureDispatch be faster than Dispatch once the code generation is done? I've measured it by calling 6000 COM calls like this: dirpath = Path('C:/Users/sbardos/AppData/Local/Temp/gen_py/3.10/') if dirpath.exists() and dirpath.is_dir(): shutil.rmtree(dirpath) app = Dispatch("CT.Application") job = app.CreateJobObject() start = timer() for i in range(2000): cnt, devIds = job.GetAllDeviceIds() cnt, sheetIds = job.GetSheetIds() dev = job.CreateDeviceObject() end = timer() print(f"Time ellapsed (late): {end - start}s") and the ensure Dispatch version: app = EnsureDispatch("CT.Application") job = app.CreateJobObject() start = timer() for i in range(2000): cnt, devIds = job.GetAllDeviceIds(None) cnt, sheetIds = job.GetSheetIds(None) dev = job.CreateDeviceObject() end = timer() print(f"Time ellapsed (early): {end - start}s") EnsureDispatch is a little bit slower ~4.2s compared to ~4.0s. If I don't get a performance boost with EnsureDispatch, is there even a point using it? Thanks, Sven -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeshuagarza271206 at gmail.com Wed Apr 17 02:37:28 2024 From: jeshuagarza271206 at gmail.com (Jeshua Garza) Date: Wed, 17 Apr 2024 00:37:28 -0600 Subject: [python-win32] Tengo un problema con pyinstaller Message-ID: El problema esque tengo que esque cuando le doy a la versi?n de pyinstaller me aparece (no module named pyinstaller) y literalmente tengo todos instalado correctamente nos? que hacer porfa necesito una soluci?n ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeshuagarza271206 at gmail.com Wed Apr 17 02:42:11 2024 From: jeshuagarza271206 at gmail.com (Jeshua Garza) Date: Wed, 17 Apr 2024 00:42:11 -0600 Subject: [python-win32] Fwd: Tengo un problema con pyinstaller In-Reply-To: References: Message-ID: El problema esque tengo que esque cuando le doy a la versi?n de pyinstaller me aparece (no module named pyinstaller) y literalmente tengo todos instalado correctamente nos? que hacer porfa necesito una soluci?n ? mi sistema operativo es Windows 11 y la versi?n de Python es la m?s reciente 3.12.3 tengo que usar el comando Python -m para poder instalar el pyinstaller pero a?n as? me da el error que le hab?a dicho anteriormente, se instala y todo pero para ver la versi?n o usar pyinstaller me aparece lo mencionado anteriormente ---------- Forwarded message --------- De: Jeshua Garza Date: mi?, 17 de abr de 2024 12:37 a. m. Subject: Tengo un problema con pyinstaller To: El problema esque tengo que esque cuando le doy a la versi?n de pyinstaller me aparece (no module named pyinstaller) y literalmente tengo todos instalado correctamente nos? que hacer porfa necesito una soluci?n ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From skippy.hammond at gmail.com Wed Apr 17 11:19:28 2024 From: skippy.hammond at gmail.com (Mark Hammond) Date: Wed, 17 Apr 2024 11:19:28 -0400 Subject: [python-win32] Dispatch vs EnsureDispatch performance In-Reply-To: References: Message-ID: I'm mildly surprised by that - a profiler might show some low-hanging fruit, and/or might show different characteristics when many more functions are used. However, the primary reason for EnsureDispatch is for better support of the object model - there's far more context available and this less chance of upsetting some COM objects - eg, when `foo.bar` is seen, EnsureDispatch knows for sure that `bar` is a method, but dynamic dispatch doesn't know if the resulting object is going to be called or not. HTH, Mark On 2024-04-17 2:07 a.m., Sven Bardos via python-win32 wrote: > Hi, > > shouldn't be EnsureDispatch be faster than Dispatch once the code > generation is done? > > I've measured it by calling 6000 COM calls like this: > > dirpath = Path('C:/Users/sbardos/AppData/Local/Temp/gen_py/3.10/') > if dirpath.exists() and dirpath.is_dir(): > shutil.rmtree(dirpath) > > app = Dispatch("CT.Application") > job = app.CreateJobObject() > > start = timer() > > for i in range(2000): > cnt, devIds = job.GetAllDeviceIds() > cnt, sheetIds = job.GetSheetIds() > dev = job.CreateDeviceObject() > > end = timer() > print(f"Time ellapsed (late): {end - start}s") > and the ensure Dispatch version: > app = EnsureDispatch("CT.Application") > job = app.CreateJobObject() > start = timer() > for i in range(2000): > cnt, devIds = job.GetAllDeviceIds(None) > cnt, sheetIds = job.GetSheetIds(None) > dev = job.CreateDeviceObject() > end = timer() > print(f"Time ellapsed (early): {end - start}s") > EnsureDispatch is a little bit slower ~4.2s compared to ~4.0s. > If I don't get a performance boost with EnsureDispatch, is there even > a point using it? > > Thanks, > Sven > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jake at gaynertechnicalservices.com.au Thu Apr 25 21:29:21 2024 From: jake at gaynertechnicalservices.com.au (Jacob Nolan) Date: Fri, 26 Apr 2024 01:29:21 +0000 Subject: [python-win32] pythonservice.exe registration failed used by another process Message-ID: <0108018f18057507-39c4de94-65c5-447e-82cf-563b20219133-000000@ap-southeast-2.amazonses.com> Hi all, I've been having a reoccurring error across multiple windows installs and python versions (3.9.*-3.11.*) when performing an install of a python windows service. This is the result of calling *python service_config.py install *on 3.9.5 The error is: |*copying host exe 'E:\jacobnolan\installed_programs\programs\python39\lib\site-packages\win32\pythonservice.exe' -> 'E:\*|*|jacobnolan||\installed_programs\programs\python39\pythonservice.exe' Error installing service: The process cannot access the file because it is being used by another process. (32)|* For this system, this is not the first python service I have installed. Additionally I've installed multiple services while other python services have been running. As stated in the error it looks to be the destination pythonservice.exe is being used by another process, so can't be replaced by my installing process. Is there an approach to handle this? * I'm not sure if pythonservice.exe really needs to be replaced each install. I was contemplating looking at the service registration process to determine if this step can be skipped. * Or if I should specify the location of the pythonservice.exe now it is in the correct location to access the appropriate DLL's? e.g? win32serviceutil service use exeName? o https://github.com/mhammond/pywin32/blob/fcab71452cc8aefeb23b897a03753e34298d555f/win32/Lib/win32serviceutil.py#L215 Thank you, Jacob -- || -------------- next part -------------- An HTML attachment was scrubbed... URL: From jacob at blindza.co.za Fri Apr 26 03:53:55 2024 From: jacob at blindza.co.za (Jacob Kruger) Date: Fri, 26 Apr 2024 09:53:55 +0200 Subject: [python-win32] Creating distributable packages/installers from python code for the windows platform Message-ID: <7ed75f2a-9f98-467a-a7cf-b42188f2e932@blindza.co.za> Hi there I am quite comfortable with having used things like pyInstaller, cx_freeze and, most recently, playing around with nuitka, in tems of compiling code into a form of executable for the iwindows platform, but, there seems to be another side issue - let me explain a bit more. Firstly, while I normally focus on web-development, working with flask and/or django, where it's less of an issue since am then distributing my code, etc. to servers myself, a recent bit of development relates to creating a form of windows executable which must run as a windows background service, to carry out a form of network connectivity monitoring, and it then posts data packets to a RESTFul API every now and then, which have already put in place, using flask, which is running on an external/separate server. The issue is just that we need to install the client software on multiple call-centre workstations, all running windows 11, so I wanted to create an installation package/installer to make it easier for technicians to carry out this task. I firstly tried just compiling my code into a single executable file using pyInstaller, and, that worked fine here on my development machine, but, the test guys are telling me that kaspersky is blocking it's execution, so, even though I could tell them where to place it before-hand, and have it then carry out initial configuration tasks using things like subprocess command execution, etc., I looked into trying to sign the compiled executable, but, to obtain something like a software certificate for a once-off, relatively small project would probably be a bit too costly to make it worthwhile. This was done, initially, just using pyInstaller to compile the software since that's the one I have used the most often. But, I thought that, just maybe, if I used something like inno setup to create an installer, it might help work around that initial distribution issue, but, the odd thing is inno setups compression/packaging seems to corrupt my executable - as in, I am suddenly receiving error messages in output when running it after installation, with messages relating to something like incorrect + operator for str and None, which doesn't make sense in terms of the code, etc. - my guess is something to do with a form of character set encoding, or something along the way, in the process. I then tried switching over to cx_freeze for compiling my code, and, no output at all, and, have now just tried nuitka, in case, and, seems to not want to run executable at all, even if haven't packaged it using inno setup. In other words - sorry for long message - just wondering if any of you have ideas about how to handle this type of thing since, sorry, but I have very limited experience in terms of producing compiled packages like this, and, main thing is to try make them more-or-less distributable, even if focusing on a form of internal target market? And, if relevant, the modules am making use of in the primary operation of the software are things like requests, subprocess, dotenv, sqlalchemy, dateutil and pythonping, but anyway - don't think those could necessarily cause issues in this context? Thanks in advance -- Jacob Kruger Skype: BlindZA "...resistance is futile!...acceptance is versatile..." From niki at vintech.bg Fri Apr 26 07:06:30 2024 From: niki at vintech.bg (Nikolay Spahiev) Date: Fri, 26 Apr 2024 14:06:30 +0300 Subject: [python-win32] Creating distributable packages/installers from python code for the windows platform In-Reply-To: <7ed75f2a-9f98-467a-a7cf-b42188f2e932@blindza.co.za> References: <7ed75f2a-9f98-467a-a7cf-b42188f2e932@blindza.co.za> Message-ID: <8a9b2a8c-0fc5-4a55-97e1-6b31383fa591@vintech.bg> On 26.04.24 ?. 10:53 ?., Jacob Kruger wrote: > Hi there > ... > But, I thought that, just maybe, if I used something like inno setup to > create an installer, it might help work around that initial distribution > issue, but, the odd thing is inno setups compression/packaging seems to > corrupt my executable - as in, I am suddenly receiving error messages in > output when running it after installation, with messages relating to > something like incorrect + operator for str and None, which doesn't make > sense in terms of the code, etc. - my guess is something to do with a > form of character set encoding, or something along the way, in the process. > > We (vintech.bg) use innosetup for distributing python software made with py2exe without problems for more than 20 years. I think problem is somewhere else. Usually after disabling the antivirus software everything works as expected. HTH Niki From skippy.hammond at gmail.com Fri Apr 26 09:29:41 2024 From: skippy.hammond at gmail.com (Mark Hammond) Date: Fri, 26 Apr 2024 09:29:41 -0400 Subject: [python-win32] pythonservice.exe registration failed used by another process In-Reply-To: <0108018f18057507-39c4de94-65c5-447e-82cf-563b20219133-000000@ap-southeast-2.amazonses.com> References: <0108018f18057507-39c4de94-65c5-447e-82cf-563b20219133-000000@ap-southeast-2.amazonses.com> Message-ID: <28f36f94-05a3-4b30-9189-ba82acc39458@gmail.com> On 2024-04-25 9:29 p.m., Jacob Nolan via python-win32 wrote: > > Hi all, > > I've been having a reoccurring error across multiple windows installs > and python versions (3.9.*-3.11.*) when performing an install of a > python windows service. > > This is the result of calling *python service_config.py install *on 3.9.5 > > The error is: > > |*copying host exe > 'E:\jacobnolan\installed_programs\programs\python39\lib\site-packages\win32\pythonservice.exe' > -> 'E:\*|*|jacobnolan||\installed_programs\programs\python39\pythonservice.exe' > Error installing service: The process cannot access the file because > it is being used by another process. (32)|* > > For this system, this is not the first python service I have > installed. Additionally I've installed multiple services while other > python services have been running. > > As stated in the error it looks to be the destination > pythonservice.exe is being used by another process, so can't be > replaced by my installing process. > > > Is there an approach to handle this? > > * I'm not sure if pythonservice.exe really needs to be replaced each > install. I was contemplating looking at the service registration > process to determine if this step can be skipped. > The version of win32serviceutil you linked to isn't the latest, but I assume you are talking about the copy made just after it prints `print(f"copying host exe '{maybe}' -> '{correct}'")`? If so, as the comments note, it doesn't really need to be updated each install, but win32serviceutil takes a conservative approach because it's difficult to know whether pywin32 might have been upgraded. The simplest way to avoid that copy is to just remove the "maybe" file, leaving the "correct" file in-place. I'd be fine with a patch that catches an error making the copy, prints a warning but then continues. It might even be better if that script tried to *move* the file - that should mean that upgrades would still attempt to update it, but otherwise the file is only updated once. > * > > > * Or if I should specify the location of the pythonservice.exe now > it is in the correct location to access the appropriate DLL's? > e.g? win32serviceutil service use exeName? > o https://github.com/mhammond/pywin32/blob/fcab71452cc8aefeb23b897a03753e34298d555f/win32/Lib/win32serviceutil.py#L215 > In your other email you mentioned trying to use pyinstaller or similar to package your service - in that world then you almost certainly will want to point it at your own executable, although then you probably just want sys.executable, in which case sys.frozen being set is all you need. HTH, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From jacob at blindza.co.za Fri Apr 26 10:25:28 2024 From: jacob at blindza.co.za (Jacob Kruger) Date: Fri, 26 Apr 2024 16:25:28 +0200 Subject: [python-win32] Creating distributable packages/installers from python code for the windows platform In-Reply-To: <8a9b2a8c-0fc5-4a55-97e1-6b31383fa591@vintech.bg> References: <7ed75f2a-9f98-467a-a7cf-b42188f2e932@blindza.co.za> <8a9b2a8c-0fc5-4a55-97e1-6b31383fa591@vintech.bg> Message-ID: <4256c860-a78f-44d9-b217-9b475dca51ae@blindza.co.za> Could very well be, but, for example, did now manage to get an installer sorted out using null soft NSIS scripting, and, it works fine, so, there's still something going wrong during inno setup's process, since am using the exact same .exe I compiled using pyInstaller. Will try experimenting a bit more with otehr code collections, etc. as well. Jacob Kruger Skype: BlindZA "...resistance is futile!...acceptance is versatile..." On 2024/04/26 13:06, Nikolay Spahiev wrote: > On 26.04.24 ?. 10:53 ?., Jacob Kruger wrote: >> Hi there >> ... >> But, I thought that, just maybe, if I used something like inno setup >> to create an installer, it might help work around that initial >> distribution issue, but, the odd thing is inno setups >> compression/packaging seems to corrupt my executable - as in, I am >> suddenly receiving error messages in output when running it after >> installation, with messages relating to something like incorrect + >> operator for str and None, which doesn't make sense in terms of the >> code, etc. - my guess is something to do with a form of character set >> encoding, or something along the way, in the process. >> >> > > We (vintech.bg) use innosetup for distributing python software made > with py2exe without problems for more than 20 years. I think problem > is somewhere else. Usually after disabling the antivirus software > everything works as expected. > > HTH > Niki