import langchain => Error : TypeError: issubclass() arg 1 must be a class

 

import langchain => Error : TypeError: issubclass() arg 1 must be a class


I want to use langchain for my project.

so I installed it using following command : pip install langchain

but While importing "langchain" I am facing following Error:

File /usr/lib/python3.8/typing.py:774, in _GenericAlias.__subclasscheck__(self, cls)
    772 if self._special:
    773     if not isinstance(cls, _GenericAlias):
--> 774         return issubclass(cls, self.__origin__)
    775     if cls._special:
    776         return issubclass(cls.__origin__, self.__origin__)

TypeError: issubclass() arg 1 must be a class

Any one who can solve this error ?



Fixed in Pydantic 1.10.8. For poetry, use pydantic = "^1.10.8" in your pyproject.toml file.


typing-inspect==0.8.0 typing_extensions==4.5.0


Learn more about this article please follow this link


Post a Comment

0 Comments