By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,764 Members | 1,472 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,764 IT Pros & Developers. It's quick & easy.

Python-2.5beta1 crash

P: n/a
I'm testing ReportLab against Python-2.5beta1 and am getting some kind of
problem as below

================================================== =====
C:\Python24\reportlab\test>\python25\python runAll.py
..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)
.....Fatal Python error: non-string found in code slot

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

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.
--
Robin Becker

Jul 10 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Robin Becker wrote:
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.
I would personally run Python in debug mode. Set a break point on
Py_FatalError, and then walk the C stack to see where it comes from.

Of course, the specific error comes from

static void
intern_strings(PyObject *tuple)
{
Py_ssize_t i;

for (i = PyTuple_GET_SIZE(tuple); --i >= 0; ) {
PyObject *v = PyTuple_GET_ITEM(tuple, i);
if (v == NULL || !PyString_CheckExact(v)) {
Py_FatalError("non-string found in code slot");
}
PyString_InternInPlace(&PyTuple_GET_ITEM(tuple, i));
}
}

which in turn is called from PyCode_New, in these calls:

intern_strings(names);
intern_strings(varnames);
intern_strings(freevars);
intern_strings(cellvars);

So it appears you are trying to create a code object, where
a name, varname, freevar name, or cellvar name is not a string.
This is indeed fatal: names in Python are always strings.

Regards,
Martin
Jul 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.