python-rope / ropevim

vim mode that uses rope library to provide features like python refactorings and code-assists
GNU General Public License v2.0
245 stars 34 forks source link

Finding Occurrences --- AttributeError: 'Location' object has no attribute 'line_content' #37

Closed jean closed 8 years ago

jean commented 9 years ago
0. search
1. cancel
2. batchset
3. unsure
4. in_hierarchy
5. resources
Choose what to do: [search] Find Occurrences ...
Find Occurrences ... 6%%
[...]
Find Occurrences ... 100%%
Find Occurrences ... done
Error detected while processing function RopeFindOccurrences:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "build/bdist.linux-i686/egg/ropemode/decorators.py", line 53, in newfunc
  File "build/bdist.linux-i686/egg/ropemode/interface.py", line 257, in find_occurrences
  File "build/bdist.linux-i686/egg/ropemode/interface.py", line 243, in _base_findit
  File "/home/jean/local/lib/python2.7/site-packages/ropevim-0.5.0-py2.7.egg/ropevim.py", line 219, in show_occurrences
    self._quickfixdefs(locations)
  File "/home/jean/local/lib/python2.7/site-packages/ropevim-0.5.0-py2.7.egg/ropevim.py", line 224, in _quickfixdefs
    self._writedefs(locations, filename)
  File "/home/jean/local/lib/python2.7/site-packages/ropevim-0.5.0-py2.7.egg/ropevim.py", line 241, in _writedefs
    location.note, location.line_content)
AttributeError: 'Location' object has no attribute 'line_content'   

gvim 7.4

luxmeter commented 9 years ago

I have the same issue. Does anyone know what's going wrong?

luator commented 8 years ago

Same issue here. Using gVim 7.4 on Ubuntu 12.04, Python 2.7.3.

luator commented 8 years ago

I just solved the problem by simply installing the newest version of ropemode.

thisfred commented 8 years ago

@luator do you mean installing github master of ropemode, or upgrading it through pip? (The latter does not solve this issue for me...)

luator commented 8 years ago

@thisfred I installed github master. The important thing is this commit.

thisfred commented 8 years ago

Thanks, that got it working indeed. Time for a pypi release of ropemode then, or a bugfix release of ropevim that works with the released version...

mcepl commented 8 years ago

This is strange, but somehow ropemode has not been updated when I took over the maintenance of the package. So, there ropemode 0.3 and ropevim 0.6.0 are now on PyPI. Let me know, what's missing now.