I've checked latest anaconda project using
git clone git://git.fedorahosted.org/git/anaconda.git
And I've tried to scan it using command pyreverse *
What I get is AssertionError
Here's the log
Traceback (most recent call last):
File "/usr/bin/pyreverse", line 4, in <module>
main.Run(sys.argv[1:])
File "/usr/lib/python2.7/site-packages/pylint/pyreverse/main.py", line 126, in __init__
PyreverseCommand(args)
File "/usr/lib/python2.7/site-packages/pylint/pyreverse/main.py", line 98, in __init__
self.run(args)
File "/usr/lib/python2.7/site-packages/pylint/pyreverse/main.py", line 112, in run
diadefs = handler.get_diadefs(project, linker)
File "/usr/lib/python2.7/site-packages/pylint/pyreverse/diadefslib.py", line 228, in get_diadefs
diagrams = DefaultDiadefGenerator(linker, self).visit(project)
File "/usr/lib/python2.7/site-packages/logilab/astng/utils.py", line 103, in visit
self.visit(local_node)
File "/usr/lib/python2.7/site-packages/logilab/astng/utils.py", line 100, in visit
methods[0](node)
File "/usr/lib/python2.7/site-packages/pylint/pyreverse/diadefslib.py", line 161, in visit_module
self.linker.visit(node)
File "/usr/lib/python2.7/site-packages/logilab/astng/utils.py", line 103, in visit
self.visit(local_node)
File "/usr/lib/python2.7/site-packages/logilab/astng/utils.py", line 100, in visit
methods[0](node)
File "/usr/lib/python2.7/site-packages/logilab/astng/inspector.py", line 257, in visit_from
fullname = get_module_part(fullname)
File "/usr/lib/python2.7/site-packages/logilab/common/modutils.py", line 334, in get_module_part
'explicit relative import, but no context_file?'
AssertionError: explicit relative import, but no context_file?
|
Comments
-
2012/04/24 13:05, written by acampeas
-
2012/04/24 13:13, written by vorcak.jan@gmail.com
-
2012/04/24 13:20, written by acampeas
-
2012/04/24 13:25, written by vorcak.jan@gmail.com
-
2012/04/24 13:34, written by acampeas
-
2012/04/24 13:52, written by vorcak.jan@gmail.com
it fails on module .DeviceFormat
...
'explicit relative import (%s), but no context_file?' % dotted_name
AssertionError: explicit relative import (.DeviceFormat), but no context_file?
// This module is located in pyanaconda/storage/formats/__init__.py
-
2012/04/24 14:03, written by acampeas
-
2012/04/24 14:12, written by vorcak.jan@gmail.com
-
2012/04/24 14:19, written by acampeas
-
2012/04/24 13:59, written by sthenault
-
2012/04/24 14:11, written by vorcak.jan@gmail.com
-
2012/04/24 14:47, written by sthenault
-
2012/08/16 07:38, written by malte.vesper
-
2012/08/16 21:13, written by lothiraldan
add commentcan you give the full line and your current working directory ?
I've added log file http://www.logilab.org/file/92364
ok, then what if you invoque pyreverse from an upper directory ?
eg:
?
the same thing happened http://www.logilab.org/file/92368
Interestingly it's not the same thing (crash happens in a different place).
Can you try a last time with the following patch applied to logilab.common ?
So there would be a " .DeviceFormat " module ? or package ?
Can you have a look at the exact nature of this ?
I think it's solved by sthenault's patch because context_file has not been specified
Yes, I've seen it. This is likely the "right fix". I've now lost all hope to understand what's going on ...
Unless you can answer ma question, maybe ... ;-)
the pb is simply that Linker.visit_from call get_module_part without specifying a context_file.
Try:
this one works, thank you, can I ask when I can expect this to be fixed in a repositories?
soon :)
Please add it, would have saved you one unnecessary bug report by me ;). Or are there issues with the patch?
It's already in repository (see http://hg.logilab.org/logilab/astng/rev/27ca2820b32b) but I was not included in previous release (for various reasons).
Will be available in next release.