Re: Python-2.5beta1 crash
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 -- http://mail.python.org/mailman/listinfo/python-list
Re: Python-2.5beta1 crash
Terry Reedy wrote: . > 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. good points and a good idea. I'll try and pin down first the test file and then the statement; then try and figure out whether it's worth doing a debug build. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list
Re: Python-2.5beta1 crash
"Robin Becker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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. -- http://mail.python.org/mailman/listinfo/python-list
Python-2.5beta1 crash
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 -- http://mail.python.org/mailman/listinfo/python-list