Re: [sage-devel] Problem with mercurial-2.2.2.p0

81 views
Skip to first unread message

Dan Drake

unread,
Oct 5, 2012, 1:56:15 PM10/5/12
to sage-...@googlegroups.com
On Fri, 05 Oct 2012 at 10:32AM -0700, Aleksandar Markovic wrote:
> SyntaxError: Non-ASCII character '\xc3' in file
> /home/aleksandar/Téléchargements/sage-5.3/local/bin/hg on line 1, but
> no encoding declared; see http://www.python.org/peps/pep-0263.html for
> details

Mercurial is complaining because the non-ASCII characters in the
pathname are not allowed unless an encoding is declared. This seems to
be a problem with either Mercurial or our installation procedure.

As a temporary workaround, you could build Sage in a directory whose
full name has only ASCII characters.

Dan

--
--- Dan Drake
----- http://math.pugetsound.edu/~ddrake
-------
signature.asc

Aleksandar Markovic

unread,
Oct 5, 2012, 2:40:36 PM10/5/12
to sage-...@googlegroups.com, ddr...@pugetsound.edu
Thanks. It seems to work. I forgot those stupid french 'é' and 'è'!

Aleks

Jeroen Demeyer

unread,
Oct 5, 2012, 2:46:45 PM10/5/12
to sage-...@googlegroups.com
On 2012-10-05 19:56, Dan Drake wrote:
> On Fri, 05 Oct 2012 at 10:32AM -0700, Aleksandar Markovic wrote:
>> SyntaxError: Non-ASCII character '\xc3' in file
>> /home/aleksandar/T�l�chargements/sage-5.3/local/bin/hg on line 1, but
>> no encoding declared; see http://www.python.org/peps/pep-0263.html for
>> details
>
> Mercurial is complaining because the non-ASCII characters in the
> pathname are not allowed unless an encoding is declared. This seems to
> be a problem with either Mercurial or our installation procedure.
I'd say it's a problem with Python.

Volker Braun

unread,
Oct 5, 2012, 5:51:46 PM10/5/12
to sage-...@googlegroups.com
Maybe time to upgrade to Python 3? Much improved unicode seems to be one of the major selling points...


On Friday, October 5, 2012 7:46:56 PM UTC+1, Jeroen Demeyer wrote:
On 2012-10-05 19:56, Dan Drake wrote:
> On Fri, 05 Oct 2012 at 10:32AM -0700, Aleksandar Markovic wrote:
>> SyntaxError: Non-ASCII character '\xc3' in file
>> /home/aleksandar/T�l�chargements/sage-5.3/local/bin/hg on line 1, but

Dan Drake

unread,
Oct 5, 2012, 5:59:42 PM10/5/12
to sage-...@googlegroups.com
On Fri, 05 Oct 2012 at 08:46PM +0200, Jeroen Demeyer wrote:
> I'd say it's a problem with Python.

Python works fine with non-ASCII characters -- if you declare the
encoding. I suppose you could say that needing to declare the encoding
is the problem, but then Python would have to figure out the encoding
automatically, and that way madness lies. (Although assuming UTF-8 when
it's not ASCII seems like a good start. Is that what Python 3 does?)

Someone (us? Mercurial people?) need to get an encoding line into those
source files.
signature.asc

Jean-Pierre Flori

unread,
Oct 5, 2012, 7:39:15 PM10/5/12
to sage-...@googlegroups.com
I got similar problems for a long time, I just don't build Sage in folders whose names contain accents :)

On Friday, October 5, 2012 7:32:50 PM UTC+2, Aleksandar Markovic wrote:
Hi,

I am trying to install sage from source (since from binary it does not work), and I have a problem with mercurial-2.2.2.p0. I am working on fedora 17, on an Asus Ul-something.
 
Here is the last part of the installation:
SyntaxError: Non-ASCII character '\xc3' in file /home/aleksandar/Téléchargements/sage-5.3/local/bin/hg on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
Mercurial installed correctly, but doesn't seem to work properly.
Running 'hg log' in the directory /home/aleksandar/Téléchargements/sage-5.3/spkg/build/mercurial-2.2.2.p0 failed.

real        0m9.022s
user        0m7.545s
sys        0m0.896s
************************************************************************
Error installing package mercurial-2.2.2.p0
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
  /home/aleksandar/Téléchargements/sage-5.3/spkg/logs/mercurial-2.2.2.p0.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/aleksandar/Téléchargements/sage-5.3/spkg/build/mercurial-2.2.2.p0 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd '/home/aleksandar/Téléchargements/sage-5.3/spkg/build/mercurial-2.2.2.p0' && '/home/aleksandar/Téléchargements/sage-5.3/sage' -sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************
make[1]: *** [installed/mercurial-2.2.2.p0] Erreur 1

I also tried to install mercurial apart, but it is not the same version.

Thanks.

Aleksandar

Jeroen Demeyer

unread,
Oct 6, 2012, 5:17:00 AM10/6/12
to sage-...@googlegroups.com
On 2012-10-05 23:59, Dan Drake wrote:
> Someone (us? Mercurial people?) need to get an encoding line into those
> source files.
I think it's quite a challenge to get an encoding in the file *before*
the #! line.
Reply all
Reply to author
Forward
0 new messages