pragmatic-streamlit / streamlit-molstar

49 stars 5 forks source link

RuntimeError: Runtime hasn't been created! #22

Closed grishzohrab closed 6 months ago

grishzohrab commented 6 months ago

Hi, I installed the package, but when I tried to run you example, I got this error.

Traceback (most recent call last):
  File "vis.py", line 2, in <module>
    from streamlit_molstar import st_molstar, st_molstar_rcsb, st_molstar_remote
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit_molstar/__init__.py", line 42, in <module>
    _component_func = components.declare_component("molstar_component", path=build_dir)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit/components/v1/component_registry.py", line 87, in declare_component
    get_instance().component_registry.register_component(component)
    ^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit/runtime/__init__.py", line 28, in get_instance
    return Runtime.instance()
           ^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit/runtime/runtime.py", line 163, in instance
    raise RuntimeError("Runtime hasn't been created!")

Then I cloned the package, and try to run build.sh, but it stopped my terminal with exit code 127.

mapix commented 6 months ago

@grishzohrab Thank you for your feedback. Please provide information on how you installed and used the package, especially your command line code. From the error situation, it seems that you might not have used streamlit run xxx.py to start your Streamlit application.

grishzohrab commented 6 months ago

I see, thanks. It worked for me.