-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Provide context for error: "pandoc.exe: Cannot decode byte" #8884
Comments
#4765 was intended to fix this, but there may still be some pathways where the context isn't provided. |
I upgraded to the latest pandoc version, 3.1.2 for Windows, but still the same error, which I've described in more detail in the SO post, https://stackoverflow.com/questions/76366976/quarto-pandoc-cant-find-source-of-pandoc-error-pandoc-exe-cannot-decode To help track this down, I've made my repo public, at https://github.com/friendly/Vis-MLM-quarto I'll try to prepare a smaller version for testing, but I'm not quite sure how. I try to compile the book from within RStudio. |
There's a lot of quarto going on here. I would report this to them first, if none of your source files contain illegal UTF-8. |
I did report this also to the quarto folks: We'll see if anything turns up there. |
Quarto folks unable to help track this down. Are there any pandoc options (e.g., |
I finally found the source of this error -- a bib file outside my project that was imported and not checked. Yet, it took me over 2 days, and could have been avoided if pandoc returned filename and file location information in its error message. Hence, I'm requesting this enhancement Enhancement: pandoc should return in the error message the name of the file and the location (line number) where such non-UTF-8 characters are found. |
This would be readBibtexString Bibtex locale idpred . UTF8.toText $ raw at ln. 250 of T.P.Citeproc.hs. Since getRefs is called by getRefsFromBib, which has the filename, it would be feasible to trap the error and give filename information here. |
Wonderful! Thank you so much. |
This is like `Text.Pandoc.UTF8.toText`, except: - it takes a file path as first argument, in addition to bytestring contents - it raises an informative error with source position if the contents are not UTF8-encoded [API change] This replaces `utf8ToText` in `Text.Pandoc.App.Input`. See #8884.
Many thanks for this! |
In this StackOverflow post I describe a problem with pandoc (v. 2.19.2) under quarto (v. 1.1.189)
where I get this error,
and have been persistently unable to find the location in my files where this might occur. The problem is that the error message provides no help in finding the source of this error.
Request:
pandoc
should return in the error message the name of the file and the location (line number) where such non-UTF-8 characters are found.pandoc
to signal a warning rather than an error when such non-UTF-8 characters are found? What problems could arise from this?The text was updated successfully, but these errors were encountered: