Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
10.94k stars 775 forks source link

BUG-Slider multi-selection is broken when running as root #781

Closed gbritoda closed 7 months ago

gbritoda commented 7 months ago

Description While running TaiPy on WSL (Ubuntu), the Slider does not work with Multi Selection when it is run as root. Works fine with regular user

How to reproduce That is my main.py file. Run it with python3 main.py then sudo python3 main.py

The sliders also behave differently. I've also seen a similar behaviour with the menu control but haven't documented it yet.

from taipy.gui import Gui

selection = ["3","5"]

page = """
Multiple selection

<|{selection}|slider|lov=1;2;3;4;5;6;7;8;9;10|>

"""

Gui(page).run()

image image

Expected behavior Expected to have the multiple sliders, even when running as root. But that doesn't seem to happen

Runtime environment Taipy:

taipy @ git+https://github.com/Avaiga/taipy.git@7518e798d48289a9017faa93b10002361f946490
taipy-config==3.0.0
taipy-core==3.0.0
taipy-gui==3.0.0
taipy-rest==3.0.0
taipy-templates==3.0.0

WSL Versions: 5.15.133.1-microsoft-standard-WSL2

PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
FlorianJacta commented 7 months ago

image

gbritoda commented 7 months ago

Ran with extended_status=True but nothing is different. python only shows this

[2024-01-31 09:33:37][Taipy][INFO]  * Server starting on http://127.0.0.1:5000
/usr/local/lib/python3.10/dist-packages/taipy/gui/data/data_scope.py:41: TaipyGuiWarning: Session id 20231026140919251428-0.5834406851162792 not found in data scope. Taipy will automatically create a scope for this session id but you may have to reload your page.
  _warn(

And the console is empty

image

FlorianJacta commented 7 months ago

python and sudo python may be 2 different Python executables. The Python system could have installed an older version of Taipy. Can you test it?

gbritoda commented 7 months ago

You are absolutely right! When doing sudo python3 -m pip freeze | grep taipy I get taipy 2.4.0!

So I assume this feature is present only on 3.0.0?

Sorry about this, will close the ticket