psyco 抱怨不支持的操作码 54,它是什么?
Psyco 日志输出如下所示:
21:08:47.56 Logging started, 10/29/09 %%%%%%%%%%%%%%%%%%%%
21:08:47.56 unsupported opcode 54 at create_l0:124 % %
21:08:47.56 unsupported opcode 54 at create_lx:228 % %
行有问题的行
class File:
def __init__(self, path, header):
self.path = path
self.header = header
self.file = path + '/' + header.to_filename()
self.pfile = None
def add_entry(self, entry): # line 124
self.pfile.write(entry.to_binary())
def open(self):
self.pfile = open(self.file, 'wb')
self.pfile.write(self.header.to_binary())
def close(self):
self.pfile.close()
def write(self, data):
self.pfile.write(data)
下一
nat_file = File(target + '/' + name, nat_header)
nat_file.open()
# add first value
nat_file.add_entry(DataBlock(t, q, 0.0, 1, v))
# add all others
while True:
try:
t, v, q = f.next()
except StopIteration:
break
nat_file.add_entry(DataBlock(t, q, 0.0, 1, v))
nat_file.close() # line 228
:我有点不知道问题是什么。有什么想法吗?
The Psyco log output look like this:
21:08:47.56 Logging started, 10/29/09 %%%%%%%%%%%%%%%%%%%%
21:08:47.56 unsupported opcode 54 at create_l0:124 % %
21:08:47.56 unsupported opcode 54 at create_lx:228 % %
the lines in question
class File:
def __init__(self, path, header):
self.path = path
self.header = header
self.file = path + '/' + header.to_filename()
self.pfile = None
def add_entry(self, entry): # line 124
self.pfile.write(entry.to_binary())
def open(self):
self.pfile = open(self.file, 'wb')
self.pfile.write(self.header.to_binary())
def close(self):
self.pfile.close()
def write(self, data):
self.pfile.write(data)
next one:
nat_file = File(target + '/' + name, nat_header)
nat_file.open()
# add first value
nat_file.add_entry(DataBlock(t, q, 0.0, 1, v))
# add all others
while True:
try:
t, v, q = f.next()
except StopIteration:
break
nat_file.add_entry(DataBlock(t, q, 0.0, 1, v))
nat_file.close() # line 228
I'm a bit at loss what the problem may be. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用数字查找操作码的名称实际上非常简单(下面在 Ubuntu 上使用 Python 2.6.2,您可能会得到不同的结果):
当然,找出这到底意味着什么完全是另一个问题。 :-)
Finding the name of the opcode using the number is actually pretty easy (below uses Python 2.6.2 on Ubuntu, you may get different results):
Of course, finding out what exactly this means is another question entirely. :-)
您是否使用另一个 Psyco 版本进行编译而不是运行该脚本?
Did you compile with another Psyco version than you are running the script with?