Closed DKuykendall closed 5 years ago
(clojure.core/require 'mock :reload)
Error detected while processing function <SNR>27_Require[13]..fireplace#session_eval[16]..fireplace#quickfix_for[2]..<SNR>27_qfmassage[13]..fireplace#findresource[12]..fireplace#jar_contents:
line 14:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 6, in <module>
import io
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/io.py", line 51, in <module>
import _io
ImportError: dlopen(/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
Referenced from: /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
Expected in: flat namespace
in /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
For what it's worth: I got this error too when running 265fc95 of vim-fireplace on vim version 7.4 (MacOS) installed with homebrew. But upgrading vim to 8.0 fixed it in my case.
re-installing vim via homebrew (and thus python) fixed this for me as well
The full error is now available at g:fireplace_last_python_exception
. I believe this particular issue is fixed.
Sadly I'm still getting this..After evaluating some incorrect code I get:
Vim(python):Traceback (most recent call last):
and
:echo g:fireplace_last_python_exception
results in:
E121: Undefined variable: g:fireplace_last_python_exception
E15: Invalid expression: g:fireplace_last_python_exception
The latest commit of the fireplace plugin locally is: https://github.com/tpope/vim-fireplace/commit/e289d119906796550beedc133419109820b05bda
I'm running vim 8 on Mac OS and I have Python 2.7
Any ideas how to debug?
Can you reproduce the issue if you do :let $FIREPLACE_NO_IF_PYTHON = 1
first?
If I do that, then I can see the actual exception, cool thanks !
Do I have to add this to my .vimrc
?
Okay, so the issue isn't with retrieving the stacktrace as i initially assumed but with finding the entries in the jar files in your classpath. e79ea15d9d3b827542fd139a08ca77d745644438 should fix it.
That variable is a backdoor for debugging, do not add it to your vimrc.
I updated the plugin locally so now I have def51d30284fbd52b8b70cf931bf9927eefe4088 on my local machine, sadly I still get a somewhat similar error as before:
Vim(pythonx):Traceback (most recent call last):
Again executing:
:let $FIREPLACE_NO_IF_PYTHON = 1
solves the problem.
What happens if you do :pythonx import zipfile
?
I get this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 6, in <module>
import io
File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/io.py", line 51, in <module>
import _io
ImportError: dlopen(/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
Referenced from: /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
Expected in: flat namespace
in /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
Your Vim is broken, try reinstalling it. I'll try to make Fireplace robust against this case.
You are right, after reinstalling it works ! Thanks for your help and patience :+1:
Any time I try to evaluate clojure code that is incorrect, instead of a stack trace, I receive "Vim(python): Traceback (most recent call last):". Looking for a solution to this, I found issue #234, where tpope's comment on the weird error truncation led me to change nrepl_fireplace.py, but the weird truncated error is still present