jaredly / jaredly/vim-debug

Error initializing plugin with Vim 8 from source + pyenv 3.6.4

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
284
Forks
27
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure while loading plugin/vdebug.vim, starting at line 39, then inspect pythonx/start_vdebug.py and the imports in pythonx/vdebug/debugger_interface.py and breakpoint.py. Compare the working :python3 environment with the failing embedded Python and determine what is required for initialization to complete without the traceback and follow-on NameError messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vim
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.