鱼C论坛

 找回密码
 立即注册
查看: 2664|回复: 12

[已解决]关于pycharm的console!!!救救孩子

[复制链接]
发表于 2020-2-19 17:25:07 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
今天新装的pycharm
写的代码能正常run
但是一道console就报错
  1. Traceback (most recent call last):
  2.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\pydev\pydevconsole.py", line 33, in <module>
  3.     from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface
  4.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\pydev\_pydev_bundle\pydev_console_utils.py", line 11, in <module>
  5.     from _pydevd_bundle import pydevd_thrift
  6.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\pydev\_pydevd_bundle\pydevd_thrift.py", line 17, in <module>
  7.     from pydev_console.protocol import DebugValue, GetArrayResponse, ArrayData, ArrayHeaders, ColHeader, RowHeader, \
  8.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\pydev\pydev_console\protocol.py", line 6, in <module>
  9.     _console_thrift = _shaded_thriftpy.load(os.path.join(os.path.dirname(os.path.realpath(__file__)), "console.thrift"),
  10.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\third_party\thriftpy\_shaded_thriftpy\parser\__init__.py", line 29, in load
  11.     thrift = parse(path, module_name, include_dirs=include_dirs,
  12.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 502, in parse
  13.     parser.parse(data)
  14.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\third_party\thriftpy\_shaded_ply\yacc.py", line 331, in parse
  15.     return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  16.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\third_party\thriftpy\_shaded_ply\yacc.py", line 1106, in parseopt_notrack
  17.     p.callable(pslice)
  18.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 212, in p_struct
  19.     val = _fill_in_struct(p[1], p[3])
  20.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 765, in _fill_in_struct
  21.     gen_init(cls, thrift_spec, default_spec)
  22.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 103, in gen_init
  23.     cls.__init__ = init_func_generator(default_spec)
  24.   File "D:\PyCharm\PyCharm 2019.1.2\helpers\third_party\thriftpy\_shaded_thriftpy\_compat.py", line 102, in init_func_generator
  25.     new_code = types.CodeType(len(varnames),
  26. TypeError: an integer is required (got type bytes)
  27. Process finished with exit code 1
复制代码


找了一下午都没找到答案!!!
我都要疯了
最佳答案
2020-2-19 19:25:15
我就是猛辣 发表于 2020-2-19 19:18
python 和 pychram 和 项目的路劲都没有中文哦

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
Direct install the latest version being compatible with python 3.8
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2020-2-19 17:26:29 | 显示全部楼层
何苦用PyCharm
用IDLE
听小甲鱼的话
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-2-19 17:57:04 | 显示全部楼层
能给一下代码吗?
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-2-19 18:36:24 | 显示全部楼层
qiuyouzhi 发表于 2020-2-19 17:26
何苦用PyCharm
用IDLE
听小甲鱼的话

小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-2-19 18:39:30 | 显示全部楼层
ouyunfu 发表于 2020-2-19 17:57
能给一下代码吗?

我就写了个
print("hello_world")
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-2-19 19:02:37 | 显示全部楼层
我就是猛辣 发表于 2020-2-19 18:39
我就写了个
print("hello_world")

你的文件路径有中文吗?如果有,改成英文再试试
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-2-19 19:18:54 | 显示全部楼层
ouyunfu 发表于 2020-2-19 19:02
你的文件路径有中文吗?如果有,改成英文再试试

python 和 pychram 和 项目的路劲都没有中文哦
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-2-19 19:25:15 | 显示全部楼层    本楼为最佳答案   
我就是猛辣 发表于 2020-2-19 19:18
python 和 pychram 和 项目的路劲都没有中文哦

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
Direct install the latest version being compatible with python 3.8
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-2-19 19:29:22 | 显示全部楼层
ouyunfu 发表于 2020-2-19 19:25
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz
Direct install the  ...

这是干啥
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-2-19 19:32:42 | 显示全部楼层

这是网上提供的解决方案,你安装一下试试
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-2-19 20:31:50 | 显示全部楼层
ouyunfu 发表于 2020-2-19 19:32
这是网上提供的解决方案,你安装一下试试

试了下还是不行。。然后我重装了一下pycharm然后莫名其妙解决了
不过谢谢你这么耐心啊!!!
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-2-19 20:34:50 | 显示全部楼层
我就是猛辣 发表于 2020-2-19 20:31
试了下还是不行。。然后我重装了一下pycharm然后莫名其妙解决了
不过谢谢你这么耐心啊!!!

不客气!
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-8-29 00:07

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表