Closed michaelweinold closed 2 months ago
@cmutel, I painstakingly narrowed the issue down to the file/class structure now replicated here:
__init__.py
:
from test_library.test_module import banana
test_module.py
:
class highest:
def __init__(self):
self.a = 'a'
class middle(highest):
def __init__(self):
self.a = 'a'
class lowest:
def __init__(self):
self.db = "middle"
test_module = lowest()
It is all a little peculiar. If the instance of the lowest()
class is named something other than the name of the module, such as banana = lowest()
, no error is thrown. But even if the instance of the lowest()
class is named test_module
, the error can be avoided by not making the class middle()
inherit from another class.
Maybe you can pick this up...
No idea how you even thought to debug in that direction... what about just moving parameters = ParameterManager()
to __init__.py
? This shouldn't break too much... the other option would be to change the filename parameters.py
.
No idea how you even thought to debug in that direction...
what about just moving
parameters = ParameterManager()
to__init__.py
? This shouldn't break too much...
It still does - sorry. You can quickly check my debugging repo: https://github.com/michaelweinold/sphinx-autoapi-debugging
the other option would be to change the filename
parameters.py
From what I can see, this should work.
I have posted the MWE from above in the related issue:
The recent move to absolute imports:
broke the
inheritance-diagram
functionality of theautoapi
Sphinx extension:A quick workaround would be to simply disable the generation of inheritance diagrams in
conf.py
like so:Passing
-v -v -v
to thesphinx-build
command, as documented allowed me to narrow the issue down thebw2data/parameters.py
file:Manually removing this file will result in a successful Sphinx build.
I will need to leave the remainder of this investigation to the gentlemen who broke the build in the first place (@cmutel et al.) 😬
I created a debugging repository that should make this fairly easy: https://github.com/michaelweinold/sphinx-autoapi-debugging