liunux4odoo / streamlit-chatbox

72 stars 20 forks source link

AttributeError: module 'streamlit' has no attribute '_DeltaGenerator' #8

Closed maqiuping59 closed 5 months ago

maqiuping59 commented 6 months ago
2024-04-15 19:09:16.492 Uncaught app exception
Traceback (most recent call last):
  File "D:\Anaconda3\envs\streamlit-learn\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 584, in _run_script
    exec(code, module.__dict__)
  File "D:\code\streamlit-learn\main.py", line 2, in <module>
    from streamlit_chatbox import *
  File "D:\Anaconda3\envs\streamlit-learn\Lib\site-packages\streamlit_chatbox\__init__.py", line 4, in <module>
    from .messages import *
  File "D:\Anaconda3\envs\streamlit-learn\Lib\site-packages\streamlit_chatbox\messages.py", line 1, in <module>
    from streamlit_chatbox.elements import *
  File "D:\Anaconda3\envs\streamlit-learn\Lib\site-packages\streamlit_chatbox\elements.py", line 6, in <module>
    class Element:
  File "D:\Anaconda3\envs\streamlit-learn\Lib\site-packages\streamlit_chatbox\elements.py", line 43, in Element
    def __call__(self, render_to: st._DeltaGenerator=None) -> st._DeltaGenerator:
                                  ^^^^^^^^^^^^^^^^^^
AttributeError: module 'streamlit' has no attribute '_DeltaGenerator'

when i run example.py, I met this error

liunux4odoo commented 6 months ago

what is the version of your streamlit?

maqiuping59 commented 6 months ago

streamlit version:1.33.0 streamlit-chatbox version:1.1.11

liunux4odoo commented 6 months ago

it seems _DeltaGenerator attribute has been removed in streamlit 1.33.0. you can try to downgrade streamlit.

maqiuping59 commented 6 months ago

I have solved this error using your way,thanks

Dangd967 commented 6 months ago

which version did you use? I got the same error, and cant fix it no matter what version i use

liunux4odoo commented 6 months ago

I plan to release version 1.1.12 next week which will solve this problem.