fsharp / zarchive-vim-fsharp

F# bindings for vim
MIT License
143 stars 34 forks source link

Every time I open a .fs file I receive an error (Mac OsX and Ubuntu) #88

Closed palutz closed 7 years ago

palutz commented 7 years ago

Hi, every time I open a fsharp file (.fs) I receive this error:

Traceback (most recent call last): File "", line 8, in File "/Users/palutz/.vim/bundle/vim-fsharp/ftplugin/fsharpvim.py", line 5, in import tempfile File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py", line 32, in import io as _io File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/io.py", line 51, in 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 Press ENTER or type command to continue

This is my vim on Mac configuration:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 14 2016 16:06:49) Compiled by root@apple.com Normal version without GUI. Features included (+) or not (-): -arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments -conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +persistent_undo +postscript +printer -profile +python/dyn -python3 +quickfix +reltime -rightleft +ruby/dyn +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -D_FORTIFY_SOURCE=0 -Iproto -DHAVE_CONFIG_H -arch i386 -arch x86_64 -g -Os -pipe Linking: gcc -arch i386 -arch x86_64 -o vim -lncurses

I will post then also the config with the Ubuntu workstation

kjnilsson commented 7 years ago

Could you possibly try vim 8? I test very little on 7.x.

On Sun, 25 Jun 2017 at 18:16 Stefano notifications@github.com wrote:

Hi, every time I open a fsharp file (.fs) I receive this error:

Traceback (most recent call last): File "", line 8, in File "/Users/palutz/.vim/bundle/vim-fsharp/ftplugin/fsharpvim.py", line 5, in import tempfile File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py", line 32, in import io as _io File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/io.py", line 51, in 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 Press ENTER or type command to continue

This is my vim on Mac configuration:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 14 2016 16:06:49) Compiled by root@apple.com Normal version without GUI. Features included (+) or not (-): -arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments -conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +float +folding -footer +fork() -gettext -hangul_input +iconv +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra -perl +persistent_undo +postscript +printer -profile +python/dyn -python3 +quickfix +reltime -rightleft +ruby/dyn +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -D_FORTIFY_SOURCE=0 -Iproto -DHAVE_CONFIG_H -arch i386 -arch x86_64 -g -Os -pipe Linking: gcc -arch i386 -arch x86_64 -o vim -lncurses

I will post then also the config with the Ubuntu workstation

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fsharp/vim-fsharp/issues/88, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIDlIp8sMgkb6thTmnkSb1sCvWwHsbaks5sHpYBgaJpZM4OEqfl .

palutz commented 7 years ago

I can confirm you that on Mac updating to 8.0 solve the problem. I will check ASAP on Ubuntu.

palutz commented 7 years ago

Hi, on Ubuntu I still have the problem even if I already have installed vim 8.0 here my Vim version:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 17 2017 12:13:35) Included patches: 1-95 Modified by pkg-vim-maintainers@lists.alioth.debian.org Compiled by pkg-vim-maintainers@lists.alioth.debian.org Huge version with GTK2 GUI. Features included (+) or not (-):

palutz commented 7 years ago

This is the error in Ubuntu:

Error detected while processing /home/palutz/.vim/bundle/vim-fsharp/ftplugin/fsharp.vim: line 74: Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "/usr/lib/python3.5/threading.py", line 862, in run self._target(*self._args, **self._kwargs) File "/home/palutz/.vim/bundle/vim-fsharp/ftplugin/fsharpvim.py", line 121, in work if data[0] != '{': IndexError: string index out of range Traceback (most recent call last): File "", line 25, in File "", line 22, in get_path File "/home/palutz/.vim/bundle/vim-fsharp/ftplugin/fsharpvim.py", line 165, in get_paths return self._getpaths.send("compilerlocation\n") File "/home/palutz/.vim/bundle/vim-fsharp/ftplugin/fsharpvim.py", line 47, in send self._write(command) File "/home/palutz/.vim/bundle/vim-fsharp/ftplugin/fsharpvim.py", line 32, in _write self.proc.stdin.flush() BrokenPipeError: [Errno 32] Broken pipe Press ENTER or type command to continue

kjnilsson commented 7 years ago

looks like fsautocomplete isn't launching. is mono installed and if so which version?

palutz commented 7 years ago

$ mono --version Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1ubuntu1) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen

$ which mono /usr/bin/mono

palutz commented 7 years ago

Ok.. since I was mainly working with DotNet core I didn't update properly mono. Now I did it and no more error.

$ mono --version Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Thu May 25 09:19:18 UTC 2017) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen (concurrent by default)

So we the latest vim and latest mono I have no error opening files. Otherwise I shared the errors before.