Quantcast

strange behaviour: bug (regression?) in analyze()?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

strange behaviour: bug (regression?) in analyze()?

Niemann, Hartmut

Hello!

 

My source files are

 

            hello.py and identical hello1.py

 

                        import hello.do

 

                        hello.do.doit()

 

            hello\__init__.py (empty)

 

            hello\do.py

 

                        def doit():

                                    print 'hello world'

 

 

I run pyinstaller on hello1.py and the resulting program works as expected, it prints “hello world”

I run pyinstaller on hello.py and the resulting program does nothing and has return code 0.

 

Is the hello.py shadowed by the hello module/subdirectory?

           

Version is pyinstaller 3.2.1 on python 2.7.13 on Windows 7.

IIRC it used to work with pyinstaller 3.0

 

--- full log:

D:\temp\pyinstallertests>c:\devtools\Python\27-32\Scripts\pyinstaller.exe -F hello.py --clean

1559 INFO: PyInstaller: 3.2.1

1575 INFO: Python: 2.7.13

1575 INFO: Platform: Windows-7-6.1.7601-SP1

1575 INFO: wrote D:\temp\pyinstallertests\hello.spec

1575 INFO: UPX is not available.

1591 INFO: Removing temporary files and cleaning cache in C:\Users\e09nemh0\AppData\Roaming\pyinstaller

1621 INFO: Extending PYTHONPATH with paths

['D:\\temp\\pyinstallertests', 'D:\\temp\\pyinstallertests']

1621 INFO: checking Analysis

1621 INFO: Building Analysis because out00-Analysis.toc is non existent

1621 INFO: Initializing module dependency graph...

1638 INFO: Initializing module graph hooks...

1918 INFO: running Analysis out00-Analysis.toc

1950 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable

  required by c:\devtools\python\27-32\python.exe

2526 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_60a5df56e60dc5df.manifest

2526 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_8550c6b5d18a9128.manifest

2542 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_f47e1bd6f6571810.manifest

2542 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_f47ed0f6f6564d90.manifest

2558 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_f48176b4f6540019.manifest

2558 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_f480bfaef65491a5.manifest

3151 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_none ...

3151 INFO: Found manifest C:\WINDOWS\WinSxS\Manifests\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57.manifest

3151 INFO: Searching for file msvcr90.dll

3167 INFO: Found file C:\WINDOWS\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll

3167 INFO: Searching for file msvcp90.dll

3167 INFO: Found file C:\WINDOWS\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll

3167 INFO: Searching for file msvcm90.dll

3167 INFO: Found file C:\WINDOWS\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcm90.dll

3681 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_60a5df56e60dc5df.manifest

3681 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_8550c6b5d18a9128.manifest

3681 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_f47e1bd6f6571810.manifest

3681 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_f47ed0f6f6564d90.manifest

3681 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_f48176b4f6540019.manifest

3697 INFO: Found C:\WINDOWS\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_f480bfaef65491a5.manifest

3697 INFO: Adding redirect Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 6161)

4009 INFO: Caching module hooks...

4025 INFO: Analyzing D:\temp\pyinstallertests\hello.py

4134 INFO: Loading module hooks...

4134 INFO: Loading module hook "hook-encodings.py"...

9453 INFO: Looking for ctypes DLLs

9453 INFO: Analyzing run-time hooks ...

9469 INFO: Looking for dynamic libraries

9733 INFO: Looking for eggs

9733 INFO: Using Python library c:\devtools\python\27-32\python27.dll

9733 INFO: Found binding redirects:

[BindingRedirect(name=u'Microsoft.VC90.CRT', language=None, arch=u'x86', oldVersion=(9, 0, 21022, 8), newVersion=(9, 0, 30729, 6161), publicKeyToken=u'1fc8b3b9a

1e18e3b')]

9750 INFO: Warnings written to D:\temp\pyinstallertests\build\hello\warnhello.txt

9858 INFO: checking PYZ

9858 INFO: Building PYZ because out00-PYZ.toc is non existent

9858 INFO: Building PYZ (ZlibArchive) D:\temp\pyinstallertests\build\hello\out00-PYZ.pyz

10546 INFO: Building PYZ (ZlibArchive) D:\temp\pyinstallertests\build\hello\out00-PYZ.pyz completed successfully.

10654 INFO: checking PKG

10654 INFO: Building PKG because out00-PKG.toc is non existent

10654 INFO: Building PKG (CArchive) out00-PKG.pkg

10842 INFO: Redirecting Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 6161)

10842 INFO: Updating manifest in C:\Users\e09nemh0\AppData\Roaming\pyinstaller\bincache00_py27_32bit\python27.dll

10842 INFO: Updating resource type 24 name 2 language 1033

11013 INFO: Redirecting Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 6161)

