Ask Your Question
1

jupyterlab bug with interact-slider?

asked 2022-07-06 13:05:27 +0200

rrogers gravatar image

updated 2022-07-06 14:16:47 +0200

Is this my build or a bug?
The slider works in jupyter but not in my jupyterlab.
Code, cribbed from 'test_display.ipynb' https://nbviewer.org/github/egourgoul...

%display latex 
version()

--

@interact
def _(a = slider([1..10]),
          color=Color('red'),
          axes=checkbox(True, 'Show axes'),
          x_label=input_box('$x$', 'x-label', str),
          y_label=input_box('$y$', 'y-label', str)):
          viewer='threejs'
          axes_labels = [x_label, y_label] if axes else None
          show(plot(cos(a*x), (x, 0, 2*pi), color=color, thickness=2),
          axes=axes, axes_labels=axes_labels)

Ubuntu Mate 22.04
Kernel Linux 5.15.0-40-generic x86_64
Processor: AMD A4-3300 APU with Radeon(tm) HD Graphics × 2
Compiled -- I still have the logs and such
There are some old online references to a similar problem, but I thought they were fixed.
I do like JupyterLab, but I also like sliders/buttons/widgets :)

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2022-07-08 18:17:52 +0200

rrogers gravatar image

Fresh build of sagemath 9.7 beta3 works! For the above "bug" program and for my "use case" demo/program.

edit flag offensive delete link more
1

answered 2022-07-06 16:08:27 +0200

ortollj gravatar image

updated 2022-07-06 18:00:40 +0200

Hi

I suppose there is something wrong for you because for me the code is ok with JupyterLab. what is your SageMath version ? (sorry this is not really an answer but I can't input image in a comment) my Jupyter version is : 2.2.10,W11,Ubuntu 20.04 in WSL2,SageMath 9.5 Firefox 102.0 (64-bit)

ortollj@DESKTOP-K30FLRP:~$ cat /proc/version
Linux version 4.19.128-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Tue Jun 23 12:58:10 UTC 2020
ortollj@DESKTOP-K30FLRP:~$

AMD Ryzen 9 3950X 16-Core Processor 3.50 GHz

 code in Jupyter Lab

edit flag offensive delete link more

Comments

1

sage 9.6 -- jupyterlab Version3.4.3 . Since jupyter itself works, I won't delineate it :) Since I couldn't read your picture, I tried "%display plain", didn't help (: I do have a program that uses a lot of widgets; just tried it. jupyter works (sliders/buttons) with both "%display" plain and latex, but jupyterlab only puts output up, and I am not sure if that's even a 'widget" ; it just descriptive text to a plot.

rrogers gravatar imagerrogers ( 2022-07-06 23:40:57 +0200 )edit

Do you have any error messages? and if so, which ones?

ortollj gravatar imageortollj ( 2022-07-08 07:38:29 +0200 )edit

nope--but it had(has) a problem with nodejs; but ... see my answer :) I suppose I could do a _complete_ scrub of 9.6 and try again; but I have tried many times to clarify the problem; not really knowing whether that was causing the interact failure.

rrogers gravatar imagerrogers ( 2022-07-08 18:17:41 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-07-06 13:05:27 +0200

Seen: 325 times

Last updated: Jul 08 '22