astropy / astropy/sphinx-automodapi

Logging error

Open
#109 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
67
Forks
48
Avg merge
11h 52m
Merged PRs (30d)
1

Description

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)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the warning with Python 3.7.7, Sphinx 3.0.3, and the latest automodapi. Inspect automodapi.py around the reported warning code and logging call. Done means the additional-options warning is emitted without the logging TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.