Opened 10 years ago

Closed 10 years ago

#13939 closed defect (duplicate)

Fix the "SyntaxError: Non-ASCII character '\xe2'"

Reported by: vbraun Owned by: jason, ncohen, rlm
Priority: blocker Milestone: sage-duplicate/invalid/wontfix
Component: graph theory Keywords:
Cc: Merged in:
Authors: Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


There is a non-ascii character that messes up doctests for some:

File "/mnt/storage2TB/patchbot/Sage/sage-5.6.beta3/devel/sage/sage/graphs/generators/", line 2870:
    sage: graphs.TutteCoxeterGraph(embedding=3)
    Traceback (most recent call last):
    ValueError: The value of embedding must be 1 or 2.
    Traceback (most recent call last):
      File "/mnt/storage2TB/patchbot/Sage/sage-5.6.beta3/local/bin/", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/mnt/storage2TB/patchbot/Sage/sage-5.6.beta3/local/bin/", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/mnt/storage2TB/patchbot/Sage/sage-5.6.beta3/local/bin/", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_42[9]>", line 1, in <module>
        graphs.TutteCoxeterGraph(embedding=Integer(3))###line 2870:
    sage: graphs.TutteCoxeterGraph(embedding=3)
      File "lazy_import.pyx", line 212, in sage.misc.lazy_import.LazyImport.__getattr__ (sage/misc/lazy_import.c:1865)
      File "lazy_import.pyx", line 148, in sage.misc.lazy_import.LazyImport._get_object (sage/misc/lazy_import.c:1268)
      File "/mnt/storage2TB/patchbot/Sage/sage-5.6.beta3/local/lib/python/site-packages/sage/graphs/", line 291, in <module>
        class GraphGenerators():
      File "/mnt/storage2TB/patchbot/Sage/sage-5.6.beta3/local/lib/python/site-packages/sage/graphs/", line 938, in GraphGenerators
        import sage.graphs.generators.smallgraphs
      File "/mnt/storage2TB/patchbot/Sage/sage-5.6.beta3/local/lib/python/site-packages/sage/graphs/generators/", line 1132
    SyntaxError: Non-ASCII character '\xc3' in file /mnt/storage2TB/patchbot/Sage/sage-5.6.beta3/local/lib/python/site-packages/sage/graphs/generators/ on line 1133, but no encoding declared; see for details

Attachments (1)

trac_13939_fix_encoding.patch (518 bytes) - added by vbraun 10 years ago.
Initial patch

Download all attachments as: .zip

Change History (6)

comment:1 Changed 10 years ago by vbraun

This comes from here btw:

def DurerGraph():
    Returns the Dürer graph.

I propose we just switch to UTF-8 encoding and accept the fact that there are non-English names.

Changed 10 years ago by vbraun

Initial patch

comment:2 Changed 10 years ago by vbraun

Authors: Volker Braun
Priority: majorblocker

comment:3 Changed 10 years ago by ncohen

Status: newneeds_review

comment:4 Changed 10 years ago by ncohen

Authors: Volker Braun
Milestone: sage-5.6sage-duplicate/invalid/wontfix
Status: needs_reviewpositive_review

Duplicate of #13936

I remove the author's field because of Jeroen's email from this morning :-P


comment:5 Changed 10 years ago by jdemeyer

Resolution: duplicate
Reviewers: Volker Braun
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.