我收到错误TypeError:>>的不支持的操作数类型:尝试编译Python文件时为'AGGREGATE'和'int'

问题描述 投票:0回答:1

[尝试在2.7.14中编译Python文件时,出现以下错误:

      File "/home/lhossangren/Documents/Games_Laboratory/Mount and Blade/Native Gold Edition-Test/source/header_items.py", line 188, in get_weight
    a = (y >> ibf_weight_bits) & ibf_armor_mask
TypeError: unsupported operand type(s) for >>: 'AGG

这是错误消息中引用的代码行:(实际上是第187-189行,所以188在中间)

def get_weight(y):
  a = (y >> ibf_weight_bits) & ibf_armor_mask
  return 0.25 * a 

ibf_armor_mask在上面的第150行中定义为:

ibf_armor_mask           = 0x00000000000000000000000ff

并且,ibf_weight_bits在第157行中定义为:

ibf_weight_bits          = 24

为了使这个问题更加令人困惑,在Windows中编译相同文件时,在同一项目上工作的其他人不会收到此错误。只有我知道。我正在使用OpenSUSE 15.1。

python-2.7 opensuse
1个回答
0
投票

得到相同的错误,在Windows 10 64位,anaconda python 2.7.17也64位上工作。 Wounder,如果这是64位问题。

© www.soinside.com 2019 - 2024. All rights reserved.