Re: [sage-devel] UnicodeDecodeError while compiling cython with %runfile

2017-07-10 Thread Vincent Delecroix

On 10/07/2017 15:27, Jeroen Demeyer wrote:
I am starting to lose my patience with people posting bug reports and 
omitting the most important part, like the log file or traceback.


Anyway, I'm guessing this might be 
https://github.com/ipython/ipython/pull/10692


looks like it

If you would have posted the traceback instead of "...", I could 
actually know for sure.

here it is

UnicodeDecodeErrorTraceback (most recent call last)
/opt/sage/local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc 
in run_code(self, code_obj, result)

   2896 if result is not None:
   2897 result.error_in_exec = sys.exc_info()[1]
-> 2898 self.showtraceback()
   2899 else:
   2900 outflag = 0

/opt/sage/local/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc 
in showtraceback(self, exc_tuple, filename, tb_offset, exception_only)

   1822 except Exception:
   1823 stb = 
self.InteractiveTB.structured_traceback(etype,
-> 1824 value, tb, 
tb_offset=tb_offset)

   1825
   1826 self._showtraceback(etype, value, stb)

/opt/sage/local/lib/python2.7/site-packages/IPython/core/ultratb.pyc in 
structured_traceback(self, etype, value, tb, tb_offset, 
number_of_lines_of_context)

   1404 self.tb = tb
   1405 return FormattedTB.structured_traceback(
-> 1406 self, etype, value, tb, tb_offset, 
number_of_lines_of_context)

   1407
   1408

/opt/sage/local/lib/python2.7/site-packages/IPython/core/ultratb.pyc in 
structured_traceback(self, etype, value, tb, tb_offset, 
number_of_lines_of_context)

   1312 # Verbose modes need a full traceback
   1313 return VerboseTB.structured_traceback(
-> 1314 self, etype, value, tb, tb_offset, 
number_of_lines_of_context

   1315 )
   1316 else:

/opt/sage/local/lib/python2.7/site-packages/IPython/core/ultratb.pyc in 
structured_traceback(self, etype, evalue, etb, tb_offset, 
number_of_lines_of_context)

   1162
   1163 formatted_exception = 
self.format_exception_as_a_whole(etype, evalue, etb, 
number_of_lines_of_context,
-> 1164 
tb_offset)

   1165
   1166 colors = self.Colors  # just a shorthand + quicker name 
lookup


/opt/sage/local/lib/python2.7/site-packages/IPython/core/ultratb.pyc in 
format_exception_as_a_whole(self, etype, evalue, etb, 
number_of_lines_of_context, tb_offset)

    return ""
   1112
-> 1113 last_unique, recursion_repeat = 
find_recursion(orig_etype, evalue, records)

   1114
   1115 frames = self.format_records(records, last_unique, 
recursion_repeat)


/opt/sage/local/lib/python2.7/site-packages/IPython/core/ultratb.pyc in 
find_recursion(etype, value, records)
453 # quarter of the traceback (250 frames by default) is 
repeats, and find the

454 # first frame (from in to out) that looks different.
--> 455 if not is_recursion_error(etype, value, records):
456 return len(records), 0
457

/opt/sage/local/lib/python2.7/site-packages/IPython/core/ultratb.pyc in 
is_recursion_error(etype, value, records)

439 # a recursion error.
440 return (etype is recursion_error_type) \
--> 441and "recursion" in str(value).lower() \
442and len(records) > 500
443

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 
868: ordinal not in range(128)


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] UnicodeDecodeError while compiling cython with %runfile

2017-07-10 Thread Jeroen Demeyer
I am starting to lose my patience with people posting bug reports and 
omitting the most important part, like the log file or traceback.


Anyway, I'm guessing this might be 
https://github.com/ipython/ipython/pull/10692


If you would have posted the traceback instead of "...", I could 
actually know for sure.


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] UnicodeDecodeError while compiling cython with %runfile

2017-07-10 Thread John Cremona
On 10 July 2017 at 14:14, Vincent Delecroix <20100.delecr...@gmail.com> wrote:
> Dear all,
>
> I am stuck with compiling a single cython file that contains the one line
>
> from sage.libs.ntl.ntl_ZZX cimport ntl_ZZX
>
> If such line is saved into toto.pyx then from the console I got
>
> sage: %runfile toto.pyx
> Compiling ./toto.pyx...
> Traceback (most recent call last)
> ...
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 816:
> ordinal not in range(128)
>
> The traceback is only about IPython related stuff.
>
> Can somebody check whether this is reproducible? Is there a way to get a
> less obscure error and traceback?

I tried this and got

RuntimeError: Error compiling ./toto.pyx:
running build
running build_ext
building '_home_jec_toto_pyx_0' extension
creating build
creating build/temp.linux-x86_64-2.7
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wno-unused -fPIC -I/usr/local/sage/sage-2/local/include
-I/usr/local/sage/sage-2/local/include/python2.7
-I/usr/local/sage/sage-2/local/lib/python2.7/site-packages/numpy/core/include
-I/usr/local/sage/sage-2/local/lib/python2.7/site-packages
-I/usr/local/sage/sage-2/local/lib/python2.7/site-packages/sage/ext
-I/usr/local/sage/sage-2/local/lib/python2.7/site-packages/cysignals
-I. -I/usr/local/sage/sage-2/local/include/python2.7 -c
_home_jec_toto_pyx_0.c -o
build/temp.linux-x86_64-2.7/_home_jec_toto_pyx_0.o -w -O2

_home_jec_toto_pyx_0.c:816:15: fatal error: new: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

This is with gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

John

>
> Thanks
> Vincent
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] UnicodeDecodeError while compiling cython with %runfile

2017-07-10 Thread Vincent Delecroix

Dear all,

I am stuck with compiling a single cython file that contains the one line

from sage.libs.ntl.ntl_ZZX cimport ntl_ZZX

If such line is saved into toto.pyx then from the console I got

sage: %runfile toto.pyx
Compiling ./toto.pyx...
Traceback (most recent call last)
...
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 
816: ordinal not in range(128)


The traceback is only about IPython related stuff.

Can somebody check whether this is reproducible? Is there a way to get a 
less obscure error and traceback?


Thanks
Vincent

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.