Wen Posted January 28, 2023 Posted January 28, 2023 (edited) After yesterday's SEEQ update, the Appmode button has been changed to Add-on Mode. My script has a line for user input using the native input() function. It is getting the following error: How do I resolved this issue? The script runs fine in the native window. Edited January 29, 2023 by Wen
Seeq Team John Posted January 30, 2023 Seeq Team Posted January 30, 2023 (edited) In more recent versions of Seeq (+R58), we have changed our Add-on rendering engine to Voila and renamed the functionality to "Add-on Mode" from "AppMode." The rendered Voila interface is designed for interactivity and is based on widgets. As you've noticed this means that code in a cell may not function the same way in both Jupyter and Voila. This is particularly true around interactions (i.e. inputs). A way to get an input is to use a widget from ipywidgets and then use the value from the widget in your code. Here is a sample code snippet that uses an input widget and renders the value when a button is clicked. import ipywidgets as widgets #Define the input user_input = widgets.Text( value='Hello World', placeholder='Type something', description='String:', disabled=False ) #define a button button = widgets.Button( description="Execute", button_style='success' ) #define an Output - someplace to render the button click output = widgets.Output() #Do something when button is clicked def get_input_value(b): with output: print(user_input.value) button.on_click(get_input_value) #display input, button, and output Vertically widgets.VBox([user_input,button,output]) Tip: In the new Advanced Mode in Seeq Data Lab you can render your notebook without having to navigate to a separate tab. You can access the "Add-on Mode Preview" from the View section in the top menu. For information about the new Advanced Mode Seeq Data Lab check please check out Advanced Mode for Data Lab. Additional Information: ipywidgets Edited January 30, 2023 by John grammar
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now