1. Steve Losh
  2. gundo.vim
  3. Issues
Issue #38 new

Python errors (NoneType not iterable) with apt'd vim on ubuntu 12.04

Randy Stauner
created an issue

I wasn't able to find an existing issue for this so I apologze if this is a duplicate.

I was using gundo successfully on xubuntu 11.10 but now using the apt version of vim on a fresh xubuntu 12.04 GundoToggle spews out these errors:

{{{ Error detected while processing function gundo#GundoToggle..<SNR>52_GundoToggle..<SNR>52_GundoOpen..<SNR>52_GundoRenderGraph: line 4: Traceback (most recent call last): File "<string>", line 1, in <module> File "/data/raptor/run_control/.vim/bundle/gundo.vim/autoload/gundo.py", line 408, in GundoRenderGraph nodes, nmap = make_nodes() File "/data/raptor/run_control/.vim/bundle/gundo.vim/autoload/gundo.py", line 316, in make_nodes _make_nodes(entries, nodes, root)

File "/data/raptor/run_control/.vim/bundle/gundo.vim/autoload/gundo.py", line 307, in _make_nodes _make_nodes(alt['alt'], nodes, p) ...

File "/data/raptor/run_control/.vim/bundle/gundo.vim/autoload/gundo.py", line 303, in _make_nodes curhead = 'curhead' in alt TypeError: argument of type 'NoneType' is not iterable

}}}

I replaced the duplicate errors about line 307 with an ellipsis for brevity (~90 lines of text).

Anyone have any clues about what I can do to fix this? Is this a python version issue or a missing lib? Any other information I can provide?

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 4 2012 04:21:49) +python -python3 :python print sys.version_info sys.version_info(major=2, minor=7, micro=3, releaselevel='final', serial=0)

Thanks!

Comments (3)

  1. Randy Stauner reporter

    Sorry, that was premature.

    The plugin does work on another file, so apparently there's a problem with my undotree on this file... something is None that the plugin doesn't expect?

    Know of anything i can dump to look at or submit to help diagnose the issue?

  2. Randy Stauner reporter

    This patch stops the errors and gives me the gundo browser again... I have no idea what is (or should be) in these structures... I don't know if the list is just too long (vim refused to "echo undotree()" because the struture was too deep)...

    but if this makes sense to you please incorporate it as you see fit.

    If there's something else you think I should try, or more info I can provide, please let me know!

    diff --git a/autoload/gundo.py b/autoload/gundo.py
    index 21d66f0..3821cee 100644
    --- a/autoload/gundo.py
    +++ b/autoload/gundo.py
    @@ -300,6 +300,7 @@ def _make_nodes(alts, nodes, parent=None):
         p = parent
     
         for alt in alts:
    +      if alt:
             curhead = 'curhead' in alt
             node = Node(n=alt['seq'], parent=p, time=alt['time'], curhead=curhead)
             nodes.append(node)
    
  3. Dane Summers

    I've made several fixes for this plugin, including:

    I'm in the process of trying to get a pull request accepted...but its been about a week w/o any response from the author - if you want to try out the plugin with your change request you can do so on my branch.

  4. Log in to comment