[Python-bugs-list] [ python-Bugs-441851 ] SystemError in sre scanner
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 17 Jul 2001 02:02:57 -0700
Bugs item #441851, was opened at 2001-07-16 17:30
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=441851&group_id=5470
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Fredrik Lundh (effbot)
Summary: SystemError in sre scanner
Initial Comment:
File "mbr_id.py", line 91, in set_up_dict
akf = non_an_ripper("", akf).upper()
File "c:\python21\lib\sre.py", line 164, in _sub
return _subn(pattern, template, string, count)[0]
File "c:\python21\lib\sre.py", line 177, in _subn
c = pattern.scanner(string)
SystemError: NULL object passed to PyObject_Init
where:
non_an_ripper = re.compile("[^A-Za-z0-9]").sub
and
akf contains typically a short string like 'A123456(7)'
or 'XG123456-7'
This happens with Python 2.1 running under Windows 95B.
The primary problem is mine (out of memory) : (a) if I
wrap a try/except around my invocation of non_an_ripper
(), the effect is to trigger a MemoryError exception
somewhere else in my code (b) if I give Python enough
memory (e.g. by shutting down Excel, IE5.5, etc), then
there is no exception raised at all, and execution
completes as expected.
However there seems to be a secondary problem: maybe
sre is not checking the return value from some .*alloc
() function.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=441851&group_id=5470