Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装方面 generate html fail: No module named 'teedoc.metadata_parser' #29

Open
yummi1234 opened this issue Oct 30, 2023 · 3 comments

Comments

@yummi1234
Copy link

[developer@-dev teedoc]$ mkdir my_site
[developer@-dev teedoc]$ cd my_site
[developer@-dev my_site]$ teedoc init
2023-10-30 10:39:00 - [INFO] - [MainProcess - MainThread] init doc now

====== select template =======

1: minimal (default): minimal template
2: complete: complete template, have more features settings like multi language

Input number and press Enter(default 1): 1
2023-10-30 10:39:01 - [INFO] - [MainProcess - MainThread] init doc complete, doc root: .
[developer@bigdata01-dev my_site]$ teedoc install
2023-10-30 10:39:17 - [INFO] - [MainProcess - MainThread] teedoc version: 1.26.4
2023-10-30 10:39:17 - [INFO] - [MainProcess - MainThread] max thread number: 8
2023-10-30 10:39:17 - [INFO] - [MainProcess - MainThread] install, source doc root path: /home/developer/teedoc/my_site
2023-10-30 10:39:17 - [INFO] - [MainProcess - MainThread] plugins: ['teedoc-plugin-markdown-parser', 'teedoc-plugin-theme-default', 'teedoc-plugin-search', 'teedoc-plugin-assets']
2023-10-30 10:39:17 - [INFO] - [MainProcess - MainThread] install plugin from pypi.org
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: teedoc-plugin-markdown-parser in /home/developer/.local/lib/python3.6/site-packages (2.10.5)
Requirement already satisfied: PyYaml>=5.4.1 in /home/developer/.local/lib/python3.6/site-packages (from teedoc-plugin-markdown-parser) (6.0.1)
Requirement already satisfied: mistune<3,>=2.0.3 in /home/developer/.local/lib/python3.6/site-packages (from teedoc-plugin-markdown-parser) (2.0.5)
2023-10-30 10:39:18 - [INFO] - [MainProcess - MainThread] install complete
2023-10-30 10:39:18 - [INFO] - [MainProcess - MainThread] install plugin from pypi.org
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: teedoc-plugin-theme-default in /home/developer/.local/lib/python3.6/site-packages (1.24.1)
2023-10-30 10:39:19 - [INFO] - [MainProcess - MainThread] install complete
2023-10-30 10:39:19 - [INFO] - [MainProcess - MainThread] install plugin from pypi.org
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: teedoc-plugin-search in /home/developer/.local/lib/python3.6/site-packages (1.5.3)
2023-10-30 10:39:20 - [INFO] - [MainProcess - MainThread] install complete
2023-10-30 10:39:20 - [INFO] - [MainProcess - MainThread] install plugin from pypi.org
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: teedoc-plugin-assets in /home/developer/.local/lib/python3.6/site-packages (1.1.2)
2023-10-30 10:39:20 - [INFO] - [MainProcess - MainThread] install complete
2023-10-30 10:39:20 - [INFO] - [MainProcess - MainThread] all plugins install complete
[developer@bigdata01-dev my_site]$ teedoc serve
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] teedoc version: 1.26.4
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] max thread number: 8
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] plugins: ['teedoc-plugin-markdown-parser', 'teedoc-plugin-theme-default', 'teedoc-plugin-search', 'teedoc-plugin-assets']
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] plugin version: 2.10.5
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] -- plugin init
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] -- plugin config: {'parse_files': ['md'], 'mermaid': True, 'mermaid_use_cdn': False, 'mermaid_cdn_url': 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js', 'mathjax': {'enable': True, 'file_name': 'tex-mml-chtml', 'config': {'loader': {'load': ['output/svg']}, 'tex': {'inlineMath': [['$', '$'], ['\(', '\)']]}, 'svg': {'fontCache': 'global'}}}}
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] plugin version: 1.24.1
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] -- plugin init
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] -- plugin config: {'dark': True, 'default_dark': False, 'mobile_navbar_collapsed': True, 'show_print_page': False, 'toc_depth': 4, 'env': {'main_color': '#4caf7d', 'sidebar_width': '300px', 'sidebar_scrollbar_color': '#b8b8b8', 'toc_depth_str': 'h1, h2, h3, h4', 'mobile_navbar_collapsed': 'none', 'default_theme': 'light', 'show_print_page': 'false'}}
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] plugin version: 1.5.3
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] -- plugin init
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] -- plugin config: {'content_type': 'raw', 'search_hint': 'Search', 'input_hint': 'Keywords separated by space', 'loading_hint': 'Loading, wait please ...', 'download_err_hint': 'Download error, please check network and refresh again', 'other_docs_result_hint': 'Result from other docs', 'curr_doc_result_hint': 'Result from current doc', 'env': {'main_color': '#4caf7d', 'main_color_dark': '#1b4c33', 'hint_shadow_color': 'rgba(76, 175, 125, 0.38)'}}
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] plugin version: 1.1.2
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] -- plugin init
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] -- plugin config: {'header_items': ['/static/css/custom.css'], 'footer_items': ['/static/js/custom.js'], 'env': {'main_color': '#4caf7d', 'second_color': '#0a7d43'}}
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] parse doc:
-- dir: /home/developer/teedoc/my_site/docs/doc1
-- url: /doc1/
2023-10-30 10:39:29 - [INFO] - [MainProcess - MainThread] html_templates_i18n_dirs:
-- /home/developer/.local/lib/python3.6/site-packages/teedoc_plugin_theme_default/locales
-- /home/developer/.local/lib/python3.6/site-packages/teedoc_plugin_search/locales
Traceback (most recent call last):
File "/home/developer/.local/lib/python3.6/site-packages/teedoc/teedoc_main.py", line 1000, in generate
p.on_new_process_init()
File "/home/developer/.local/lib/python3.6/site-packages/teedoc_plugin_markdown_parser/init.py", line 81, in on_new_process_init
from teedoc.metadata_parser import Metadata_Parser
ModuleNotFoundError: No module named 'teedoc.metadata_parser'
2023-10-30 10:39:29 - [ERROR] - [MainProcess - MainThread] generate html fail: No module named 'teedoc.metadata_parser'
Traceback (most recent call last):
File "/home/developer/.local/lib/python3.6/site-packages/teedoc/teedoc_main.py", line 1000, in generate
p.on_new_process_init()
File "/home/developer/.local/lib/python3.6/site-packages/teedoc_plugin_markdown_parser/init.py", line 81, in on_new_process_init
from teedoc.metadata_parser import Metadata_Parser
ModuleNotFoundError: No module named 'teedoc.metadata_parser'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/developer/.local/bin/teedoc", line 8, in
sys.exit(main())
File "/home/developer/.local/lib/python3.6/site-packages/teedoc/teedoc_main.py", line 1850, in main
copy_assets = True):
File "/home/developer/.local/lib/python3.6/site-packages/teedoc/teedoc_main.py", line 1401, in build
html_templates_i18n_dirs = html_templates_i18n_dirs, multiprocess = multiprocess)
File "/home/developer/.local/lib/python3.6/site-packages/teedoc/teedoc_main.py", line 1325, in parse
redirect_err_file, redirct_url, ref_doc_url)
File "/home/developer/.local/lib/python3.6/site-packages/teedoc/teedoc_main.py", line 1088, in generate
return generate_return(plugins_objs, False, multiprocess)
File "/home/developer/.local/lib/python3.6/site-packages/teedoc/teedoc_main.py", line 969, in generate_return
p.on_new_process_del()
File "/home/developer/.local/lib/python3.6/site-packages/teedoc_plugin_markdown_parser/init.py", line 91, in on_new_process_del
del self.md_parser
AttributeError: md_parser
麻烦帮忙看下,装了几次都是这样

@Neutree
Copy link
Member

Neutree commented Oct 30, 2023

pip install -U teedoc 升级一下 teedoc 到最新(v1.36.4) 再试试,可以通过 teedoc --version查看版本

@m-y-name
Copy link

PS D:\workspace\testTeedoc> teedoc serve
2024-05-21 08:48:12 - [INFO] - [MainProcess - MainThread]  teedoc version: 1.26.4
2024-05-21 08:48:12 - [INFO] - [MainProcess - MainThread]  max thread number: 8
2024-05-21 08:48:12 - [INFO] - [MainProcess - MainThread]  plugins: ['teedoc-plugin-markdown-parser', 'teedoc-plugin-theme-default', 'teedoc-plugin-search', 'teedoc-plugin-assets']
2024-05-21 08:48:12 - [INFO] - [MainProcess - MainThread]  plugin version: 2.11.0
2024-05-21 08:48:12 - [INFO] - [MainProcess - MainThread]  -- plugin <teedoc-plugin-markdown-parser> init     
2024-05-21 08:48:12 - [INFO] - [MainProcess - MainThread]  -- plugin <teedoc-plugin-markdown-parser> config: {'parse_files': ['md'], 'mermaid': True, 'mermaid_use_cdn': False, 'mermaid_cdn_url': 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js', 'mathjax': {'enable': True, 'file_name': 'tex-mml-chtml', 'config': {'loader': {'load': ['output/svg']}, 'tex': {'inlineMath': [['$', '$'], ['\\(', '\\)']]}, 'svg': {'fontCache': 'global'}}}}
Traceback (most recent call last):
  File "d:\python 3.6.8\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\python 3.6.8\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\python 3.6.8\Scripts\teedoc.exe\__main__.py", line 7, in <module>
  File "d:\python 3.6.8\lib\site-packages\teedoc\teedoc_main.py", line 1779, in main
    plugin_obj = module.Plugin(doc_src_path=doc_src_path, config=plugin_config, site_config=site_config, logger=log, multiprocess = args.multiprocess)
  File "d:\python 3.6.8\lib\site-packages\teedoc\plugin.py", line 46, in __init__
    self.on_init(config, doc_src_path, site_config, logger, multiprocess = multiprocess, **kw_args)
  File "d:\python 3.6.8\lib\site-packages\teedoc_plugin_markdown_parser\__init__.py", line 67, in on_init     
    from teedoc.metadata_parser import Metadata_Parser
ModuleNotFoundError: No module named 'teedoc.metadata_parser'

在python 3.6.8复现了该问题, 最大可用的版本为 V1.26.4

@Neutree
Copy link
Member

Neutree commented May 27, 2024

pip install -U teedoc 升级一下 teedoc 不行吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants