Javascript error (fantasy-land/map) undefined

looks like dash-core-components 0.22.1 has a bug (at least for me)
no callbacks were firing, and a javascript error was fired on page load

Uncaught (in promise) TypeError: Cannot read property ‘(fantasy-land/map)’ of undefined

took me a while to discover as i was creating callbacks in a class and thought i wrote the bug was due to my changes

seems that downgrading to 0.22.0 solves the issue

any updates on this?

People will be much more apt to respond to you if you can give a minimal working example re-creating your error.

If you can’t recreate it, posting the code you used to get the error will allow someone to make suggestions.

I got the same error, and found out the problem was using an empty dictionary as return value for callbacks targeting the ‘figure’ attribute of Graph components.

This worked for dcc 0.18, but when upgraded to 0.22 I kept getting the error you mention. Using {‘data’: []} as return value solved the problem for me.


thanks :slight_smile:

this explains it

Can confirm. If any plot in your layout has an empty figure attribute, or something that’s not supposed to be there, it seems to stop the entire app from working. In my case, I accidentally had a go.Contour() as a figure attribute on a graph. My callbacks were firing, but I couldn’t get them to visually change anything. I changed the go.Contour() to go.Contour(data=[]), which threw an error but made the rest of my app start working again! {'data':[]}, naturally, worked perfectly.

Note that this did not get rid of the fantasy-land/map errors for me. They’re still there, but I now know they have nothing to do with my app’s nonresponsiveness.

This is being tracked at Check there for updates.

Patch released in dash-core-components==0.28.1