Skip to content

Handle deletion of file #119

@ademait

Description

@ademait

I have tried the example of the first multi-agent system. When we upload a file, we can later delete it by clicking on the cross. If we do so we get an exception:

Image

The traceback is:

File "C:\Users\Adem.ait\AppData\Local\miniconda3\envs\besser-agent\Lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling
    result = func()
             ^^^^^^
File "C:\Users\Adem.ait\AppData\Local\miniconda3\envs\besser-agent\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 579, in code_to_exec
    exec(code, module.__dict__)
File "C:\Users\Adem.ait\AppData\Local\miniconda3\envs\besser-agent\Lib\site-packages\besser\agent\platforms\websocket\streamlit_ui\streamlit_ui.py", line 33, in <module>
    main()
File "C:\Users\Adem.ait\AppData\Local\miniconda3\envs\besser-agent\Lib\site-packages\besser\agent\platforms\websocket\streamlit_ui\streamlit_ui.py", line 25, in main
    sidebar()
File "C:\Users\Adem.ait\AppData\Local\miniconda3\envs\besser-agent\Lib\site-packages\besser\agent\platforms\websocket\streamlit_ui\sidebar.py", line 51, in sidebar
    bytes_data = uploaded_file.read()
                 ^^^^^^^^^^^^^^^^^^

Is this problem of the example definition? Or is it from the library itself? If the former, should the example be adapted so that it handles the case? Also to show users how to handle this situation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions