Hi Yaroslav,

Il 27/07/2012 19:58, Yaroslav Halchenko ha scritto:
> our documentation (www.pymvpa.org) started to break with absolutely 
> non-informative to us
> 
>   Traceback (most recent call last):
>     File "/usr/lib/pymodules/python2.7/sphinx/ext/autodoc.py", line 326, in 
> import_object
>       obj = self.get_attr(obj, part)
>     File "/usr/lib/pymodules/python2.7/sphinx/ext/autodoc.py", line 232, in 
> get_attr
>       return safe_getattr(obj, name, 
> *defargs)                                      
>     File "/usr/lib/pymodules/python2.7/sphinx/util/inspect.py", line 70, in 
> safe_getattr
>       raise AttributeError(name)
>   AttributeError: cmdline
> 
> since we had no cmdline in the code.  inspection of the backtrace at the 
> moment showed that it was due to:
> 
> $> python -c "import psutil; print psutil.Process.__dict__['cmdline']; 
> print psutil.Process.cmdline" 
> <psutil._common.cached_property object at 0x7fa51fa37210>
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/usr/lib/pymodules/python2.7/psutil/_common.py", line 75, in __get__
>     res = instance.__dict__[self.func.__name__] = self.func(instance)
>   File "/usr/lib/pymodules/python2.7/psutil/__init__.py", line 242, in 
> cmdline
>     return self._platform_impl.get_process_cmdline()
> AttributeError: 'NoneType' object has no attribute '_platform_impl'
> 
> so the questions are
> 
> - shouldn't may be autodoc not even getattr any properties (who knows what 
> evil that would do... and imho it might be legit for a property to through 
> an exception)?
> - or shouldn't it at least handle the exceptions gracefully?
> 

the issue seems, is some way, to be related to [1].
I'm pretty sure that a patch has been posted somewhere but unfortunately
I'm not able to find it anymore.


[1] https://bitbucket.org/birkenfeld/sphinx/issue/904


best regards

-- 
Antonio Valentino

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to