Pycharm 2018.3.7 сломан?
я делаю игру на pygame и использую pycharm 2018.3.7 (так как у меня 32-bit система), когда исполняю код у меня выдаёт такую ошибку:
Traceback (most recent call last):
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\pydev\pydevconsole.py", line 33, in <module>
from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\pydev\_pydev_bundle\pydev_console_utils.py", line 11, in <module>
from _pydevd_bundle import pydevd_thrift
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\pydev\_pydevd_bundle\pydevd_thrift.py", line 17, in <module>
from pydev_console.protocol import DebugValue, GetArrayResponse, ArrayData, ArrayHeaders, ColHeader, RowHeader, \
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\pydev\pydev_console\protocol.py", line 6, in <module>
_console_thrift = _shaded_thriftpy.load(os.path.join(os.path.dirname(os.path.realpath(__file__)), "console.thrift"),
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\third_party\thriftpy\_shaded_thriftpy\parser\__init__.py", line 29, in load
thrift = parse(path, module_name, include_dirs=include_dirs,
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 502, in parse
parser.parse(data)
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\third_party\thriftpy\_shaded_ply\yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\third_party\thriftpy\_shaded_ply\yacc.py", line 1106, in parseopt_notrack
p.callable(pslice)
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 212, in p_struct
val = _fill_in_struct(p[1], p[3])
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 765, in _fill_in_struct
gen_init(cls, thrift_spec, default_spec)
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 103, in gen_init
cls.__init__ = init_func_generator(default_spec)
File "F:\Pycharm\PyCharm Community Edition 2018.3.7\helpers\third_party\thriftpy\_shaded_thriftpy\_compat.py", line 102, in init_func_generator
new_code = types.CodeType(len(varnames),
TypeError: an integer is required (got type bytes)
если что вот код:
import pygame
import random
WIDTH = 360
HEIGHT = 480
FPS = 60
# colors (R, G, B)
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
# the window
pygame.init()
pygame.mixer.init() # the sound
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Game")
clock = pygame.time.Clock()
screen.fill(BLACK)
# Game cycle
running = True
while running:
# controlling fps
clock.tick(FPS)
# processing (events)
for event in pygame.event.get():
# check if close
if event.type == pygame.QUIT:
running = False
# update
# visualisation
pygame.quit()
Источник: Stack Overflow на русском