How best to stage changes

I’ve been looking around to find what’s best practice for staging changes to streamlit, but haven’t found anything.

I pushed a change to github today which worked fine in my local environment but failed on streamlit, for reasons I’m still investigating. So I had to revert my change in github to restore to previous version.

Is this really the only way, or is there a better way?

If you’re only making small changes, I recommend using a feature branch where you can develop new features/make changes without affecting your main branch. If it works, then you can merge to the main branch.

What is the error message you getting from streamlit ?

A feature branch makes sense for development testing. But how can I deploy that to streamlit cloud for testing without pushing to the head and potentially breaking my app? I can see no way to tell streamlit cloud to pull from anything apart from the head.

The error message seems to be complaining about a comment!

2023-09-07 15:39:35.415 Uncaught app exception
Traceback (most recent call last):
  File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/", line 552, in _run_script
	exec(code, module.__dict__)
  File "/mount/src/awt/", line 140, in <module>
	#        else:
TypeError: 'NoneType' object is not subscriptable

Code is running fine on my own machine, only fails on the cloud server. Not sure the best way to go about debugging this.

Ah… It seems that I can’t change the branch after I create, but that I can create a new address using a different branch. That works, thanks!

Hmm. The TypeError appears to have vanished this morning :thinking: Odd. But saves me from having to debug it, I guess.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.