Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

SystemError: unknown opcode

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


clpy at snakefarm

Feb 12, 2002, 12:29 PM

Post #1 of 2 (316 views)
Permalink
SystemError: unknown opcode

Hi there,

I just got an exception from a script that is regularly run via cron.
The script is supposed to choose a random signature file, which it
does perfectly well. Just every now an then I receive the following
error. I'd be glad if anyone could explain what's happening. It's
Python 2.2, the script is run every 20 seconds.

XXX lineno: 454, opcode: 0
Traceback (most recent call last):
File "/home/cg/bin/sigrotate.py", line 5, in ?
sigs = glob.glob("/home/cg/.sig[0-9]*")
File "/usr/local/python-2.2/lib/python2.2/glob.py", line 37, in glob
sublist = glob1(dirname, basename)
File "/usr/local/python-2.2/lib/python2.2/glob.py", line 50, in
glob1
return fnmatch.filter(names,pattern)
File "/usr/local/python-2.2/lib/python2.2/fnmatch.py", line 47, in
filter
_cache[pat] = re.compile(res)
File "/usr/local/python-2.2/lib/python2.2/sre.py", line 178, in
compile
return _compile(pattern, flags)
File "/usr/local/python-2.2/lib/python2.2/sre.py", line 226, in
_compile
p = sre_compile.compile(pattern, flags)
File "/usr/local/python-2.2/lib/python2.2/sre_compile.py", line 430,
in compile
p = sre_parse.parse(p, flags)
File "/usr/local/python-2.2/lib/python2.2/sre_parse.py", line 623,
in parse
p = _parse_sub(source, pattern, 0)
File "/usr/local/python-2.2/lib/python2.2/sre_parse.py", line 318,
in _parse_sub
if source.match("|"):
File "/usr/local/python-2.2/lib/python2.2/sre_parse.py", line 454,
in _parse
min, max = 0, MAXREPEAT
SystemError: unknown opcode

And this is the script:

[cg[at]cg cg]$ cat bin/sigrotate.py
#! /usr/bin/python -S

import glob, whrandom, os

sigs = glob.glob("/home/cg/.sig[0-9]*")
sig = whrandom.choice(sigs)
open("/home/cg/.sigtemp", "w").write(open(sig, "r").read())
os.rename("/home/cg/.sigtemp", "/home/cg/.signature")


Regards
Carsten.
--
'In iteger arithetric divsion is no the oposite of multiplication.'
-- scenes from comp.lang.python


martin at v

Feb 12, 2002, 5:47 PM

Post #2 of 2 (287 views)
Permalink
SystemError: unknown opcode [In reply to]

Carsten Gaebler <clpy[at]snakefarm.org> writes:

> I just got an exception from a script that is regularly run via cron.
> The script is supposed to choose a random signature file, which it
> does perfectly well. Just every now an then I receive the following
> error. I'd be glad if anyone could explain what's happening.

That's hard to explain; this is not supposed to happen.

One theory is that there is a hardware problem with your computer's
memory (or your hard disk), making it present the byte code
differently in memory than it is on disk. I've also seen file system
drivers stomp on the buffers they read from disk (Linux reiserfs in
particular).

It could be a bug in Python also, but that is unlikely :-)

Regards,
Martin

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.