Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

parser: multiple warning messages due to missing visit_document() method #177

Closed
drrosa opened this issue Oct 3, 2019 · 5 comments
Closed

Comments

@drrosa
Copy link

drrosa commented Oct 3, 2019

We are seeing a lot of warnings like the following for every .md document:
.../python3.6/site-packages/recommonmark/parser.py:75: UserWarning: Container node skipped: type=document

It looks like def default_depart(self, mdnode) generates a warning for every container node of type document because the method visit_document does not exist?

PR #106 addresses part of this issue by providing useful debug info, but the warnings are still getting generated.

@jpmckinney
Copy link

jpmckinney commented Nov 19, 2019

I'm using Sphinx programmatically, so I created a subclass:

class CustomCommonMarkParser(CommonMarkParser):
    def visit_document(self, node):
        pass

and then later (I need to not add 'recommonmark' to the extensions config):

app.add_source_suffix('.md', 'markdown')
app.add_source_parser(CustomCommonMarkParser)

drrosa added a commit to drrosa/zulip that referenced this issue Nov 30, 2019
Temporary workaround to remove multiple
"UserWarning: Container node skipped: type=document"
caused by upstream bug readthedocs/recommonmark#177.

Addresses zulip#13263.
@drrosa
Copy link
Author

drrosa commented Nov 30, 2019

@jpmckinney Thanks for sharing a workaround to this issue!

timabbott pushed a commit to zulip/zulip that referenced this issue Dec 3, 2019
Temporary workaround to remove multiple
"UserWarning: Container node skipped: type=document"
caused by upstream bug readthedocs/recommonmark#177.

Addresses #13263.
blevenson pushed a commit to blevenson/zulip that referenced this issue Dec 8, 2019
Temporary workaround to remove multiple
"UserWarning: Container node skipped: type=document"
caused by upstream bug readthedocs/recommonmark#177.

Addresses zulip#13263.
bongjlee pushed a commit to bongjlee/zulip that referenced this issue Dec 9, 2019
Temporary workaround to remove multiple
"UserWarning: Container node skipped: type=document"
caused by upstream bug readthedocs/recommonmark#177.

Addresses zulip#13263.
YashRE42 pushed a commit to YashRE42/zulip that referenced this issue Dec 12, 2019
Temporary workaround to remove multiple
"UserWarning: Container node skipped: type=document"
caused by upstream bug readthedocs/recommonmark#177.

Addresses zulip#13263.
YashRE42 pushed a commit to YashRE42/zulip that referenced this issue Dec 25, 2019
Temporary workaround to remove multiple
"UserWarning: Container node skipped: type=document"
caused by upstream bug readthedocs/recommonmark#177.

Addresses zulip#13263.
@abhilash1in
Copy link

I'm still seeing this warning with recommonmark 0.6.0

@joe7575
Copy link

joe7575 commented Sep 1, 2020

I'm still seeing this warning with recommonmark 0.6.0

The same with me.

...\site-packages\recommonmark\parser.py:75: UserWarning: Container node skipped: type=document

@bmxp
Copy link

bmxp commented Jan 3, 2021

I still got the same warning in version 0.7.1.
@ericholscher Could you please add

    def visit_document(self, mdnode):
        pass

to parser.py or are there arguments against it?

ezra-en added a commit to BuildTheEarth/docs that referenced this issue Apr 12, 2021
klihub added a commit to klihub/cri-resource-manager that referenced this issue Nov 17, 2021
An unfixed upstream recommonmark bug causes warnings during
'make site-build'/sphinx doc generation. These warnings are
treated as errors in github actions, so they can break test
builds of recent PRs. Fix this by switching to MyST-Parser.

See readthedocs/recommonmark#177
for a miminal explanation of the bug.
See readthedocs/recommonmark#221
for background information on recommon
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants