If you are referring to the following plugin:
https://github.com/mjbrownie/pythoncomplete.vim or
https://www.vim.org/scripts/script.php?script_id=1542
you will notice that they haven't been updated since 2014 or 2009 respectively.
Obviously vim has come a long way, and if these plugins are not updated and
depending on which version of vim you are using, these will have problems.
Instead of trying to figure out whats going on, and so that you can keep using
the plugin, I suggest you change your plugins.
The latest autocomplete plugin that is gainin a lot of traction is :
https://github.com/palantir/python-language-server
in conjunction with
https://github.com/autozimu/LanguageClient-neovim.
If you are vim8 or neovim, these will work much better. The LSP plugin is also
used in VSCode
, so its used very widely and shouldn't have too many bugs. On the
other hand pythoncomplete
is not very well used, and is likely to have more
bugs.
If you are on older versions of vim, you can use
https://github.com/davidhalter/jedi-vim
Which should be compatible with all version of vim