sphinx-contrib / matlabdomain

A Sphinx extension for documenting Matlab code
http://sphinxcontrib-matlabdomain.readthedocs.io/
Other
70 stars 45 forks source link

Nested package makes parser crash if show-inheritance is enabled #133

Closed edmondop closed 2 years ago

edmondop commented 2 years ago

When enabling `::show-inheritance:: `like the following, Sphinx crashes

.. mat:automodule:: mypackage.+mysubpackage
   :members:
   :undoc-members:
   :show-inheritance:

  File "/Users/edmondoporcu/Library/Caches/pypoetry/virtualenvs/proj-tHVI9Brl-py3.9/lib/python3.9/site-packages/sphinxcontrib/mat_types.py", line 1167, in __bases__
    num_pths = len(MatObject.basedir.split(os.sep))
AttributeError: 'PosixPath' object has no attribute 'split'
The full traceback has been saved in /var/folders/x0/b84hf3550f7bcygb4lvgz3ym0000gn/T/sphinx-err-yejqf216.log, if you want to report the issue to the developers.

this instead not true if the show-inheritance is omitted

joeced commented 2 years ago

Hi

Thanks for reporting this. Could you provide a ZIP-file with a minimal example? That would make it easier to debug

joeced commented 2 years ago

Closed as I couldn't reproduce the error.