✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Diagnosing silent type errors

So, I was recently trying to make a callback to update the columns of a Dash Table. It was defined correctly in the layout and I copied that code to a callback function and made modifications so that it could be returned.

When updated, the table more or less went blank, but there was no error or warning. After a while I noticed that the first copy operation had caught a trailing comma. That comma turned the wrapped the columns list in a tuple of size one. Hence, not the right datatype to be returned to the table. The trouble is that it fails silently.

I could create my own type checks on the columns but I feel like there’s probably a more automated way to diagnose these issues. Any suggestions?