1.12.1: replacement technique for my debug method?

I’m working in Pycharm to build my app, and I found a solution on stack overflow that allows me to run a script which launches my dashboard, and then debug my actual code. This launch script is simply as follows:

from streamlit import bootstrap
real_script = 'file.py'

bootstrap.run(real_script, f'run.py {real_script}', [], {})

However, after upgrading to 1.12.1, the import of bootstrap fails. I would like to use 1.12.1 to benefit from the adjustable sidebar size. Is there any replacement technique compatible with the new version that I can use to accomplish the same debug ability?

Hi @mr483, welcome to the Streamlit community! :wave:

If you search the codebase for bootstrap.py, you’ll notice that it is now part of the streamlit.web package. Your import should change to:

from streamlit.web import bootstrap
1 Like

Thanks! I had actually done this originally, and then received the 'TypeError: Protocols cannot be instantiated" error, which I thought was related to this import. I now realize that that’s a separate issue and I’ll update my python accordingly.

1 Like