Open rsokolewicz opened 1 year ago
Before I investigate further, can you confirm that this is still an issue @rsokolewicz?
Hi Stefan, it's still an issue yes, but it doesn't block any of our development. As I mentioned, we can add an import h5py
line to conf.py
that is used by sphinx when building the documentation and resolves the issue.
I was playing around just now and can tell you that the error is caused by the autoapi extension of sphinx. This generates an API page with documentation and cross references to all modules/classes/methods. My guess is that something goes wrong in creating a cross reference to a member of a lazy loaded package. It could very well be that the issue should be solved by autoapi and not you guys.
Is this the same traceback you see?
Thanks for the reproducer, although I hope we can find one with fewer than 223 dependencies!
looks like it, yes :) As I said before, we are not blocked by this since we found a way around it: add an import h5py
to conf.py
. Unless other people have the same problem I wouldn't invest too much time into this.
Hi,
I found an issue where building a sphinx documentation breaks when one of our package's dependencies lazy loads a package.
In our particular case we depend on
qcodes
that lazy loads theh5py
package.When building the documentation, it fails with the following trace stack
which is not very clear to me. I can make the build succeed by adding the line
import h5py
todocs/conf.py
, so the root cause is very likely due to the lazy loading ofh5py
.I don't have a nice minimal working example, other than cloning our repo and building the documentation yourselves:
which fails, but after a
echo "import h5py" >> conf.py
and running the sphinx build again it succeeds.