-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
mkdocs.yml parsing error with !!
in format: !!python/name:pymdownx.superfences.fence_div_format
#6889
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
Comments
Is this valid in YAML? We are parsing the
|
I feared as much... The |
I asked now on facelessuser/pymdown-extensions#892 if there is a way around the With |
The same issue was also "reported" on https://stackoverflow.com/questions/59246344/are-explicit-tags-in-mkdocs-config-supported-in-readthedocs. |
Although, I think the problem is that RTD can't find the tag referenced ( |
Oh, another plot-twist. 😄 |
facelessuser/pymdown-extensions#892 (comment) said there is no way around the |
OK! I took a look at this and I understand the problem. I had no idea what was the For example, using !! here we can cast the
Using
So, I think the problem is that we are parsing your file before installing all the dependencies of your project, and so, Python can't find the module and it fails. The solution, should be to try to load your YAML configuration file skipping these calls to |
Thank you very much, @humitos! |
Thank you for the quick fix, @ericholscher and @humitos! In case it should already work, I still get the same error message in https://readthedocs.org/projects/qownnotes/builds/10854620/:
https://github.com/pbek/QOwnNotes/blob/develop/docs/mkdocs.yml#L85 |
@pbek It's not deployed yet, but I suppose it will go out next week. |
Ok, great. Thank you! |
If I try to enable the setting now I get new errors:
|
I'd like to bump this issue, as I am getting the same error. When I inspect the resulting mkdocs.yml, after it has been parsed on your end, the configuration looks like this:
The |
My first thought was that Since ReadTheDocs is already running the repository's install scripts, there's probably no additional vulnerability that could be caused by the "unsafe" Would it be possible to parse |
This happens under different environments. The parsing of the Please, see the PR linked in this issue (#6897). If you have a proposal to make this work while keeping it safe, let me know. |
Ah okay, that makes sense. So you need to safely load the yaml outside the container and take a "first pass" over the configuration in Would it make sense to expand these 2 steps into a process of:
Perhaps something like |
Taking a look at readthedocs.org/readthedocs/projects/tasks.py Lines 1172 to 1181 in a6b60be
This # Environment used for building code, usually with Docker
with self.build_env:
# ........
outcomes = self.build_docs() In that case, I think it would be okay to directly modify the Edit: I see that |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
An update here, we are not 100% if this change would be safe, that's why we haven't merged that PR yet. |
Closing this in favor of #7461 |
Thank you very much for this wonderful service, it makes my life at documenting on https://docs.qownnotes.org/ so much easier!
Details
Expected Result
Being able to use
!!python/name:pymdownx.superfences.fence_div_format
inmkdocs.yml
, like it works when building with MkDocs locally.Actual Result
I get a parsing error in https://github.com/pbek/QOwnNotes/blob/develop/docs/mkdocs.yml#L85 at the
!!
(I've now commented the line out).Your mkdocs.yml could not be loaded, possibly due to a syntax error (line 84, column 19)
.Thank you very much.
The text was updated successfully, but these errors were encountered: