Python-2.5beta1 crash

Terry Reedy tjreedy at udel.edu
Mon Jul 10 13:53:11 EDT 2006


"Robin Becker" <robin at reportlab.com> wrote in message 
news:44B26892.9090508 at chamonix.reportlab.co.uk...
> I'm testing ReportLab against Python-2.5beta1 and am getting some kind of
> problem as below

No kidding;-).
Based on incomplete knowledge, I will try to make some helpful comments.

> =======================================================
> C:\Python24\reportlab\test>\python25\python runAll.py

In a Windows command window, you run \Python24\reportlab\test\runAll.py 
with python 2.5.

> .C:\Python24\reportlab\test\test_docstrings.py:54: ImportWarning: Not 
> importing
> directory 'C:\python25\reportlab\tools\utils': missing __init__.py
>   module = __import__(mName)
> C:\Python24\reportlab\test\test_docstrings.py:54: ImportWarning: Not 
> importing d
> irectory 'C:\python25\reportlab\tools\pythonpoint\demos': missing 
> __init__.py
>   module = __import__(mName)
> C:\Python24\reportlab\test\test_docstrings.py:54: ImportWarning: Not 
> importing d
> irectory 'C:\python25\reportlab\docs': missing __init__.py
>   module = __import__(mName)
> C:\Python24\reportlab\test\test_docstrings.py:54: ImportWarning: Not 
> importing d
> irectory 'C:\python25\reportlab\demos': missing __init__.py
>   module = __import__(mName)

These ImportWarnings come from a controversial new feature in 2.5 which 
warns when project directories added to sys.path have non-package 
directories with files whose names match the name you are trying to import. 
Or something like that.  Read What's New for details and the last few 
months of PyDev summaries and/or archives (threads with warning in subject 
line) for rationale and controversy.

The new warnings are sometimes useless and sometimes come in blizzards. 
They can be turned off and I believe they will be by default in the pending 
beta2.  I would 'print mName' before the import and 'print module.__file__' 
to see if the import eventually succeeded and if so, from where you expect.

> ....Fatal Python error: non-string found in code slot

Fatel errors are rarely reported here and, as far as I know, undocumented 
except in the C code.  I believe it could come from anywhere during or 
after the import.  The first thing I would do is determine which by the 
suggested print insertion and if the latter, whether test_docstrings 
finished.

> This application has requested the Runtime to terminate it in an unusual 
> way.
> Please contact the application's support team for more information.

I suspect this is from Windows

> =======================================================
>
> First off there may be a bunch of other C extensions involved including 
> PIL, but
> I built them all against this beta. What should I do to refine the error? 
> Do I
> start with trying to establish which of the tests is guilty or build from 
> source
> in debug mode and attempt to find the problem from below.

Your choice, of course, but if the import succeeded, I personally would 
have runAll verbosely print testfile names before running them and then do 
a binary or trinary search to pin down the offending statement.







More information about the Python-list mailing list