Ace widgets not showing up intermittently (?)

So before I try and make an MWE I wanted to hear if anyone has been having trouble with the ace widgets as well.

When I start up a new jlab session, open a notebook and go

import panel as pn
pn.extension('ace')
py_code = """import sys"""
editor = pn.widgets.Ace(value=py_code, sizing_mode='stretch_both', language='python', height=300)
editor

the ace widget doesn’t show up (same for e.g. JSONEditor).

When I rerun the first (import) cell, then suddenly the ace widget works. Now i can restart the kernel and the ace widget will show up, even without rerunning the imports. Now I start a new jlab session, and it won’t work until I rerun the imports, see above.

Or maybe the issue is something else. This has been very frustrating so far. Anybody got any ideas?

Hi @poplarshift,

It seems to be working off of first run for myself so may be an environment issue, nothing for me will run after restarting the kernel, naturally I would expect book to forget everthing when I do this. No idea as to what it may be your experiencing, I would spin up a new virtual environment, just install the bare minimum and see if that rectifies what is going on

Thanks @carl! I saw I made a small omission - I need to rerun the import cell to get it to work.

I’ve tested this across a few fresh installs and it seems to persist, but if it works for you it maybe boils down to something else in my imports.