JinghaoZhao / GPT-Code-Learner

Learn A Repo Interactively with GPT
MIT License
176 stars 37 forks source link

error when pressing run button #10

Open Raynchowkw opened 9 months ago

Raynchowkw commented 9 months ago

after I click analyze code, with copied url in place, I click RUN after I input my question. It gives error: :ERROR - Task exception was never retrieved future: <Task finished name='7qu7472fmz8_0' coro=<Queue.process_events() done, defined at C:\xxx.conda\envs\gpt_code_learner\lib\site-packages\gradio\queueing.py:343> exception=1 validation error for PredictBody event_id Field required [type=missing, input_value={'fn_index': 0, 'data': [...on_hash': '7qu7472fmz8'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.6/v/missing> Traceback (most recent call last): File "C:\xxx.conda\envs\gpt_code_learner\lib\site-packages\gradio\queueing.py", line 347, in process_events client_awake = await self.gather_event_data(event) File "C:\xxx.conda\envs\gpt_code_learner\lib\site-packages\gradio\queueing.py", line 220, in gather_event_data data, client_awake = await self.get_message(event, timeout=receive_timeout) File "C:\xxx.conda\envs\gpt_code_learner\lib\site-packages\gradio\queueing.py", line 456, in get_message return PredictBody(**data), True File "C:\xxx.conda\envs\gpt_code_learner\lib\site-packages\pydantic\main.py", line 171, in init self.__pydantic_validator__.validate_python(data, self_instance=self) pydantic_core._pydantic_core.ValidationError: 1 validation error for PredictBody event_id Field required [type=missing, input_value={'fn_index': 0, 'data': [...on_hash': '7qu7472fmz8'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.6/v/missing

Raynchowkw commented 9 months ago

According to pydantic, it's missing x when instantiating class Model.


from pydantic import BaseModel, ValidationError

class Model(BaseModel):
    x: str

try:
    Model()
except ValidationError as exc:
    print(repr(exc.errors()[0]['type']))
    #> 'missing'

arbindpd96 commented 7 months ago

did you find any solution to this?