pinard/Pymacs — Issue #11: pymacs fails with AttributeError: 'NoProject' object has no attribute 'address'
Author: davidthewatson
Created: 2011-12-19 16:51:27+00:00
State: open

I am running Fedora Core 15 with python 2.7.1 and GNU Emacs 23.3.1. I've also tried the same with emacs 24 built from source with same results. I am running rope from:

https://github.com/gabrielelanaro/emacs-for-python

Reproduce as follows:

open emacs with python file
select 3 lines of method
rope/refactor/method
enter .ropeproject as directory
enter dog as method name
confirm

get the following output:

pymacs-report-error: Python: Traceback (most recent call last):
File "/home/watson/.emacs.d/python-libs/Pymacs/pymacs.py", line 250, in loop
value = eval(text)
File "", line 1, in
File "/home/watson/.emacs.d/python-libs/ropemode/decorators.py", line 53, in newfunc
return func(*args, **kwds)
File "/home/watson/.emacs.d/python-libs/ropemode/interface.py", line 52, in do_refactor
refactoring(self, self.env).show(initial_asking=initial_asking)
File "/home/watson/.emacs.d/python-libs/ropemode/refactor.py", line 45, in show
self._perform(changes)
File "/home/watson/.emacs.d/python-libs/ropemode/refactor.py", line 94, in _perform
interrupts=False)
File "/home/watson/.emacs.d/python-libs/ropemode/refactor.py", line 469, in runtask
return RunTask(env, command, name, interrupts)()
File "/home/watson/.emacs.d/python-libs/ropemode/refactor.py", line 489, in __call__
result = self.task(handle)
File "/home/watson/.emacs.d/python-libs/ropemode/refactor.py", line 90, in perform
self.project.do(changes, task_handle=handle)
File "/home/watson/.emacs.d/python-libs/rope/base/project.py", line 72, in do
self.history.do(changes, task_handle=task_handle)
File "/home/watson/.emacs.d/python-libs/rope/base/history.py", line 39, in do
if self._is_change_interesting(changes):
File "/home/watson/.emacs.d/python-libs/rope/base/history.py", line 50, in _is_change_interesting
if not self.project.is_ignored(resource):
File "/home/watson/.emacs.d/python-libs/rope/base/project.py", line 198, in is_ignored
return self.ignored.does_match(resource)
File "/home/watson/.emacs.d/python-libs/rope/base/resources.py", line 199, in does_match
path = os.path.join(resource.project.address,
AttributeError: 'NoProject' object has no attribute 'address'