hwchase17 / chat-your-data

MIT License
901 stars 266 forks source link

TypeError: issubclass() arg 1 must be a class #15

Open tejasparekh83 opened 1 year ago

tejasparekh83 commented 1 year ago

Getting this error while running python app.py

Traceback (most recent call last): File "/Users/tejas/Desktop/python/chatyourdata/app.py", line 93, in submit.click(chat, inputs=[openai_api_key_textbox, message, state, agent_state], outputs=[chatbot, state]) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/gradio/events.py", line 132, in call dep, dep_index = self.trigger.set_event_trigger( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/gradio/blocks.py", line 217, in set_event_trigger check_function_inputs_match(fn, inputs, inputs_as_dict) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/gradio/utils.py", line 872, in check_function_inputs_match if not is_special_typed_parameter(name): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/gradio/utils.py", line 861, in is_special_typed_parameter is_event_data = issubclass(parameter_types.get(name, int), EventData) TypeError: issubclass() arg 1 must be a class

hansvdam commented 1 year ago

happens to me too from gradio 3.28, should have been fixed in gradio 3.29, but still get it in 3.30. Annoying... (https://github.com/gradio-app/gradio/issues/4015), do this to temporarily fix:

image