jaredly / jaredly/vim-debug

Error initializing plugin with Vim 8 from source + pyenv 3.6.4

未关闭
#36 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
284
派生
27
PR 合并指标
30 天内没有已合并 PR

描述

Having just re-installed Vim from source in OS X:

Vim version: 8.0.1848
OS X version: 10.13.4
Python version: 3.6.4 (via pyenv)
Vim package management: Vim >= 8 internal

Other plugins are loading fine. When I try to load the vdebug plugin, either by placing in a `~/.vim/pack/*/start` folder or via `:packadd vdebug`, I get the following error:

```
Error detected while processing /Users/leons/.vim/pack/plugins/opt/vdebug/plugin/vdebug.vim:
line 39:
Traceback (most recent call last):
File "", line 1, in
File "/Users/leons/.vim/pack/plugins/opt/vdebug/pythonx/start_vdebug.py", line 8, in
import vdebug.debugger_interface
File "/Users/leons/.vim/pack/plugins/opt/vdebug/pythonx/vdebug/debugger_interface.py", line 3, in
from . import breakpoint
File "/Users/leons/.vim/pack/plugins/opt/vdebug/pythonx/vdebug/breakpoint.py", line 1, in
import base64
File "/Users/leons/.pyenv/versions/3.6.4/lib/python3.6/base64.py", line 10, in
import struct
File "/Users/leons/.pyenv/versions/3.6.4/lib/python3.6/struct.py", line 13, in
from _struct import *
ImportError: dlopen(/Users/leons/.pyenv/versions/3.6.4/lib/python3.6/lib-dynload/_struct.cpython-36m-darwin.so, 2): Symbol not found: _PyByteArray_Type
Referenced from: /Users/leons/.pyenv/versions/3.6.4/lib/python3.6/lib-dynload/_struct.cpython-36m-darwin.so
Expected in: flat namespace
in /Users/leons/.pyenv/versions/3.6.4/lib/python3.6/lib-dynload/_struct.cpython-36m-darwin.so
line 114:
Traceback (most recent call last):
File "", line 1, in
NameError: name 'vdebug' is not defined
Error detected while processing function Vdebug_load_options:
line 8:
Traceback (most recent call last):
File "", line 1, in
NameError: name 'debugger' is not defined
Error detected while processing function Vdebug_load_keymaps:
line 22:
Traceback (most recent call last):
File "", line 1, in
NameError: name 'debugger' is not defined
Press ENTER or type command to continue
```

Of note, `:python3` commands work fine in Vim, though `:python` commands do not. Does vdebug require both to be working?

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从第 39 行开始,重现加载 plugin/vdebug.vim 时的失败,然后检查 pythonx/start_vdebug.py 以及 pythonx/vdebug/debugger_interface.py 和 breakpoint.py 中的导入。比较正常工作的 :python3 环境与失败的嵌入式 Python,并确定需要什么才能使初始化在没有 traceback 和后续 NameError 消息的情况下完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python, vim
领域
devtools
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。