toverainc / willow-application-server

Willow Application Server
Apache License 2.0
19 stars 9 forks source link

Streamlit app not starting - Docker container #35

Closed Leticron closed 11 months ago

Leticron commented 11 months ago

I encounter the same problem when building the WAS dockerfile myself or using the docker command docker run --detach --name=willow-application-server --pull=always --network=host --restart=unless-stopped --volume=was-storage:/app/storage ghcr.io/toverainc/willow-application-server:main After visiting the streamlit app under the host ip the app provides the following error:

AttributeError: 'list' object has no attribute 'get'

Traceback within Streamlit app: File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script exec(code, module.__dict__) File "/app/ui.py", line 59, in <module> latest_release = get_release_gh_latest() ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/shared/was.py", line 153, in get_release_gh_latest if json.get('tag_name'): ^^^^^^^^

Any ideas where to start here?

kristiankielhofner commented 11 months ago

This was fixed on the API side a while ago, you shouldn't have seen this as of the time you created the issue.

Worst case, can you restart WAS and try again?

Leticron commented 11 months ago

Interestingly, I have created the issue 10 min ago and then continued to look into the issue. The containers were started some hours ago. After the issue creation I checked the containers again and now they are working.

Could this be related to some data pulling/downloading after container start-up requiring a certain up-time of the containers?

kristiankielhofner commented 11 months ago

For the next stable release series of Willow (0.2x) we have a completely new Web UI - streamlit is terrible (for this use case) and was always more of a placeholder to get dynamic config, updates, etc out and available. This comes with a redesigned WAS backend. In implementing this we introduced a regression on the hosted API side for getting current releases, which caused your issue (we caught it hours before you created it). The new UI and WAS always refreshes live in the UI so releases are immediately available and the UI, WAS, etc don't maintain state.

Current WAS and WAS UI does maintain state all over the place and that's likely what was happening here.

Leticron commented 11 months ago

Sounds great - I will close the issue then.