Closed AntoineDps closed 1 year ago
Thanks for the detailed report. Your can try to run with sphinx-build -vvv =m html . -b _build/html > sphinx.log
this will run in verbose mode. We can then identify which file us causing the parsing error
Hi Joeced !
Thanks for the answer. I would like to run the way you suggested but it seems that another error showed up. Here again it is quite confusing since I haven't done much change, if if I did it is only in my .m files, nothing related to the configuration of the compilation itself or else. Here is the error I got this merning when trying to compile:
Running Sphinx v7.0.1
loading pickled environment... done
WARNING: [sphinxcontrib-matlabdomain] Parsing failed in WEClibrary.None. Expected '='.
Extension error (sphinxcontrib.matlab):
Handler <function analyze at 0x000001BF5D9B6790> for event 'builder-inited' threw an exception (exception: 'NoneType' object has no attribute 'startswith')
An idea about that ?
Look like a parsing error. I'm away from a computer at the moment, so I can't help much the moment. Is there a Matlab file called None?
Indeed. Absolutely not.. that is why I have been very confused... I have only 6 matlab file, non of them is called None.m
Hi again joeced !
An update: I have played around and uninstalled/reinstalled the matlab extension. Nothing changed.
However I have spent some time try to troubleshoot the error. Seems like there was something in my matlab file that the sphinx matlab extension didn't like, some empty method or similar... But I confirm that I didn't have any None.m file.
I guess this how it handled this case, but I was surprised that a error in my matlab file itself (no commentary but the code itself) could lead to this type of error diagnostic. Good to know !
Moreover, the initial error that is at the origin of my post disappeared as well... I think this was an error due to the same reason: a bug in the matlab code itself !
Thanks for your support !
Hi
Glad that it worked out for you. Did it produce a sphinx.log
file you can share?
I would like to get rid of these kinds of errors. We are using the pygments library to parse the matlab files and are some what sensitive to syntaxes errors.
Hi joeced,
The sphinx.log
file I have in my docs
file is empty right now. I'd like to help so let me know what I should do !
But I guess you want the .log
corresponding to the case when I had errors ?
I'll close this now. If you stumble on such an error again, please make an issue.
I have been using sphinx and in particular the sphinx-contrib for matlab domain wihtout any issue until the html compilation doesn't build successfully (see the Traceback below) for now apparent reasons since I have made any change since the last successful compilation. The following error is given:
Without really understanding neither the meaning or the reason of the error, I have opened the 'mat_types.py' file and commented the concerned line (line 1459).
After this my documentation compiles without error and apparently without any unexpected impact on the documentation itself. So all good except that I don't like to understand the reasons why got this error in the first place.
Any comment or thought on this issue would be highly appreciated !
And here's the Traceback information I am getting:
Traceback: