Closed Tudor44 closed 8 months ago
Hi, have tried using mkdocs serve
?
Hi, have tried using
mkdocs serve
?
Yes same error using main branch.
@Tudor44 I tried to reproduce the error, but both build
and serve
work.
Inspect the logs in the terminal, mkdocs should tell you which file is empty and its path. Otherwise, share the full error trace here please.
Maybe you forgot some empty file somewhere..?
@Tudor44 I tried to reproduce the error, but both
build
andserve
work. Inspect the logs in the terminal, mkdocs should tell you which file is empty and its path. Otherwise, share the full error trace here please. Maybe you forgot some empty file somewhere..?
Thank for reply @nicola-corbellini . Here the stacktrace. I have just forked the repo.
pip 21.2.4
Python 3.9.6 (default, Aug 11 2023, 19:44:49) [Clang 15.0.0 (clang-1500.0.40.1)] on darwin
ERROR - Error reading page 'quickstart/writing-tool.md': Document is empty Traceback (most recent call last): File "/Users/gdorsi/Desktop/docs-cat/env/bin/mkdocs", line 8, in <module> sys.exit(cli()) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/mkdocs/__main__.py", line 286, in build_command build.build(cfg, dirty=not clean) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/mkdocs/commands/build.py", line 322, in build _populate_page(file.page, config, files, dirty) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/mkdocs/commands/build.py", line 179, in _populate_page page.content = config.plugins.on_page_content( File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/mkdocs/plugins.py", line 578, in on_page_content return self.run_event('page_content', html, page=page, config=config, files=files) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/mkdocs/plugins.py", line 507, in run_event result = method(item, **kwargs) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/mkdocs_video/plugin.py", line 28, in on_page_content content = lxml.html.fromstring(html) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/lxml/html/__init__.py", line 873, in fromstring doc = document_fromstring(html, parser=parser, base_url=base_url, **kw) File "/Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/lxml/html/__init__.py", line 761, in document_fromstring raise etree.ParserError( lxml.etree.ParserError: Document is empty
@Tudor44 can you tell us how did you installed mkdocs? Can you explain the steps you made after forking the repo? Also, what is your OS?
@Tudor44 can you tell us how did you installed mkdocs? Can you explain the steps you made after forking the repo? Also, what is your OS?
Hello @kodaline here your informations:
MKDOCS version line:
mkdocs, version 1.5.3 from /Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/mkdocs (Python 3.9)
OS: I use macOS 14.1.2.
PROCEDURE:
I cloned the main branch and installed dependencies with venv environment using pip manager.
pip install -r requirements.txt
@Tudor44 do you have any chance to test it on a different OS to see if it's a document encoding problem?
@Tudor44 can you tell us how did you installed mkdocs? Can you explain the steps you made after forking the repo? Also, what is your OS?
Hello @kodaline here your informations:
MKDOCS version line:
mkdocs, version 1.5.3 from /Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/mkdocs (Python 3.9)
can you give your output of the command
pip3 freeze | grep mkdocs
?OS: I use macOS 14.1.2.
ah linux is the solution 😛
@Tudor44 can you tell us how did you installed mkdocs? Can you explain the steps you made after forking the repo? Also, what is your OS?
Hello @kodaline here your informations: MKDOCS version line:
mkdocs, version 1.5.3 from /Users/gdorsi/Desktop/docs-cat/env/lib/python3.9/site-packages/mkdocs (Python 3.9)
can you give your output of the command
pip3 freeze | grep mkdocs
?
mkdocs==1.5.3
mkdocs-autorefs==0.5.0
mkdocs-gen-files==0.5.0
mkdocs-literate-nav==0.6.1
mkdocs-material==9.5.3
mkdocs-material-extensions==1.3.1
mkdocs-section-index==0.3.8
mkdocs-video==1.5.0
mkdocstrings==0.24.0
mkdocstrings-python==1.7.5
OS: I use macOS 14.1.2.
ah linux is the solution 😛
ahahah , I m also a Mac/Apple fan. But I ll test, as soon, with another laptop with Windows, or later Ubuntu. Thanks!
@Tudor44 just for curiosity, can you remove the emoji in that file that gives the error and try again?
@Tudor44 just for curiosity, can you remove the emoji in that file that gives the error and try again?
I have tried again with MacOS and you won't believe, but it works with this modification. Time to open an issue to mkdocs project then Xd Thanks for the intuition.
@Tudor44 just for curiosity, can you remove the emoji in that file that gives the error and try again?
I have tried again with MacOS and you won't believe, but it works with this modification. Time to open an issue to mkdocs project then Xd Thanks for the intuition.
you are welcome, there is some issue in the parser I guess, in lxml, when dealing with emojis
@nicola-corbellini I guess we can close this issue, maybe we can put somewhere a note about it for macos users
Actually this is a known issue we had previously. The emoji should be replaced with its html code. I'm opening an issue asap, if no one can before
I have prepared a draft. I fixed and tested writing-tool.md and works fine.
Indeed, no need for a new issue. This one is the issue :rofl: Thank you! Can I set it ready to be merged?
Indeed, no need for a new issue. This one is the issue 🤣 Thank you! Can I set it ready to be merged?
I have set it ready to merge. I have finished the check, and only the emoji in writing-tool seems with no code entity.
@Tudor44 awesome, thank you very much
Hello,
I notify this error on building locally the repo using the command
mkdocs build