Want to Stop Rebuilding "Expensive" Parts of your Flow? Explicit Builds are the Answer!READ MORE

Debugging Webapp (Plotly Dash)

Solved!
ebbingcasa
Level 3
Debugging Webapp (Plotly Dash)

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!

0 Kudos
1 Solution
SarinaS
Dataiker
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: 

Screen Shot 2022-03-14 at 1.20.43 PM.png

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 

View solution in original post

2 Replies
SarinaS
Dataiker
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: 

Screen Shot 2022-03-14 at 1.20.43 PM.png

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 

ebbingcasa
Level 3
Author

That makes sense. Thank you, Sarina!

0 Kudos

Labels

?
Labels (3)
A banner prompting to get Dataiku