Skip to content

PymodeLint fails on second run. #329

Closed

Description

@lodagro

Just pulled the new release (on develop branch). Using vim 7.4 (including patches 1-5), python 2.7.

After tackling python-mode backward-incompatibilities ( ok you are the maintainer :-) ) vim starts fine.

First time calling PymodeLint works fine too, second time not (no changes were done to the file, or any of the settings). Vim complains about undefined variables.

output of vim :messages

Error detected while processing function pymode#lint#check:
line   21:
E121: Undefined variable: b:pymode_signs
E15: Invalid expression: b:pymode_signs
line   26:
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
E121: Undefined variable: b:pymode_signs
E116: Invalid arguments for function add
line   32:
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
E121: Undefined variable: b:pymode_errors
Error detected while processing function pymode#lint#check..pymode#lint#show_errormessage:
line    1:
E121: Undefined variable: b:pymode_errors
E116: Invalid arguments for function empty(b:pymode_errors)
E15: Invalid expression: empty(b:pymode_errors)
line   10:
E121: Undefined variable: b:pymode_errors
E116: Invalid arguments for function has_key(b:pymode_errors, l)
E15: Invalid expression: has_key(b:pymode_errors, l)

output off :call pymode#troubleshooting#test()

Pymode diagnostic                                                               
===================                                                             
VIM:704, OS: Linux, multi_byte:1, pymode: 0.7.1b, python: python                


VIM python paths:                                                               
-----------------                                                               
<skipped>                                        

Pymode variables:                                                               
-------------------                                                             
let pymode = 1                                                                  
let pymode_breakpoint = 1                                                       
let pymode_breakpoint_bind = '<leader>b'                                        
let pymode_doc = 1                                                              
let pymode_doc_bind = '<leader>k'                                               
let pymode_folding = 1                                                          
let pymode_indent = 1                                                           
let pymode_lint = 1                                                             
let pymode_lint_checkers = ['pyflakes', 'pep8', 'pep257', 'mccabe']             
let pymode_lint_cwindow = 1                                                     
let pymode_lint_ignore = 'C0110'                                                
let pymode_lint_message = 1                                                     
let pymode_lint_on_fly = 0                                                      
let pymode_lint_on_write = 0                                                    
let pymode_lint_select = ''                                                     
let pymode_lint_signs = 1                                                       
let pymode_motion = 1                                                           
let pymode_options = 1                                                          
let pymode_paths = []                                                           
let pymode_quickfix_maxheight = 6                                               
let pymode_quickfix_minheight = 3                                               
let pymode_rope = 1                                                             
let pymode_run = 1                                                              
let pymode_run_bind = '<leader>run'                                             
let pymode_trim_whitespaces = 1                                                 
let pymode_virtualenv = 1                                                       
let pymode_virtualenv_enabled = 'confidential'
let pymode_virtualenv_path = 'confidential'

Activity

  1. klen commented on Dec 2, 2013

    @klen
    Collaborator

    Please try version from develop.

  2. lodagro commented on Dec 2, 2013

    @lodagro
    ContributorAuthor

    That is the version i`m using.

  3. klen commented on Dec 2, 2013

    @klen
    Collaborator

    I just updated the repository 20 minutes ago and there not no occurrences of the word 'pymode_errors'

  4. lodagro commented on Dec 2, 2013

    @lodagro
    ContributorAuthor

    Ok, i pulled in latest changes to develop and no longer get the vim-messages. However the sing placement is incorrect now, they are added to the left most split when using multiple splits. After running PyModeLint, the cursor also jumps to the leftmost split.

  5. klen commented on Dec 2, 2013

    @klen
    Collaborator

    I pushed some updates. Try to current develop version.

  6. lodagro commented on Dec 2, 2013

    @lodagro
    ContributorAuthor

    Signs are ok again. Cursor still jumps to left most split.

  7. klen commented on Dec 2, 2013

    @klen
    Collaborator

    What do you mean "Cursor jumps"? I open several files in vertical and horizontal splits and try to run code checking with different ways. Cursor stays in the current window.

    I added debug.vim to repository, could you load vim with only pymode like vim -u <path_to_pymode>/debug.vim and check for the problem still exists. Because I cannot repeat.

  8. lodagro commented on Dec 2, 2013

    @lodagro
    ContributorAuthor

    Using debug.vim i can not reproduce either.

    Without the debug.vim way of startup, i have the issue in conjunction with the vim-plugin majutsushi/tagbar. The left most split is a special kind of window that is used by the tagbar plugin to display the tags in the current buffer. Before the python-mode upgrade i never saw the issue of the cursor moving from the buffer used to run python-mode linting to jump to the tagbar split, when linting completed.

  9. klen commented on Dec 2, 2013

    @klen
    Collaborator

    I also use tagbar.vim. I update tagbar to last version and move them to left side, open several python files in vertical splits and also make code checking, but cursor stay on the place.

    I maked small fix in current develop branch just now, maybe it can help.

  10. reopened this on Dec 2, 2013
  11. lodagro commented on Dec 2, 2013

    @lodagro
    ContributorAuthor

    Upgraded both tagbar and python-mode. Cursor still jumps. It appears to jump only when there is a linting violation and if it is not the first time linting results in an error.

    fyi, below are the tagbar settings i have in my .vimrc

    " tagbar                                                                        
    " https://github.com/majutsushi/tagbar                                          
    nmap <F8> :TagbarToggle<CR>                                                     
    let g:tagbar_left = 1        
    
  12. klen commented on Dec 2, 2013

    @klen
    Collaborator

    I still cannot repeat, but maybe current updates helps.

  13. lodagro commented on Dec 2, 2013

    @lodagro
    ContributorAuthor

    Unfortunately not.

  14. klen commented on Dec 2, 2013

    @klen
    Collaborator

    Should be fixed in current develop branch.

  15. lodagro commented on Dec 3, 2013

    @lodagro
    ContributorAuthor

    👍

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions