sphinx-automodapi icon indicating copy to clipboard operation
sphinx-automodapi copied to clipboard

Logging error

Open waszil opened this issue 4 years ago • 0 comments

I'm using python 3.7.7, sphinx 3.0.3 and the latest automodapi.

The following problem occurs: I get these kind of warnings: "WARNING: Found additional options members in automodapi" however it causes a logging error: TypeError: not all arguments converted during string formatting

I played around with it and I could fix it by this, as it seems that arguments are passed to the string that have no % formatter placeholders:

Index: automodapi.py
===================================================================
--- automodapi.py	(revision 34799)
+++ automodapi.py	(working copy)
@@ -286,7 +286,7 @@
             # tell sphinx that the remaining args are invalid.
             if len(unknownops) > 0 and app is not None:
                 opsstrs = ','.join(unknownops)
-                msg = 'Found additional options ' + opsstrs + ' in automodapi.'
+                msg = 'Found additional options ' + opsstrs + ' in automodapi. %s'
                 if warnings:
                     logger.warning(msg, location)

waszil avatar Jul 08 '20 13:07 waszil