Closed evandrocoan closed 6 years ago
I can reproduce your issue, and a quick workaround is to use PYTHONPATH=.
before the command, as in
$ PYTHONPATH=. pydoc-markdown simple python_debug_tools.logger+
So yes, it's because pydoc-markdown doesn't add the current working directory to sys.path
. I suppose this would be a sensible behaviour, though.
This is the module: https://github.com/evandrocoan/PythonDebugTools/tree/master/all/python_debug_tools
Here are some more error messages with different commands:
``` F:\PythonDebugTools\all>pydocmd simple python_debug_tools+ python_debug_tools.logger+ Building index... Traceback (most recent call last): File "f:\python\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "f:\python\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "F:\Python\Scripts\pydocmd.exe\__main__.py", line 9, in
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 197, in main
add_sections(doc, args.subargs)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in add_sections
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 189, in add_sections
create_sections(object_names, 0)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 185, in create_sections
for sub in dir_object(name):
File "f:\python\lib\site-packages\pydocmd\imp.py", line 82, in dir_object
obj = import_object(name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 43, in import_object
return import_object_with_scope(name)[0]
File "f:\python\lib\site-packages\pydocmd\imp.py", line 63, in import_object_with_scope
obj = import_module(current_name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 35, in import_module
return __import__(name, fromlist=[''])
ModuleNotFoundError: No module named 'python_debug_tools'
F:\PythonDebugTools\all>pydocmd simple .python_debug_tools+ .python_debug_tools.logger+
Building index...
Traceback (most recent call last):
File "f:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "f:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "F:\Python\Scripts\pydocmd.exe\__main__.py", line 9, in
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 197, in main
add_sections(doc, args.subargs)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in add_sections
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 189, in add_sections
create_sections(object_names, 0)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 185, in create_sections
for sub in dir_object(name):
File "f:\python\lib\site-packages\pydocmd\imp.py", line 82, in dir_object
obj = import_object(name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 43, in import_object
return import_object_with_scope(name)[0]
File "f:\python\lib\site-packages\pydocmd\imp.py", line 63, in import_object_with_scope
obj = import_module(current_name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 35, in import_module
return __import__(name, fromlist=[''])
ValueError: Empty module name
F:\PythonDebugTools\all>pydocmd simple .python_debug_tools+
Building index...
Traceback (most recent call last):
File "f:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "f:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "F:\Python\Scripts\pydocmd.exe\__main__.py", line 9, in
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 197, in main
add_sections(doc, args.subargs)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in add_sections
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 189, in add_sections
create_sections(object_names, 0)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 185, in create_sections
for sub in dir_object(name):
File "f:\python\lib\site-packages\pydocmd\imp.py", line 82, in dir_object
obj = import_object(name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 43, in import_object
return import_object_with_scope(name)[0]
File "f:\python\lib\site-packages\pydocmd\imp.py", line 63, in import_object_with_scope
obj = import_module(current_name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 35, in import_module
return __import__(name, fromlist=[''])
ValueError: Empty module name
F:\PythonDebugTools\all>pydocmd simple .python_debug_tools+ .python_debug_tools.logger++
Building index...
Traceback (most recent call last):
File "f:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "f:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "F:\Python\Scripts\pydocmd.exe\__main__.py", line 9, in
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 197, in main
add_sections(doc, args.subargs)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in add_sections
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 189, in add_sections
create_sections(object_names, 0)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 185, in create_sections
for sub in dir_object(name):
File "f:\python\lib\site-packages\pydocmd\imp.py", line 82, in dir_object
obj = import_object(name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 43, in import_object
return import_object_with_scope(name)[0]
File "f:\python\lib\site-packages\pydocmd\imp.py", line 63, in import_object_with_scope
obj = import_module(current_name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 35, in import_module
return __import__(name, fromlist=[''])
ValueError: Empty module name
F:\PythonDebugTools\all>pydocmd simple python_debug_tools++
Building index...
Traceback (most recent call last):
File "f:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "f:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "F:\Python\Scripts\pydocmd.exe\__main__.py", line 9, in
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 197, in main
add_sections(doc, args.subargs)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in add_sections
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 189, in add_sections
create_sections(object_names, 0)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 185, in create_sections
for sub in dir_object(name):
File "f:\python\lib\site-packages\pydocmd\imp.py", line 82, in dir_object
obj = import_object(name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 43, in import_object
return import_object_with_scope(name)[0]
File "f:\python\lib\site-packages\pydocmd\imp.py", line 63, in import_object_with_scope
obj = import_module(current_name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 35, in import_module
return __import__(name, fromlist=[''])
ModuleNotFoundError: No module named 'python_debug_tools'
F:\PythonDebugTools\all>pydocmd simple python_debug_tools+ python_debug_tools.logger++
Building index...
Traceback (most recent call last):
File "f:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "f:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "F:\Python\Scripts\pydocmd.exe\__main__.py", line 9, in
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 197, in main
add_sections(doc, args.subargs)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in add_sections
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 170, in
[add_sections(doc, x, depth) for x in object_names]
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 189, in add_sections
create_sections(object_names, 0)
File "f:\python\lib\site-packages\pydocmd\__main__.py", line 185, in create_sections
for sub in dir_object(name):
File "f:\python\lib\site-packages\pydocmd\imp.py", line 82, in dir_object
obj = import_object(name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 43, in import_object
return import_object_with_scope(name)[0]
File "f:\python\lib\site-packages\pydocmd\imp.py", line 63, in import_object_with_scope
obj = import_module(current_name)
File "f:\python\lib\site-packages\pydocmd\imp.py", line 35, in import_module
return __import__(name, fromlist=[''])
ModuleNotFoundError: No module named 'python_debug_tools'
F:\PythonDebugTools\all>
```