Repository navigation
Getting strange errors when saving/exiting INSERT mode #1171
Description
Hi, I'm using MacVim with pymode, and I'm loving the features it provides. However, recently I've been running into some strange problems when exiting insert mode or saving the file. I've attached screenshots of the errors along with the contents of my vimrc file. The first two screenshots show an error that often occurs when I try to save, and it only pops up for a second or two before disappearing. The other two screenshots show two errors that often appear when exiting INSERT mode, or even when copy-pasting text. They do not disappear like the first two.
I have attached some information that may be of use to you below, and if you need any more I'd be happy to give it.
Please help!
Here's a screenshot of my system information:

And this is the output of mvim --version:
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Feb 07 2023 11:35:56)
macOS version - arm64
Included patches: 1-1276
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +find_in_path +mouse_xterm +tcl
+arabic +float +multi_byte +termguicolors
+autocmd +folding +multi_lang +terminal
+autochdir -footer -mzscheme +terminfo
-autoservername +fork() +netbeans_intg +termresponse
+balloon_eval +fullscreen +num64 +textobjects
+balloon_eval_term +gettext +odbeditor +textprop
+browse -hangul_input +packages +timers
++builtin_terms +iconv +path_extra +title
+byte_offset +insert_expand +perl +toolbar
+channel +ipv6 +persistent_undo +transparency
+cindent +job +popupwin +user_commands
+clientserver +jumplist +postscript +vartabs
+clipboard +keymap +printer +vertsplit
+cmdline_compl +lambda +profile +vim9script
+cmdline_hist +langmap -python +viminfo
+cmdline_info +libcall +python3 +virtualedit
+comments +linebreak +quickfix +visual
+conceal +lispindent +reltime +visualextra
+cryptv +listcmds +rightleft +vreplace
+cscope +localmap +ruby +wildignore
+cursorbind +lua +scrollbind +wildmenu
+cursorshape +menu +signs +windows
+dialog_con_gui +mksession +smartindent +writebackup
+diff +modify_fname +sodium -X11
+digraphs +mouse +sound -xfontset
+dnd +mouseshape +spell +xim
-ebcdic +mouse_dec +startuptime -xpm
+emacs_tags -mouse_gpm +statusline -xsmp
+eval -mouse_jsbterm -sun_workshop -xterm_clipboard
+ex_extra +mouse_netterm +syntax -xterm_save
+extra_search +mouse_sgr +tag_binary
-farsi -mouse_sysmouse -tag_old_static
+file_in_path +mouse_urxvt -tag_any_white
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_DARWIN -g -O2 -arch arm64 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -arch arm64 -L/opt/homebrew/lib -o Vim -lm -lncurses /opt/homebrew/lib/libsodium.a -liconv /opt/homebrew/lib/libintl.a -framework AppKit -L/opt/homebrew/opt/lua/lib -llua5.4 -L/System/Library/Perl/5.30/darwin-thread-multi-2level/CORE -lperl -L/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/config-3.11-darwin -lpython3.11 -framework CoreFoundation -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -lruby.3.2 -L/opt/homebrew/Cellar/ruby/3.2.1/lib
My vimrc:
vimrc.txt
An error that often occurs when I try to save which only pops up for a second or two before disappearing:


Two errors that often appear when exiting INSERT mode, or even when copy-pasting text. These do not disappear like the first two.


Activity
Kirito139 commentedon Jun 28, 2023
Not sure where to find which version of pymode I have
Kirito139 commentedon Jun 28, 2023
Found it. Looks like I have version 0.13.0: the latest version.
Kirito139 commentedon Jul 3, 2023
UPDATE: I found some workarounds to the problems, however they do not fixt the problem, they merely avoid it. The
E155: Unkown sign: Pymode'error was being thrown when I did something like this:and changing to this fixes it:
As for the other errors, they seem to be fixed by disabling pymode lint checking on the fly. It took a very long time to find these workarounds, not helped by the fact that none of the code is commented. Regardless, I may have found some workarounds but they're a pain, so please fix this bug!