Joldz 🔮
Passing Pandas Dataframe Object between componenets.
I feel like I'm missing something but when I try to pass a Pandas Dataframe object from one script to another it becomes a different datatype. Do I need to setup S3 Storage in order to pass objects between scripts?
6 replies
Stepper Component Question
I'm having trouble understanding how to do error checking when trying to advance the next step in the stepper but still allowing the user to go backwards. My script attached to the stepper component looks like this.
I see no way for me to know whether or not the Next or the Previous button is clicked within the stepper component itself. The On Next and On Previous event handlers are for triggering other scripts and cannot be referenced by the stepper component itself. I have thought of many ways to hack this functionality together but nothing has worked so far. Do you have any suggestions for how I can allow users to move backwards freely but when proceeding, make the validations in the script above?
3 replies
Stepper Component Event Handlers
in the documentation for the Stepper component, it mentions event handlers onNext and onPrevious but I am not seeing this in the component settings in the app builder. I just see "Stepper has no configuration" at the bottom of the component settings for the Stepper. Is the documentation outdated or perhaps are those features new and I am just not on the latest version? I am on EE v1.334.0
Or maybe I'm just missing something. Let me know, thanks!
3 replies
I keep getting an error that says that the psycopg2 python module doesn't exist when i run code
I have succesffully imported the module, and have actually copy and pasted this code from another app that is working fine with this exact code and I can't get it to work. I changed it to import psycopg instead of psycopg2 and the code runs fine but it is not functioning with psycopg2 and whats even weirder is that every now and then it does work if i just keep hitting run. Is there a way I can maybe remove and reinstall that binary and its dependencies within windmill?
9 replies
Not understanding how to use setValue control for a Toggle
I am having difficulties understanding how to set a toggle as true or false from a Python script. I was trying to have it be tied to another component's (lets call it x) result when I hit a button but it only reevaluates the toggle when the result of x has changed, not anytime that it runs or the button is pressed.
So I started to learn about the setValue control for toggles as a possible solution for this but am unsure how to reference that control and everything I need to import to make this work. Do I have to use javascript instead of Python? If not what besides "import setValue from windmill" should I have imported?
i see that this is the proper syntax for it:
setValue(id: string, value: any)
but the "value" and "any" part is a bit vague. So for example to set a toggle to false would i type the follwoing?
--assuming toggle id is 'a'
import setValue from windmill
setValue('a', defaultValueEval(False)
bc when I do I get the following error import bin, browser, server, conf, tools, sys
ModuleNotFoundError: No module named 'browser
'
Do I really need to import all of those as well to use the setValue control?
Any help would be appreciated. If you need anymore information let me know.5 replies