You are not logged in.
This used to work until recently
function! Python_Test()
python << EOF
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
import dbus
EOF
endfunction
if has("python")
call Python_Test()
endif
If I do ":source test.vim" in gvim I get the following error
Error detected while processing function Python_Test:
line 5:
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/usr/lib/python2.7/site-packages/dbus/__init__.py", line 77, in <module>
import dbus.types as types
File "/usr/lib/python2.7/site-packages/dbus/types.py", line 6, in <module>
from _dbus_bindings import (
ImportError: /usr/lib/python2.7/site-packages/_dbus_bindings.so: undefined symbol: PyExc_KeyboardInterrupt
If I go to the python2.7 interpreter through my terminal emulator and shell and write
"import dbus", I don't get any errors.
Any ideas?
Offline
Downgrading to vim/gvim version 7.4.944-1 fixes this issue.
Seems that some dual support of python2 and python3 has been added since.
I deleted all the occurences of --enable-python3interp=dynamic from the lates PKGBUILD (version 7.4.1689-1) and this has fixed the issue.
There seem to be some trouble with the python dbus binding when python2 and python3 support coexist.
Last edited by fifafrazer (2016-04-05 14:07:14)
Offline
You could try switching to neovim. Why ? Because neovim is *not* linked with python libraries directly, and Python execution is done differently., via a "regular" python-neovim package.
It may solve you problem.
See here for some caveats regarding performance though.
Offline
Could you provide the link to your bug report on the Arch bug tracker for this issue, please?
Offline
The reason of the problem is that /usr/lib/python2.7/site-packages/_dbus_bindings.so does not have link dependency to the python library.
$ ldd /usr/lib/python2.7/site-packages/_dbus_bindings.so | grep python
# compare it to yaml library:
$ ldd /usr/lib/python2.7/site-packages/_yaml.so | grep python
libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x00007ffa53d88000)
Contact vim maillist and check with developer why dynamic binding does not preload python lib as static binding did before.
Another question is why libraries like the dbus-python are not linked with python. Someone who has more python experience can help to find an answer to this question.
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
Sometimes the upstream decides that they don't link with libpython, e.g. xapian https://trac.xapian.org/ticket/623
Offline
Posted this question to vim_dev maillist https://groups.google.com/forum/#!topic … 4QAM2wgKKI
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
After some thinking I came to conclusion that modules *should* depend on python.so. Upstream should not force "modules with dangled python.so" like what python-dbus and other modules do.
Not linking modules against python.so solves no issues and creates a lot of new problems that are not possible to resolve cleanly.
Last edited by anatolik (2016-04-08 13:56:41)
Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster
Offline
I can confirm that
import dbus
works with neovim
Responsible Coder, Python Fan, Rust enthusiast
Offline