-
Notifications
You must be signed in to change notification settings - Fork 53
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
Error parsing xhtml: Unexpected character \'>\' (code 62) expected \'=\'\\n #92
Comments
Mediawiki format is similar but not the same as Markdown, so I don't think I would expect that to work. Why are you not uploading the original markdown using md2cf? |
Because it throws the same error as i described in the issue. b'{"statusCode":400,"data":{"authorized":false,"valid":true,"allowedInReadOnlyMode":true,"errors":[],"successful":false},"message":"Error parsing xhtml: Unexpected character Is there a way to read the xthml file it generates during the process? |
This sounds a bit like the problem I had in #81 - I wonder if you have some image alt text with an angle bracket or quote mark in it, which seems to cause the MD->HTML conversion lib Mistune to produce broken XHTML. You get more debug information if you add the If you want to see what's in the HTML when it's breaking, you might want to add to after line 440 (after where it says You also might like to try my branch that has an updated version of Mistune https://github.com/alphagov/md2cf/tree/upgrade-mistune. |
Thanks for the swift response. I tried your branch but I get the same error and i tried using debug and pasting the response below. Can you point out exactly where I can put the debugger trace? `─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ 📄️ deploy_openstack ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ Error while uploading Total progress ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 400 Client Error: for url: https://oneconfluence.verizon.com/rest/api/content - |
Heh, I forgot to give you the file name didn't I, it's |
Upon debugging, found out the issue was with the character '>'. Seems the tool wasn't able to differentiate it as xhtml also has similar characters. Thank you for your inputs. Maybe this is something that can be fixed in the mistune. You can close the issue and consider it resolved. Thanks once again! |
I have a markdown file and I convert it into a mediawiki format using pypandoc and then use md2cf to upload to confluence. However, I'm facing the issue ( pasted in subject ) everytime i try to run the code.
Can you help me in pointing out what could be happening?
Unfortunately, the file that i'm trying to convert is a proprietary document and i can't share it here.
The text was updated successfully, but these errors were encountered: