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

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

Open
lvsh2012 opened this issue Jun 16, 2023 · 3 comments
Open

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

lvsh2012 opened this issue Jun 16, 2023 · 3 comments

Comments

@lvsh2012
Copy link

PS C:\python\GPTvup\src> python manager.py run bilibili
Traceback (most recent call last):
File "manager.py", line 10, in
from src.core.main import start_thread
File "C:\python\GPTvup\src\core\main.py", line 14, in
from src.utils.prompt_temple import get_schedule_task
File "C:\python\GPTvup\src\utils\prompt_temple.py", line 10, in
from langchain.prompts import SystemMessagePromptTemplate, HumanMessagePromptTemplate, ChatPromptTemplate
File "C:\Program Files\Python38\lib\site-packages\langchain_init_.py", line 6, in
from langchain.agents import MRKLChain, ReActChain, SelfAskWithSearchChain
File "C:\Program Files\Python38\lib\site-packages\langchain\agents_init_.py", line 2, in
from langchain.agents.agent import (
File "C:\Program Files\Python38\lib\site-packages\langchain\agents\agent.py", line 15, in
from langchain.agents.tools import InvalidTool
File "C:\Program Files\Python38\lib\site-packages\langchain\agents\tools.py", line 8, in
from langchain.tools.base import BaseTool, Tool, tool
File "C:\Program Files\Python38\lib\site-packages\langchain\tools_init_.py", line 39, in
from langchain.tools.vectorstore.tool import (
File "C:\Program Files\Python38\lib\site-packages\langchain\tools\vectorstore\tool.py", line 13, in
from langchain.chains import RetrievalQA, RetrievalQAWithSourcesChain
File "C:\Program Files\Python38\lib\site-packages\langchain\chains_init_.py", line 2, in
from langchain.chains.api.base import APIChain
File "C:\Program Files\Python38\lib\site-packages\langchain\chains\api\base.py", line 13, in
from langchain.chains.api.prompt import API_RESPONSE_PROMPT, API_URL_PROMPT
File "C:\Program Files\Python38\lib\site-packages\langchain\chains\api\prompt.py", line 2, in
from langchain.prompts.prompt import PromptTemplate
File "C:\Program Files\Python38\lib\site-packages\langchain\prompts_init_.py", line 3, in
from langchain.prompts.chat import (
File "C:\Program Files\Python38\lib\site-packages\langchain\prompts\chat.py", line 10, in
from langchain.memory.buffer import get_buffer_string
File "C:\Program Files\Python38\lib\site-packages\langchain\memory_init_.py", line 25, in
from langchain.memory.vectorstore import VectorStoreRetrieverMemory
File "C:\Program Files\Python38\lib\site-packages\langchain\memory\vectorstore.py", line 10, in
from langchain.vectorstores.base import VectorStoreRetriever
File "C:\Program Files\Python38\lib\site-packages\langchain\vectorstores_init_.py", line 2, in
from langchain.vectorstores.analyticdb import AnalyticDB
File "C:\Program Files\Python38\lib\site-packages\langchain\vectorstores\analyticdb.py", line 15, in
from langchain.embeddings.base import Embeddings
File "C:\Program Files\Python38\lib\site-packages\langchain\embeddings_init_.py", line 19, in
from langchain.embeddings.openai import OpenAIEmbeddings
File "C:\Program Files\Python38\lib\site-packages\langchain\embeddings\openai.py", line 66, in
class OpenAIEmbeddings(BaseModel, Embeddings):
File "pydantic\main.py", line 197, in pydantic.main.ModelMetaclass.new
File "pydantic\fields.py", line 506, in pydantic.fields.ModelField.infer
File "pydantic\fields.py", line 436, in pydantic.fields.ModelField.init
File "pydantic\fields.py", line 552, in pydantic.fields.ModelField.prepare
File "pydantic\fields.py", line 663, in pydantic.fields.ModelField._type_analysis
File "pydantic\fields.py", line 808, in pydantic.fields.ModelField._create_sub_type
File "pydantic\fields.py", line 436, in pydantic.fields.ModelField.init
File "pydantic\fields.py", line 552, in pydantic.fields.ModelField.prepare
File "pydantic\fields.py", line 668, in pydantic.fields.ModelField._type_analysis
File "C:\Program Files\Python38\lib\typing.py", line 774, in subclasscheck
return issubclass(cls, self.origin)
TypeError: issubclass() arg 1 must be a class

python3.8, 依赖已安装,运行 python manager.py run bilibili 或者 python manager.py test_net 都是一样的报错

@jiran214
Copy link
Owner

  1. https://github.com/imClumsyPanda/langchain-ChatGLM/issues/440#issuecomment-1558546245看到了类似的问题,似乎是langchain的问题
  2. 没用虚拟环境的话创建虚拟环境试试

@jiburan
Copy link

jiburan commented Jun 22, 2023

我也遇到了这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants