"Disabling color" error/info

74 views
Skip to first unread message

kcrisman

unread,
Mar 21, 2022, 10:23:27 AM3/21/22
to sage-cell
Hi all,

I got an interesting and new (to me) error today.

"INFO: Disabling color, you really want to install colorlog. "


I couldn't even get the result here without using "print()", so maybe something has changed in Sage/Sage cell regarding Cython usage, so my apologies if this is user error.  But thought it should be reported, at least, since I couldn't find that error in a search of the sage-cell Google group.

- kcrisman

Jorge Garcia

unread,
Mar 21, 2022, 10:41:01 AM3/21/22
to kcrisman, sage-cell
Hi Kcrisman,
It seems to be something to do with %%cython because removing that line allows you to run the last line with print(), show() or even without either. With %%cython the output only works with print() and is actually slower?
HTH,
A. Jorge Garcia
Applied Math & CS
Nassau Community College

--
You received this message because you are subscribed to the Google Groups "sage-cell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-cell+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cell/7f955fb5-3a9e-4d46-8f58-bc4b841b3e21n%40googlegroups.com.

Andrey Novoseltsev

unread,
Mar 21, 2022, 12:09:27 PM3/21/22
to sage-cell
It seems like an info message rather than error and the command proceeds. Do you want the message to be gone, or you actually need some colors?

As for using print etc, did it use to behave differently? When?

SageMathCell does not do any special handling for Cython - your command is fed into Jupyter kernel for Python, which then processes the magic command. So at the moment I think that things work as expected, but if something else is highly desired, we may try to work on it.

Andrey

Andrey Novoseltsev

unread,
Mar 21, 2022, 12:14:09 PM3/21/22
to sage-cell
I've just tried it in CoCalc Jupyter notebook - you have to have explicit print command there. I am strongly in favour of maintaining this consistency, when it results from doing nothing on SageMathCell side. Such an approach results in fewer problems down the road ;-)

kcrisman

unread,
Mar 21, 2022, 1:12:23 PM3/21/22
to sage-cell
On Monday, 21 March 2022 at 10:09:27 UTC-6 Andrey Novoseltsev wrote:
It seems like an info message rather than error and the command proceeds. Do you want the message to be gone, or you actually need some colors?

I guess first I want to know why the message is printing at all.  As far as I can tell, the code isn't asking for any colors.  But I don't want it to be gone if there is some good reason for it to be there.  Even this code asks for the colors at sagecell.sagemath.org, so maybe there is some syntax highlighting it's complaining about:

%%cython
print(2+2)

 

As for using print etc, did it use to behave differently? When?

I think the problem is that I had it in a separate cell in the Jupyter notebook, but of course there is no such thing in the Sage cell server tool (as opposed to e.g. with linked cells as at https://more-sagemath-tutorials.readthedocs.io/en/latest/demo-cython.html).  So that is probably not really a bug, but it is behavior I wasn't aware of since I ordinarily would not have put them in the same cell and only had to at sage cell.sagemath.org for the obvious reason.

> I've just tried it in CoCalc Jupyter notebook - you have to have explicit print command there. I am strongly in favour of maintaining this consistency, when it results from doing nothing on SageMathCell side. Such an approach results in fewer problems down the road ;-)

Indeed!

Andrey Novoseltsev

unread,
Apr 11, 2022, 1:42:24 PM4/11/22
to sage-cell
I've got a bit sidetracked with printing, but regarding the colors and complaining about a missing dependency - it worked to install it. No idea how exactly it is used, perhaps just imported somewhere "just in case", but that info message is now gone.
Reply all
Reply to author
Forward
0 new messages