Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8518261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:55:55+00:00 2026-06-11T05:55:55+00:00

I inherited a rather large codebase that I want to create HTML documentation for.

  • 0

I inherited a rather large codebase that I want to create HTML documentation for. Since it is written in Python I decided to use Sphinx because the users of the code are accustomed to the design and functionality of the Python documentation that’s created with Sphinx.
I used the command sphinx-apidoc to automatically create the .rst files. I imported the module path into sys.path so that Sphinx can find the code.

So far so good. However, when I try to create the HTML using the command make html, there are many tracebacks popping up and some of the examples in the codebase seem to get executed. What can be the reason for that and how can I prevent that from happening?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T05:55:57+00:00Added an answer on June 11, 2026 at 5:55 am

    When using autodoc, Sphinx imports the documented modules, so all module-level code is executed. This happens every time you do “make html”. In that sense, Sphinx does “run” your code.

    You may have to organize your code a bit differently to make the errors go away (move module-level code to functions). See this question for an example of what can happen.

    This is my guess but it may not be the whole story. It’s hard to say more without additional information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've inherited some rather large static HTML files that need to be fixed up
I've inherited a rather large application that really could use some cleanup. There is
I've inherited some python code that contains a rather cryptic decorator. This decorator sets
I've inherited a rather large and somewhat messy codebase, and have been tasked with
I've got a rather hideous and large javascript file that I've inherited from a
I've inherited a large C++ codebase for several Windows applications that successfully is in
We've inherited a rather large Access DB that has some very strange (and unsettling)
History: I inherited a rather large app written using MS Access with lots of
I recently inherited a Ubuntu Hardy box that acts rather funky out-of-the-box. The first
My PHP experience is rather limited. I've just inherited some stuff that looks odd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.