Hi all,

On http://trac.sagemath.org/sage_trac/ticket/7477 we ran into the following 
problem. The code in sage/matroids/all.py looks like this:

from sage.misc.lazy_import import lazy_import
# from constructor import Matroid
# import matroids_catalog as matroids
lazy_import('sage.matroids.constructor', 'Matroid')
lazy_import('sage.matroids', 'matroids_catalog', 'matroids')

When we build the documentation, some files build successfully, others 
don't. The ones that fail, generate errors like the following:

[reference] 
/Users/stefan/sage-5.10.beta4/devel/sage/doc/en/reference/matroids/sage/matroids/basis_exchange_matroid.rst:11:
 
WARNING: autodoc can't import/find module 
'sage.matroids.basis_exchange_matroid', it reported error: "'module' object 
has no attribute 'BasisExchangeMatroid'", please check your spelling and 
sys.path
[reference] 
/Users/stefan/sage-5.10.beta4/devel/sage/doc/en/reference/matroids/sage/matroids/basis_matroid.rst:11:
 
WARNING: autodoc can't import/find module 'sage.matroids.basis_matroid', it 
reported error: "'module' object has no attribute 'BasisExchangeMatroid'", 
please check your spelling and sys.path
[reference] 
/Users/stefan/sage-5.10.beta4/devel/sage/doc/en/reference/matroids/sage/matroids/catalog.rst:11:
 
WARNING: autodoc can't import/find module 'sage.matroids.catalog', it 
reported error: "cannot import name BasisMatroid", please check your 
spelling and sys.path
[reference] 
/Users/stefan/sage-5.10.beta4/devel/sage/doc/en/reference/matroids/sage/matroids/circuit_closures_matroid.rst:11:
 
WARNING: autodoc can't import/find module 
'sage.matroids.circuit_closures_matroid', it reported error: "'module' 
object has no attribute 'BasisExchangeMatroid'", please check your spelling 
and sys.path
[reference] 
/Users/stefan/sage-5.10.beta4/devel/sage/doc/en/reference/matroids/sage/matroids/constructor.rst:11:
 
WARNING: autodoc can't import/find module 'sage.matroids.constructor', it 
reported error: "cannot import name BasisMatroid", please check your 
spelling and sys.path
[reference] 
/Users/stefan/sage-5.10.beta4/devel/sage/doc/en/reference/matroids/sage/matroids/extension.rst:11:
 
WARNING: autodoc can't import/find module 'sage.matroids.extension', it 
reported error: "'module' object has no attribute 'BasisExchangeMatroid'", 
please check your spelling and sys.path
[reference] 
/Users/stefan/sage-5.10.beta4/devel/sage/doc/en/reference/matroids/sage/matroids/matroids_catalog.rst:11:
 
WARNING: autodoc can't import/find module 'sage.matroids.matroids_catalog', 
it reported error: "cannot import name BasisMatroid", please check your 
spelling and sys.path


When I change the imports from lazy to regular, the documentation builds 
just fine. Any clue what's going on? Or where even to begin looking?

The easy way out would be to stop using lazy_import, but that would hurt 
Sage's startup time.

Thanks,

Stefan.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to