trentm / python-markdown2

markdown2: A fast and complete implementation of Markdown in Python
Other
2.66k stars 433 forks source link

markdown2 import in personal project #461

Closed apscandy closed 2 years ago

apscandy commented 2 years ago

I receive the following error when I markdown2 in my project and use pdoc to generate a page or docs

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pdoc/extract.py", line 207, in load_module
    return importlib.import_module(module)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/andy/Documents/github.com:public/apscandy/Personal Projects/gpa-scraper/./main_recator.py", line 13, in <module>
    from markdown2 import markdown
ModuleNotFoundError: No module named 'markdown2'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pdoc/web.py", line 71, in handle_request
    mod = self.server.all_modules[module_name]
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pdoc/web.py", line 144, in __getitem__
    return doc.Module.from_name(item)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pdoc/doc.py", line 375, in from_name
    return cls(extract.load_module(name))
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pdoc/extract.py", line 209, in load_module
    raise RuntimeError(f
"Error importing {module}") from e
RuntimeError: Error importing main_recator
Screen Shot 2022-07-30 at 7 25 17 pm
nicholasserra commented 2 years ago

Just looks like you don't have markdown2 (this package) installed. How did you install it?

apscandy commented 2 years ago

I found the issue it was with my documation tool pdoc