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

  • SEARCH
  • Home
  • 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 568285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:10:21+00:00 2026-05-13T13:10:21+00:00

When I load my code into epydoc and just load the top module it

  • 0

When I load my code into epydoc and just load the top module it fails with:

Error: TypeError: 'NoneType' object is not callable (line 10)

Where the the NoneType that it is referring to is a submodule that I tried to load on line 9. How can I get epydoc to explain why it couldn’t load the module on line 9 instead of just plowing ahead and hitting an error?

Per nosko’s request. Here is similar example, where no stack trace is given:

# foo.py
import bar
bar.baz()

# bar.py

def baz():
    print 'baz'

import os
os.environ['DOES_NOT_EXIST']

Run with:

python2.6 epydoc --html foo.py

Produces the less than useful:


+————————————–
| In /home/ross/foo.py:
| Import failed (but source code parsing was successful).
| Error: KeyError: ‘DOES_NOT_EXIST’ (line 1)

I want epydoc to tell me that the failure is on line 6 of bar.py. I don’t want it to complain about foo.py‘s import of bar.py. I can’t reproduce my specific problem in a small example, but my fundamental request is that when epydoc fails, I want it to print a stack trace to point to the issue. Whether it is loading a sub-module or calling not finding a key in a dictionary.

NOTE: The root of this problem is that the code I am trying to document is an input to SCons which has different environment setup issues. That’s why when I run in epydoc it doesn’t work, but the script still works when run with scons -f SConstruct.py. I’m also trying to generate documentation with sphinx. When I run with sphinx it actually shows the stack trace. Maybe I’ll go with sphinx…

  • 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-05-13T13:10:22+00:00Added an answer on May 13, 2026 at 1:10 pm

    So if I understand correctly, the module you’re running epydoc on imports a module that has an error in it (not the module you want to generate docs for)?

    If all you need to accomplish is to see the line in the file which has the error so you can debug it, you can pass in this file as well and the line number where the error occurred will be listed for that module.

    So, running:

    epydoc --check foo.py bar.py
    

    Will output:

    +------------------------------------------------------------------------------------------------------------
    | In /home/mark/Desktop/foo.py:
    | Import failed (but source code parsing was successful).
    |     Error: KeyError: 'DOES_NOT_EXIST' (line 2)
    |   
    +------------------------------------------------------------------------------------------------------------
    | In /home/mark/Desktop/bar.py:
    | Import failed (but source code parsing was successful).
    |     Error: KeyError: 'DOES_NOT_EXIST' (line 7)
    |   
    

    Since Bar.py is also analyzed, the line number where the error occurred in this file is listed.

    Now, if you’re looking for a more robust solution because this is a common problem you need to deal with then you’re going to have to start hacking the epydoc internals. Having done so myself, I’d advise you to avoid running down this rabbit hole if you can. If switching to Sphinx is an option, I’d recommend this route.

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

Sidebar

Ask A Question

Stats

  • Questions 401k
  • Answers 401k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Handle the ItemCommand event of the repeater. In your event… May 15, 2026 at 4:39 am
  • Editorial Team
    Editorial Team added an answer Changing ImageView source: Using setBackgroundResource() method: myImgView.setBackgroundResource(R.drawable.monkey); you are putting… May 15, 2026 at 4:38 am
  • Editorial Team
    Editorial Team added an answer You can get that by running a javascript, using this.browserbot.findElement('/html/body/div/div//input'):… May 15, 2026 at 4:38 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.