NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
462 stars 105 forks source link

ImportError: No module named python_debug_tools #31

Closed evandrocoan closed 6 years ago

evandrocoan commented 6 years ago

It can be related to:

  1. https://github.com/NiklasRosenstein/pydoc-markdown/issues/21 AttributeError: 'module' object has no attribute 'signature'

Code:

  1. https://github.com/evandrocoan/PythonDebugTools/tree/d5e5145506117191e436519ebb21a62c48ad9851/all

Using the version installed for python 3.6:

python --version
Python 3.6.3 :: Anaconda, Inc.
$ pydocmd simple python_debug_tools+ python_debug_tools.logger++ > doc.md
Building index...
Started generating documentation...
Traceback (most recent call last):
  File "F:\Python\Scripts\pydocmd-script.py", line 11, in <module>
    load_entry_point('pydoc-markdown==2.0.1', 'console_scripts', 'pydocmd')()
  File "F:\Python\lib\site-packages\pydocmd\__main__.py", line 210, in main
    loader.load_section(section)
  File "F:\Python\lib\site-packages\pydocmd\loader.py", line 86, in load_section
    sig = get_function_signature(obj, scope if inspect.isclass(scope) else None)
  File "F:\Python\lib\site-packages\pydocmd\loader.py", line 99, in get_function_signature
    name_parts.append(function.__name__)
AttributeError: 'Debugger' object has no attribute '__name__'

Using Cygwin shell which has by default the Python 2.7, installed for Python 2 pip install pydoc-markdown, now the error is different:

$ python --version
Python 2.7.13
# ls
doc.md  python_debug_tools  python_debug_tools.egg-info

$ pydocmd simple python_debug_tools+ python_debug_tools.logger++ > doc.md
Building index...
Traceback (most recent call last):
  File "/usr/bin/pydocmd", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/pydocmd/__main__.py", line 197, in main
    add_sections(doc, args.subargs)
  File "/usr/lib/python2.7/site-packages/pydocmd/__main__.py", line 170, in add_sections
    [add_sections(doc, x, depth) for x in object_names]
  File "/usr/lib/python2.7/site-packages/pydocmd/__main__.py", line 189, in add_sections
    create_sections(object_names, 0)
  File "/usr/lib/python2.7/site-packages/pydocmd/__main__.py", line 185, in create_sections
    for sub in dir_object(name):
  File "/usr/lib/python2.7/site-packages/pydocmd/imp.py", line 82, in dir_object
    obj = import_object(name)
  File "/usr/lib/python2.7/site-packages/pydocmd/imp.py", line 43, in import_object
    return import_object_with_scope(name)[0]
  File "/usr/lib/python2.7/site-packages/pydocmd/imp.py", line 63, in import_object_with_scope
    obj = import_module(current_name)
  File "/usr/lib/python2.7/site-packages/pydocmd/imp.py", line 35, in import_module
    return __import__(name, fromlist=[''])
ImportError: No module named python_debug_tools

On F:\Python\Scripts\ lives Python 3.6, the other /usr/lib/python2.7 is Python 2.7

NiklasRosenstein commented 6 years ago

ImportError: No module named python_debug_tools

How is this different from #30?

AttributeError: 'Debugger' object has no attribute '__name__'

That one looks new, I'll look into it.

evandrocoan commented 6 years ago

How is this different from #30?

I forgot you did not had released a new version and installed it with pip install pydoc-markdown instead of python setup.py develop