pinard/Pymacs

pymacs fails with AttributeError: 'NoProject' object has no attribute 'address'

Closed this issue · 1 comments

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'

Hi, David. Just stumbling on your report. Sorry for the delay.

I'm not at all familiar with Ropemacs internals. You might have more luck reporting this problem to Rope mailing lists or people. Yes, I know how frustrating it is to be directed elsewhere yet, honestly, the problem you report unlikely pertains to Pymacs. The bug is merely detected and reported by Pymacs. "Don't kill the messenger!" :-)

Of course, if I happen to be wrong, please come back -- I'm surely listening! François