Debugging Webapp (Plotly Dash)
![ebbingcasa](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar18.png)
Hi there,
not sure if I'm simply missing something: Where do I find the row of error in my Python code when debugging a Webapp via the Logs? I can only see rows within modules etc. in the log ouput.
ValueError: Value of 'y' is not the name of a column in 'data_frame'.
When using multiple dataframes this ValueError barely helps even if there are ways to work around it.
Cheers!
Best Answer
-
Sarina Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 317 Dataiker
Hi @ebbingcasa
,
You can add additional "print" statements in order to debug your webapp code, which is probably the simplest way to debug. For example:Note that you may need to click the "refresh log" button to see the current logging.
For an error like the one you described, it sounds like you may be attempting to access a dataframe column "y", which doesn't exist in your dataframe columns. I would suggest printing our your dataframe columns in order to troublehshoot this, for example:print('============= Columns =============') print(df.columns)
If you need any help troubleshooting a particular error, please also feel free to post your full webapp code and the full error, and we would be happy to help debug.
Thanks,
Sarina
Answers
-
That makes sense. Thank you, Sarina!