MarshallComponentException

MarshallComponentException: (‘Could not convert component args to JSON’, TypeError(‘Object of type UploadedFile is not JSON serializable’))

Traceback:

File "/Users/macm1/Desktop/Contracts_Project/venv/contracts-ai/app.py", line 485, in <module>
    main()File "/Users/macm1/Desktop/Contracts_Project/venv/contracts-ai/app.py", line 99, in main
    selected_option = hc.nav_bar(
                      ^^^^^^^^^^^File "/Users/macm1/Desktop/Contracts_Project/venv/lib/python3.11/site-packages/hydralit_components/NavBar/__init__.py", line 166, in nav_bar
    component_value = _component_func(menu_definition=menu_definition, first_select=first_select,key=key,home=home_data,fvalue=force_value,login=login_data,override_theme=override_theme,use_animation=use_animation)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I am getting this error when using hc.nav_bar everything was fine until I was using streamlit_option_menu.

Can anyone please share the soultion for this problem.