Skip to content
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

tachyon syntax error when building doc #28971

Closed
jfraymond opened this issue Jan 8, 2020 · 13 comments
Closed

tachyon syntax error when building doc #28971

jfraymond opened this issue Jan 8, 2020 · 13 comments

Comments

@jfraymond
Copy link

When building the documentation on a system

  • whose locale uses commas as a decimal separator (in the tested case LC_NUMERIC="fr_FR.UTF-8"); and
  • where jmol is not available (for instance if java is not installed),

tachyon, which is used to produced images of 3d objects for the documentation when jmol is not available, returns a syntax error. The error is caused by the presence of float numbers with commas (instead of dots) in the input string of tachyon. Curiously this bug seems to only happen when building the doc. See https://groups.google.com/forum/#!topic/sage-devel/peTGEjzS2eA .

This ticket fixes the bug by setting the locale before producing plots for the documentation.

Component: documentation

Keywords: tachyon syntax error locale documentation

Author: Jean-Florent Raymond

Branch/Commit: 31beb0e

Reviewer: Peter Bruin

Issue created by migration from https://trac.sagemath.org/ticket/28971

@jfraymond jfraymond added this to the sage-9.1 milestone Jan 8, 2020
@jfraymond
Copy link
Author

@jfraymond
Copy link
Author

Commit: e06dffc

@jfraymond
Copy link
Author

Author: Jean-Florent Raymond

@Konrad127123
Copy link

comment:4

Could this have issues if the en_US.UTF-8 locale is unavailable? Would it be better to set LC_ALL=C?

@jfraymond
Copy link
Author

comment:5

Yes, you are right.
I fixed it in a new commit (I set LC_NUMERIC to 'C'). No problem building the documentation on my system after this change.


New commits:

31beb0eSet LC_NUMERIC locale to 'C' before producing plots for the doc

@jfraymond
Copy link
Author

Changed commit from e06dffc to 31beb0e

@embray
Copy link
Contributor

embray commented Jan 21, 2020

comment:6

Can this problem be reproduced outside the doc build? Or is it a more general problem? I think it seems strange to try to fix this just in the doc build.

@embray
Copy link
Contributor

embray commented Jan 21, 2020

comment:7

Replying to @embray:

Can this problem be reproduced outside the doc build? Or is it a more general problem? I think it seems strange to try to fix this just in the doc build.

Answering my own question: I can't seem to reproduce the problem outside the docbuild, even after confirming that I have os.environ['LC_NUMERIC'] == 'fr_FR.UTF-8'. The question though is why?

@jfraymond
Copy link
Author

comment:8

I did not manage to reproduce it outside of the doc build. When I execute in sage exactly the same commands as those used to produce plots for the doc, no problem occurs.

@pjbruin
Copy link
Contributor

pjbruin commented Mar 30, 2020

comment:9

I got this error while building the documentation (using the locale nl_NL.utf8; Dutch also uses commas as decimal separator) and this ticket fixes it.

@pjbruin
Copy link
Contributor

pjbruin commented Mar 30, 2020

Reviewer: Peter Bruin

@vbraun
Copy link
Member

vbraun commented Apr 15, 2020

@vbraun
Copy link
Member

vbraun commented Apr 16, 2020

Changed branch from u/gh-jfraymond/locale-when-building-doc to 31beb0e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants