Skip to content

Custom Formatter Not Displaying Data #41

Locked Answered by s-cork
kushfest asked this question in Q&A
Discussion options

You must be logged in to vote

first thing to try is to decorate the function with @anvi.js.report_exceptions
Any errors in python will be reported

What is probably happening though is that your formatter is calling the server when doing dict(cell.get_value())

This causes a Tabulator to receive a Promise object
But it doesn't know how to handle a Promise object
So it just renders nothing.
It probably doesn't throw an error because Js Tabulator just assumes that's what you intended to do.
Python likes to throw errors, JavaScript avoids it at all costs.

There's some documentation about blocking code and Promises in Anvil in the accessing Javascript section.
search for blocking code if you want to learn more.

I have quite…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@s-cork
Comment options

@s-cork
Comment options

@kushfest
Comment options

@s-cork
Comment options

@kushfest
Comment options

Answer selected by kushfest
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants