Closed kylefoley76 closed 2 months ago
I guess you mean the assert here? https://github.com/tatuylonen/wikitextprocessor/blob/edd475d7850ed85021454d577920b0ba9914c5fc/src/wikitextprocessor/parser.py#L2285
as the comment says Wtp.start_page()
must be called, I'll update the usage document.
The example code is updated: https://github.com/tatuylonen/wikitextprocessor/commit/60ae2cb1cb28afa2170572111ceec9495266538d
This seems to be answered, so I'll close this for now.
I'm using python 3.11. I've run the unit tests and they worked with output Ran 925 tests in 16.480s OK
I'm now using the API as posted in the README section the first few lines of which is:
When my code executes the following function, the assertion throws an error:
I tried to track down the source of the error and the following appears to be the culprit: at line 827 of core.py we find line:
text = TEMPLATES_RE.sub(repl_templ, text)
The first text my code comes across of which the first 100 characters is:
and the TEMPLATES_RE code is as follows:
The above code has me stumped, I haven't worked with code that complicated before. In any case, my output is:
The inhibits the code from finding a title and leads to the assertion error.