- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
这个问题类似于this一。我正在尝试调试 pyethapp使用以下配置:
入口点位于 app.py 中。代码在未调试时运行良好,但一旦我启动调试器,就会抛出以下异常:
Failed to import scrypt. This is not a fatal error but does
mean that you cannot create or decrypt privkey jsons that use
scrypt
/usr/local/lib/python2.7/dist-packages/cffi/model.py:526: UserWarning: 'point_conversion_form_t' has no values explicitly defined; next version will refuse to guess which integer type it is meant to be (unsigned/signed, int/long)
% self._get_c_name())
Traceback (most recent call last):
File "/home/user/Utils/pycharm-community-2016.1/helpers/pydev/pydevd.py", line 1530, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/user/Utils/pycharm-community-2016.1/helpers/pydev/pydevd.py", line 937, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "app.py", line 27, in <module>
from console_service import Console
File "/home/user/Utils/pycharm-community-2016.1/helpers/pydev/_pydev_bundle/pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "console_service.py", line 38, in <module>
@inputhook_manager.register('gevent')
AttributeError: 'InputHookManager' object has no attribute 'register'
建议的解决方案here (重新安装ipython)没有解决问题(只在调试时出现;客户端单独运行时有效)。
编辑:
输出中的命令行:
/usr/bin/python2.7 /home/user/Utils/pycharm-community-2016.1/helpers/pydev/pydevd.py --cmd-line --multiproc --qt-support --client 127.0.0.1 --port 59087 --file app.py --profile testnet --data-dir testnetState/ run
warning: Debugger speedups using cython not found. Run '"/usr/bin/python2.7" "/home/user/Utils/pycharm-community-2016.1/helpers/pydev/setup_cython.py" build_ext --inplace' to build.
pydev debugger: process 20493 is connecting
Connected to pydev debugger (build 145.260)
Failed to import scrypt. This is not a fatal error but does
mean that you cannot create or decrypt privkey jsons that use
scrypt
/usr/local/lib/python2.7/dist-packages/cffi/model.py:526: UserWarning: 'point_conversion_form_t' has no values explicitly defined; next version will refuse to guess which integer type it is meant to be (unsigned/signed, int/long)
% self._get_c_name())
Traceback (most recent call last):
File "/home/user/Utils/pycharm-community-2016.1/helpers/pydev/pydevd.py", line 1530, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/user/Utils/pycharm-community-2016.1/helpers/pydev/pydevd.py", line 937, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "app.py", line 27, in <module>
from console_service import Console
File "/home/user/Utils/pycharm-community-2016.1/helpers/pydev/_pydev_bundle/pydev_monkey_qt.py", line 71, in patched_import
return original_import(name, *args, **kwargs)
File "console_service.py", line 38, in <module>
@inputhook_manager.register('gevent')
AttributeError: 'InputHookManager' object has no attribute 'register'
最佳答案
已知如果您使用旧版本的 IPython(其中确实尚未实现 register
方法),就会发生此错误。由于您可能使用 OSX,其中包含默认的 Python 安装,因此您的环境中可能存在一些冲突的 Ipython 副本,常规和调试配置调用了不同版本的 Ipython 副本?
这个问题可能通过将项目移动到您的根包无法干扰的虚拟环境来解决。
关于python - 在pycharm中调试python代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37527761/
我知道可以在类型前添加#noinspection PyPep8Naming,但我想不通如何为单个文件全局设置。 我发现此功能适用于 some other JetBrains IDEs , 但未能在 P
我认为,在 PyCharm 的模块中重构函数名称通常会在项目范围内重构对该函数名称的任何使用。但是,我注意到项目中的笔记本中的功能没有被重构。重构时有没有办法包含笔记本? 我注意到 jupyter n
我需要使用 HTMLTestRunner 生成测试报告,因为该代码(位于文件末尾)是: suite = unittest.TestLoader().loadTestsFromTestCase(Test
Local History 是 Jetbrains IDE 系列(包括 Pycharm)绝对基础/关键的功能。为什么 .ipynb 文件会丢失?这是右键单击/上下文菜单 - 其中缺少 Show His
正如问题所问,如何在整个项目中的pycharm中运行查找/替换单词? 最佳答案 Edit | Find | Replace in Path。 快捷方式:Ctrl + Shift + R 关于pycha
我最近从 Spyder 更改为 PyCharm 作为 Python IDE。在 Spyder 中,我经常使用变量资源管理器功能(见图)。 PyCharm 中也提供此功能吗? 我找到了这个here ,“
嗨,我正在使用 pycharm 进行 python 开发。在 pycharm 中打开我的 python 项目时,它的打开方式如下图所示,其中我的项目名称是election,在此之前出现的选项卡都是父目
在 PyCharm 中,我的项目窗口中有一个文件夹是红色的。当所有其他文件夹都是蓝色时,该颜色意味着什么?我在 Git 中有我的项目,它主要是 Python,在 repo 中有一个 Java GUI。
我在我的 PyCharm 项目/文件栏中看到了这个: 我不确定这意味着什么,也不知道我为什么要这么做。谷歌搜索似乎没有提供任何有用的信息。有谁知道它是什么以及如何删除它?此外,项目中没有其他数字(没有
似乎 Pycharm 中的折叠自定义区域在某些缩进级别后不起作用。 这个不起作用: def test_a(): def function(): for g in group:
每当我创建一个函数、将其设为 View 并将模板映射到其上时,PyCharm 中的自动完成功能都会起作用。如果您输入类似 {{ book. }},其中 book 是一个模型,并且是您的上下文对象之一,
很长一段时间以来,我一直在寻找一种在 PyCharm 中折叠评论的方法。基本上我一直在寻找一种方法来实现与代码块相同的 + 注释。 最佳答案 用很容易做到这一点 #region Description
我正在使用 PyCharm 社区版 2016,我注意到我无法打开大数据输入文件或日志 (20MB)。编辑器只是说“文件 XXX 太大 (SIZE)”。 不仅如此,似乎也没有办法改变极限。官方文档提到了
在 PyCharm 中,我的项目窗口中有一个文件夹是红色的。当所有其他文件夹都是蓝色时,该颜色意味着什么?我在 Git 中有我的项目,它主要是 Python,在 repo 中有一个 Java GUI。
我想为 Pycharm 中的每个项目使用单独的虚拟环境。为此,我为每个项目创建了一个虚拟环境。我找不到清晰的文档 如果我想通过 PIP 命令添加或删除内容时需要为每个项目激活/停用这些虚拟环境,或者在
PyCharm 中是否有智能区分大小写搜索? 过去,我使用了一个编辑器,如果我使用小写字母,它会进行不区分大小写的搜索。 一旦我使用了第一个大写字符,搜索就区分大小写。 我喜欢这个。 我可以在 PyC
我已经按照 https://www.jetbrains.com/help/pycharm/requirements-installation-and-launching.html#linux 上的说明
有什么问题? 我在 PyCharm(版本 2016.1.4)中使用远程解释器(不是调试服务器!)进行远程调试,如下所述:jetbrains website . 当我在 Debug模式下运行时,程序会在
tldr;我希望我可以进入一个特定的程序状态,然后停止,然后继续编辑同一个文件,并使用这个过程迭代地向文件添加代码。 详情: 我经常想做的是使用python控制台或者在特定的程序状态下运行一段特定的代
有没有办法选择 PyCharm 中当前选定行下方的所有行(类似于在 Mac 中您可以使用 Cmd + Shift + down 选择行)? Cmd + Shift + right/left 工作正常,
我是一名优秀的程序员,十分优秀!