tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

Attempting to go to file on classpath outside of source path throws Python error #306

Closed venantius closed 6 years ago

venantius commented 6 years ago

This is probably all my fault for optimistically upgrading Vim on OS X and hoping everything would be fine.

Sample namespace declaration:

(ns pyro.printer
  (:require [clj-stacktrace.repl :as repl]
            [clojure.repl]
            [clojure.stacktrace :as st]
            [pyro.source :as source]
            [pyro.stacktrace :as stacktrace]
            [pyro.stacktrace.element :as element])
  (:import [clojure.lang RT]))

If I try to gf on clojure.stacktrace (for instance), I get the following error:

Error detected while processing function <SNR>55_Find[3]..fireplace#findfile[7]..firep
lace#findresource[12]..fireplace#jar_contents:
line   14:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/Cellar/python@2/2.7.14_2/Frameworks/Python.framework/Versions/2.7/l
ib/python2.7/zipfile.py", line 6, in <module>
    import io
  File "/usr/local/Cellar/python@2/2.7.14_2/Frameworks/Python.framework/Versions/2.7/l
ib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: dlopen(/usr/local/Cellar/python@2/2.7.14_2/Frameworks/Python.framework/Ve
rsions/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIn
crementalDecoder
  Referenced from: /usr/local/Cellar/python@2/2.7.14_2/Frameworks/Python.framework/Ver
sions/2.7/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /usr/local/Cellar/python@2/2.7.14_2/Frameworks/Python.framework/Versions/2.7/lib/p
ython2.7/lib-dynload/_io.so
Error detected while processing function <SNR>55_Find[3]..fireplace#findfile[7]..firep
lace#findresource:
line   12:
E714: List required

I do not have any issues when attempting to navigate to namespaces on the source path (e.g. pyro.source, etc.). Other REPL-oriented functionality (e.g. doc lookups, etc.) all seem fine. So probably something going on that's classpath related, but I'm not sure what.

tpope commented 6 years ago

Looks like a busted if_pyth to me.

venantius commented 6 years ago

Sounds reasonable enough to me. I ended up nuking both Vim and Python entirely and building Vim from source with system Python.

venantius commented 6 years ago

(which fixed the issue). So you can probably close this.