-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Doc build failure - unicode error in generate_example_rst #1897
Conversation
Thanks @takluyver, is the solution to fix the encoding, or is it more tricky than that? If it is a trivial fix, would you be willing to submit a PR? It'd be really nice to get this fixed for v1.3, but I've not put this under the Cheers, |
All of the matplotlib source files are utf-8 encoded (when not ascii), so I think it's fine to just hardcode the encoding as utf-8 here. I'll attach a PR shortly, and then maybe @takluyver, you could confirm it works in the Launchpad environment? I'm re-milestoning this as 1.2.x, since the bug exists there, too. |
Should be fine to hardcode the encoding (the code already does for Python 3, but the docs are built in 2.7). I'm happy to test in Launchpad, but AFAIK that's only possible once it's been merged. In the meantime, I can replicate the failure locally by setting |
As for milestoning -- I'm putting this back on |
👍 LGTG once @takluyver's tested. |
Yep, seems to do the trick. I haven't got time now to run the whole docs build, but it gets past where it was failing before. |
Ping - I think this can be merged, if you're happy with it. |
I still get failures:
But the problem being described is certainly fixed by this change, so I'm going to go ahead and merge. @mdboom - I'm guessing you're able to build the docs without a hitch? |
Fix documentation build failure (unicode error in generate_example_rst)
Launchpad builds are working again, and I've switched it back to daily builds: https://code.launchpad.net/~takluyver/+recipe/matplotlib-daily |
Lovely. Thanks @takluyver. Is there a link to the documentation which is part of the build, I can't find it for some reason. |
It doesn't actually publish the resulting documentation on the web, but it makes a Debian package from it, which you can install on Debian-based systems or unpack with an archive tool on other systems. The package itself doesn't have a stable URL (the latest version is here), but it's always accessible from this page. Mostly I just look out for e-mails saying that it failed, though. I can't see a way for other people to subscribe to those e-mails, but I've posted a question to see if that's possible. |
On Python 2,
io.open()
is called without an encoding argument. The default encoding it uses depends on the locale, so on Launchpad buildbots using the C locale, the default encoding is ASCII, and it chokes on any non-ascii character.(This platform-dependent default is really annoying for anything cross platform, but it's part of the tension between Python as a serious application language and Python as a quick scripting language)
Buildlog: https://launchpadlibrarian.net/137176232/buildlog_ubuntu-raring-i386.matplotlib_1.2.0~1%2B6540%2B23~raring1_FAILEDTOBUILD.txt.gz