Closed ToniDS closed 5 years ago
Hi @ToniDS how did you installed python-mode?
Are all submodules updated? And which python version are you using?
I'm using the package manager that comes with vim itself. Downloaded it using ansible. Here's my ansible script, for reference (which includes updating the submodules, unless I've made some sort of mistake...) - I've highlighted pythonmode. I'm using python3. Have let g:pymode_python = 'python3' in my vimrc, no change.
# Installation
- name: Install vim on servers, else gvim
pacman:
name: "{{ vim_pkg | default('gvim') }}"
state: latest
become: yes
# Configuration
- name: Create vimconfig
template:
src: vimrc.j2
dest: ~/.vimrc
backup: yes
- name: Create plugin manager directory
file:
path: "{{ plugin_dir }}"
state: directory
- name: Install indentpython
git:
repo: https://github.com/vim-scripts/indentpython.vim
dest: "{{ plugin_dir }}/indentpython"
register: indentpython
- name: Install python-mode
git:
repo: https://github.com/python-mode/python-mode
dest: "{{ plugin_dir }}/python-mode"
recursive: yes
track_submodules: yes
force: yes
register: python_mode
- name: Install vim-colors-solarized
git:
repo: https://github.com/altercation/vim-colors-solarized
dest: "{{ plugin_dir }}/vim-colors-solarized"
register: solarized_colors
- name: Install syntastic
git:
repo: https://github.com/vim-syntastic/syntastic
dest: "{{ plugin_dir }}/syntastic"
register: syntastic
- name: Install vim-flake8
git:
repo: https://github.com/nvie/vim-flake8
dest: "{{ plugin_dir }}/vim-flakes8"
register: flake8
- name: Install vim-jinjia
git:
repo: https://github.com/lepture/vim-jinja
dest: "{{ plugin_dir }}/vim-jinja"
register: jinja
- name: Install nerdtree
git:
repo: https://github.com/scrooloose/nerdtree
dest: "{{ plugin_dir }}/nerdtree"
register: nerdtree
- name: Install ansible-vim
git:
repo: https://github.com/pearofducks/ansible-vim
dest: "{{ plugin_dir }}/ansible-vim"
register: ansible_vim
- name: Install zenburn
git:
repo: https://github.com/jnurmine/Zenburn
dest: "{{ plugin_dir }}/Zenburn"
register: zenburn_vim
- name: Install vim-latex
git:
repo: https://github.com/vim-latex/vim-latex
dest: "{{ plugin_dir }}/vim-latex"
register: latex_vim
#- name: Install youcompleteme/Omnicomplete
- name: Install live-preview-latex
git:
repo: https://github.com/xuhdev/vim-latex-live-preview
dest: "{{ plugin_dir }}/vim-latex-live-preview"
register: latex_live_vim
Hi @ToniDS that's strange. I'm not a very skilled ansible guy, buyt it looks like ok indeed.
Do you see any other error messages?
I mean, what are the full error messages when you open a py file inside vim?
You can get them by typing :messages
This is the full error message that comes when opening any *.py file.
Messages maintainer: Bram Moolenaar <Bram@vim.org>
"alarm.py" [noeol] 15L, 348C
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
Traceback (most recent call last):
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "<string>", line 1, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/lint.py", line 9, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
from pylama.lint.extensions import LINTERS
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/pylama/lint/extensions.py", line 44, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
from pylama.lint.pylama_pylint import Linter
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/pylama/lint/pylama_pylint.py", line 5, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
from astroid import MANAGER
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/astroid/__init__.py", line 63, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
from astroid.nodes import *
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/astroid/nodes.py", line 23, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
from astroid.node_classes import (
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/astroid/node_classes.py", line 38, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
from astroid import bases
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/astroid/bases.py", line 33, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
MANAGER = manager.AstroidManager()
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/astroid/util.py", line 26, in <lambda>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
lambda: importlib.import_module("." + module_name, "astroid")
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
return _bootstrap._gcd_import(name[level:], package, level)
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/astroid/manager.py", line 24, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
from astroid.interpreter._import import spec
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/astroid/interpreter/_import/spec.py", line 29, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
from . import util
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/astroid/interpreter/_import/util.py", line 4, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
import pkg_resources
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/pkg_resources/__init__.py", line 3092, in <module>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
@_call_aside
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/pkg_resources/__init__.py", line 3078, in _call_aside
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
f(*args, **kwargs)
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/pkg_resources/__init__.py", line 3117, in _initialize_master_working_set
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
add_activation_listener(lambda dist: dist.activate())
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/pkg_resources/__init__.py", line 965, in subscribe
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
callback(dist)
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/pkg_resources/__init__.py", line 3117, in <lambda>
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
add_activation_listener(lambda dist: dist.activate())
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/pkg_resources/__init__.py", line 2636, in activate
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
declare_namespace(pkg)
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/pkg_resources/__init__.py", line 2227, in declare_namespace
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
_handle_ns(packageName, path_item)
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
File "/home/antonia/.vim/pack/plugin/start/python-mode/pymode/libs/pkg_resources/__init__.py", line 2173, in _handle_ns
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
loader = importer.find_module(packageName)
Error detected while processing /home/antonia/.vim/pack/plugin/start/python-mode/autoload/pymode/lint.vim:
line 1:
AttributeError: module 'vim' has no attribute 'find_module'
Oh, this is the same error that's being tracked in #972. We are aware of it happening, but I have had no time to propose a solution yet.
I'll close the issue here, so we can keep the conversation concentrated over there ok?
If you can, please post over there some basic info that you already provided here (such as OS, vim version, python version enabled in vim, python version, etc). I don't think it is necessary to post the traceback itself since it is a known problem. Tks!
Dear everyone, I also now have the error "Errror detected while processing python/mode/pymode/lint.vim. Also, all my python files are shown as no errors or warnings found, despite there being many warnings. I'm using gvim on an Arch install, have the same problem on my server (also arch, but vim). I tried setting linter manually in .vimrc, no change. Any ideas?
This is the debug output:
This is the output of vim --version: ``