Bug 526093 - autodoc.py", line 658, in import_object __import__(self.modname) Caused by python decorators .... with autodoc View function mapping is overwriting an existing endpoint
Summary: autodoc.py", line 658, in import_object __import__(self.modname) Caused b...
Status: CLOSED INVALID
Alias: None
Product: Sphinx
Classification: Automotive
Component: Scripting Support (show other bugs)
Version: 0.11.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-16 11:29 EDT by J Weinfeld CLA
Modified: 2024-05-07 00:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J Weinfeld CLA 2017-10-16 11:29:39 EDT
autodoc.py", line 658, in import_object
    __import__(self.modname)

Caused by python decorators .... with autodoc

If I remove the decorators ... then it works

@func_config(section="test")
@func_logger("test")
def query(table, parms="", **kwargs):
    """This method takes"""


Sphinx==1.6.4
Python 2.7
Comment 1 J Weinfeld CLA 2017-10-16 12:03:47 EDT
    @func_logger("test")
  File "C:\Python27\lib\site-packages\flask\app.py", line 1080, in decorator
    self.add_url_rule(rule, endpoint, f, **options)
  File "C:\Python27\lib\site-packages\flask\app.py", line 64, in wrapper_func
    return f(self, *args, **kwargs)
  File "C:\Python27\lib\site-packages\flask\app.py", line 1051, in add_url_rule
    'existing endpoint function: %s' % endpoint)
AssertionError: View function mapping is overwriting an existing endpoint function: query
Comment 2 J Weinfeld CLA 2017-10-16 12:10:49 EDT
Here is another complaint about the same issue:

https://stackoverflow.com/questions/41971708/route-endpoint-conflicts-when-generating-sphinx-doc-for-flask-restful-api
Comment 3 Balazs Grill CLA 2024-05-07 00:30:01 EDT
I believe this issue is about the Sphinx python package (https://www.sphinx-doc.org/en/master/), not Eclipse Sphinx (https://eclipse.dev/sphinx/)