Issue389

Title Python crashing on compiled module when imported tornado.web
Priority bug Status unread
Superseder Nosy List luis
Assigned To Keywords

Created on 2017-12-01.08:14:51 by luis, last changed by luis.

Files
File name Uploaded Type Edit Remove
import_crash.zip luis, 2017-12-01.08:14:49 application/x-zip-compressed
Messages
msg2295 (view) Author: luis Date: 2017-12-01.08:14:49
Hi there,

I am using Nuitka on Windows to compile a package for my project. Inside that package I have a module that 
imports tornado.web. 

If I build a compiled package, Python crashes in the moment of importing tornado.web. But it doesn't crash if I 
compile an exe with the same package embedded.

And I mean crashes, not an exception. It crashes Python interpreter itself: "Python has stopped working"

I am attaching a very simple example to show how just the import makes it crash.

test.py
testmodule
|
 ----------- __init__.py
|
 ----------- testmodule.py

Where
 * __init__.py is empty
 * testmodule.py contains:
   
   from tornado import web

   print('Hello World')
 * test.py contains:
   from testmodule import testmodule
   
And that's it.

To compile only the package, I'm using:

nuitka --mingw --module testmodule --recurse-directory=testmodule --recurse-not-to=tornado --output-
dir=bin_module

If I go to bin_module and:

python
>>> form testmodule import testmodule -> CRASH


But if I compile test.py with the module embedded:

nuitka --mingw test.py --recurse-to=testmodule --recurse-not-to=tornado --output-dir=bin_exe

And if you run test.exe in bin_exe -> OK!! You have your 'Hello Horld'

I really need to import tornado.web in my compiled package. Any clue what is happening here?

Thank you!

Luis.
History
Date User Action Args
2017-12-01 08:14:51luiscreate