12931 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.

12931 INFO: Bootloader c:\devtools\python\27-32\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run.exe

12931 INFO: checking EXE

12931 INFO: Building EXE because out00-EXE.toc is non existent

12947 INFO: Building EXE from out00-EXE.toc

12947 INFO: Appending archive to EXE D:\temp\pyinstallertests\dist\hello.exe

13026 INFO: Building EXE from out00-EXE.toc completed successfully.

 

D:\temp\pyinstallertests>dist\hello.exe

 

D:\temp\pyinstallertests>hello.py

hello world

 

D:\temp\pyinstallertests>

 

--- end

Mit freundlichen Grüßen
Dr. Hartmut Niemann

Siemens AG
MO MLT LM EN CCI 1
Werner-von-Siemens-Str. 67
91052 Erlangen, Deutschland
Mobil: +49 173 5342327
[hidden email]
www.siemens.com/ingenuityforlife
www.siemens.com/ingenuityforlife
Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Gerhard Cromme; Vorstand: Joe Kaeser, Vorsitzender; Roland Busch, Lisa Davis, Klaus Helmrich, Janina Kugel, Siegfried Russwurm, Ralf P. Thomas; Sitz der Gesellschaft: Berlin und München, Deutschland; Registergericht: Berlin Charlottenburg, HRB 12300, München, HRB 6684; WEEE-Reg.-Nr. DE 23691322

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: strange behaviour: bug (regression?) in analyze()?

Hartmut Goebel
Am 09.02.2017 um 12:33 schrieb Niemann, Hartmut:

            hello.py and identical hello1.py 

            hello\__init__.py (empty)


You have both a package and a module/script called `hello`. This is not allowed in python.

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: http://www.goebel-consult.de/blog/35.000-gegen-vorratdatenspeicherung
Kolumne: http://www.cissp-gefluester.de/2010-08-scheingefechte-um-rim

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AW: [PyInstaller] strange behaviour: bug (regression?) in analyze()?

Niemann, Hartmut

Hallo Hartmut!

 

But it works well when starting hello.py on the command line and does not in pyinstaller.

 

Would it be possible for pyinstaller to detect this and fail with an error message?

Both (hello.py and hello\do.py) are listed in build\hello\out00-Analysis.toc, so at least it would have a chance.

 

My problem is not that I have to change file layout, but my problem was to find the reason why hello.exe didn’t do anything at all.

 

Mit freundlichen Grüßen
Dr. Hartmut Niemann

Siemens AG
MO MLT LM EN CCI 1
Werner-von-Siemens-Str. 67
91052 Erlangen, Deutschland
Mobil: +49 173 5342327
[hidden email]
www.siemens.com/ingenuityforlife

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Hartmut Goebel
Gesendet: Donnerstag, 9. Februar 2017 23:09
An: [hidden email]
Betreff: Re: [PyInstaller] strange behaviour: bug (regression?) in analyze()?

 

Am 09.02.2017 um 12:33 schrieb Niemann, Hartmut:

            hello.py and identical hello1.py 

            hello\__init__.py (empty)


You have both a package and a module/script called `hello`. This is not allowed in python.

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: http://www.goebel-consult.de/blog/35.000-gegen-vorratdatenspeicherung
Kolumne: http://www.cissp-gefluester.de/2010-08-scheingefechte-um-rim

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: strange behaviour: bug (regression?) in analyze()?

Hartmut Goebel
Am 10.02.2017 um 11:17 schrieb Niemann, Hartmut:

Would it be possible for pyinstaller to detect this and fail with an error message?


I'm afraid, this is not possible. PyInstaller is using Python's build in mechanisms to find the modules and uses whatever these deliver.

Nevertheless it would be interesting why behaviour differs. Would you please file an issue at github for this, so we can investigate it somewhen? Thanks.

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: http://www.goebel-consult.de/blog/chatsecure-ist-tot-lang-lebe-chatsecure
Kolumne: http://www.cissp-gefluester.de/2012-09-steht-ein-manta-fahrer-vor-der-uni

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Loading...