sphinx-contrib / matlabdomain

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

Conflict with autodoc #68

Closed putanowr closed 6 years ago

putanowr commented 6 years ago

Hello,

If I remember correctly similar issue was already raised some time ago but was set to be resolved. However I got the warnings below (both on linux (Debian 9, both python 2.7 and 3.5) and on Windows 10 (recent Anaconda).

Running Sphinx v1.7.1
WARNING: while setting up extension sphinx.ext.autodoc: directive 'automodule' is already registered, it will be overridden
WARNING: while setting up extension sphinx.ext.autodoc: directive 'autoclass' is already registered, it will be overridden
WARNING: while setting up extension sphinx.ext.autodoc: directive 'autoexception' is already registered, it will be overridden
WARNING: while setting up extension sphinx.ext.autodoc: directive 'autodata' is already registered, it will be overridden
WARNING: while setting up extension sphinx.ext.autodoc: directive 'autofunction' is already registered, it will be overridden
WARNING: while setting up extension sphinx.ext.autodoc: directive 'automethod' is already registered, it will be overridden
WARNING: while setting up extension sphinx.ext.autodoc: directive 'autoattribute' is already registered, it will be overridden
WARNING: while setting up extension sphinx.ext.autodoc: directive 'autoinstanceattribute' is already registered, it will be overridden

Changing the order of sphinx extensions (putting autodoc before sphinxcontrib.matlab) results in the crash:

Exception occurred:
  File "/usr/lib/python2.7/logging/__init__.py", line 1179, in warning
    self._log(WARNING, msg, args, **kwargs)
TypeError: _log() got an unexpected keyword argument 'line'

Add if I restore the previous order of extensions and ignore the warning I cannot get the autoclass or automodule commands to work with message:

WARNING: invalid signature for automodule (u'+mp')
WARNING: don't know which module to import for autodocumenting u'+mp' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name)

This seems logical as it looks some stuff from sphinxcontrib.matlab is going to be overridden. (I have matlab_src_dir set correctly). Before digging what is wrong, maybe someone can confirm the problems? Thank you in advance for support. Regards Roman

joeced commented 6 years ago

No the conflict with autodoc is not resolved unfortunately. Issue #63 is a reminder for myself to look into to this.

The other issue you report, with the reversed order, is not something I have seen or can reproduce :(. Issue #67 also reported the "log - line", but I can only get this with a missing matlab_src_dir.

Can you show me your conf.py and result of pip list.

putanowr commented 6 years ago

Thank you for your answer.

Here you have the conf.py file: conf .py.txt

Here is the pip list:

Package                    Version  
-------------------------- ---------
admesh                     0.98.5   
alabaster                  0.7.10   
Babel                      2.5.3    
Brlapi                     0.6.5    
certifi                    2018.1.18
chardet                    3.0.4    
cryptography               1.7.1    
cupshelpers                1.0      
Cython                     0.25.2   
decorator                  4.0.11   
docutils                   0.14     
future                     0.16.0   
httplib2                   0.9.2    
idna                       2.6      
imagesize                  1.0.0    
Jinja2                     2.10     
keyring                    10.1     
keyrings.alt               1.3      
louis                      3.0.0    
Mako                       1.0.6    
MarkupSafe                 1.0      
numpy                      1.12.1   
packaging                  17.1     
pexpect                    4.2.1    
Pillow                     4.0.0    
pip                        9.0.1    
ptyprocess                 0.5.1    
pyasn1                     0.1.9    
pycrypto                   2.6.1    
pycups                     1.9.73   
pycurl                     7.43.0   
pyenchant                  1.6.7    
Pygments                   2.2.0    
pygobject                  3.22.0   
pygraphviz                 1.4rc1   
pyparsing                  2.2.0    
pysmbc                     1.0.15.6 
python-apt                 1.4.0b3  
python-debian              0.1.30   
python-debianbts           2.6.1    
pytz                       2018.3   
pyxdg                      0.25     
QtPy                       1.2.1    
reportbug                  7.1.7    
reportlab                  3.3.0    
requests                   2.18.4   
roman                      2.0.0    
scipy                      0.18.1   
SecretStorage              2.3.1    
setuptools                 39.0.0   
six                        1.11.0   
snowballstemmer            1.2.1    
Sphinx                     1.7.1    
sphinx-argparse            0.1.15   
sphinxcontrib-matlabdomain 0.2.16   
sphinxcontrib-spelling     2.3.0    
sphinxcontrib-websupport   1.0.1    
unattended-upgrades        0.1      
Unidecode                  0.4.19   
urllib3                    1.22     
Wand                       0.4.4    
wheel                      0.29.0
joeced commented 6 years ago

I am closing this. Refer to #63