Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: issubclass() arg 1 must be a class #1260

Closed
CherryDT opened this issue Sep 9, 2024 · 1 comment
Closed

Error: issubclass() arg 1 must be a class #1260

CherryDT opened this issue Sep 9, 2024 · 1 comment
Labels
bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added.

Comments

@CherryDT
Copy link

CherryDT commented Sep 9, 2024

Expected Behavior

Running gpte . successfully runs GPT Engineer on the current folder.

Current Behavior

Running gpte . produces this output:

Traceback (most recent call last):
  File "/home/david/.local/bin/gpte", line 5, in <module>
    from gpt_engineer.applications.cli.main import app
  File "/home/david/.local/lib/python3.8/site-packages/gpt_engineer/applications/cli/main.py", line 38, in <module>
    from gpt_engineer.applications.cli.cli_agent import CliAgent
  File "/home/david/.local/lib/python3.8/site-packages/gpt_engineer/applications/cli/cli_agent.py", line 4, in <module>
    from gpt_engineer.core.ai import AI
  File "/home/david/.local/lib/python3.8/site-packages/gpt_engineer/core/ai.py", line 12, in <module>
    from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
  File "/home/david/.local/lib/python3.8/site-packages/langchain/callbacks/__init__.py", line 12, in <module>
    from langchain_core.callbacks import (
  File "/home/david/.local/lib/python3.8/site-packages/langchain_core/callbacks/__init__.py", line 22, in <module>
    from langchain_core.callbacks.file import FileCallbackHandler
  File "/home/david/.local/lib/python3.8/site-packages/langchain_core/callbacks/file.py", line 7, in <module>
    from langchain_core.agents import AgentAction, AgentFinish
  File "/home/david/.local/lib/python3.8/site-packages/langchain_core/agents.py", line 31, in <module>
    from langchain_core.messages import (
  File "/home/david/.local/lib/python3.8/site-packages/langchain_core/messages/__init__.py", line 18, in <module>
    from langchain_core.messages.ai import (
  File "/home/david/.local/lib/python3.8/site-packages/langchain_core/messages/ai.py", line 11, in <module>
    from langchain_core.messages.tool import (
  File "/home/david/.local/lib/python3.8/site-packages/langchain_core/messages/tool.py", line 10, in <module>
    class ToolMessage(BaseMessage):
  File "pydantic/main.py", line 205, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 491, in pydantic.fields.ModelField.infer
  File "pydantic/fields.py", line 421, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 537, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 641, in pydantic.fields.ModelField._type_analysis
  File "/usr/lib/python3.8/typing.py", line 774, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class

Failure Information

All defaults.

Failure Logs

There is no such file.

System Information

Same error as above appears when running gpte --sysinfo.

But I can tell you it is Ubuntu 20.04 on WSL1 on Windows 10, with Python 3.8.

Installation Method

Installed using pip install.

@CherryDT CherryDT added bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added. labels Sep 9, 2024
@CherryDT
Copy link
Author

CherryDT commented Sep 9, 2024

Tweaking the dependency versions I had installed eventually resulted in a usable version.

@CherryDT CherryDT closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Interesting but stale issue. Will be close if inactive for 3 more days after label added.
Projects
None yet
Development

No branches or pull requests

1 participant