katanaml / sparrow-donut

Data extraction with Donut ML model
https://katanaml.io/
Apache License 2.0
53 stars 23 forks source link

TypeError: 'function' object is not iterable #3

Closed v4nema closed 5 months ago

v4nema commented 5 months ago

Hi, I'm following the instructions here to run sparrow-ui but I get this error:

Traceback (most recent call last):
  File "C:\Workspace\\sparrow-donut\sparrow-ui\main.py", line 188, in <module>
    view(Model())
  File "C:\Workspace\\sparrow-donut\sparrow-ui\main.py", line 65, in view
    Dashboard().view(Dashboard.Model())
  File "C:\Workspace\\sparrow-donut\sparrow-ui\views\dashboard.py", line 61, in view
    with st.container():
         ^^^^^^^^^^^^^^
  File "C:\Users\.conda\envs\donut\Lib\site-packages\streamlit\runtime\metrics_util.py", line 332, in wrapped_func
    result = non_optional_func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\.conda\envs\donut\Lib\site-packages\streamlit\elements\layouts.py", line 74, in container
    return self.dg._block()
           ^^^^^^^^^^^^^^^^
  File "C:\Users\.conda\envs\donut\Lib\site-packages\streamlit_nested_layout\nest.py", line 22, in _nestable_block
    ancestor_block_types = list(dg._ancestor_block_types)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'function' object is not iterable

I'm running a conda environment with python 3.12 and all the requirements listed in the sparrow-ui/requirements.txt file installed with pip. What am I missing?

Thank you!

abaranovskis-redsamurai commented 5 months ago

Hey, I'm running it with Python 3.10.4

v4nema commented 5 months ago

I'm sorry but the issue persists even with python 3.10.4. Any help is welcome!

abaranovskis-redsamurai commented 5 months ago

I checked it, issue was related with libraries, I specified older versions for streamlit_option_menu, streamlit_nested_layout libs and it works now. This is because app is not tested with the latest versions of these libs. Fix is committed. Thanks for using it :)