langflow-ai / langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
http://www.langflow.org
MIT License
33.78k stars 4.09k forks source link

Errors loading components #1404

Closed lepascal closed 7 months ago

lepascal commented 9 months ago

I finally got langflow to run and show components, but it's missing many of them. I don't find the basic ConversationChain module, for example.

Bildschirmfoto 2024-02-06 um 11 25 14

In the terminal it's giving me plenty of errors for what seems to be the loading of components.

My versions: langchain 0.1.5 langchain-community 0.0.17 langchain-core 0.1.18 langflow 0.6.6 Python 3.9.6

langflow run      
╭───────────────────────────────────────────────────╮
│ Welcome to ⛓ Langflow                             │
│                                                   │
│ Access http://127.0.0.1:7860                      │
│ Collaborate, and contribute at our GitHub Repo 🚀 │
╰───────────────────────────────────────────────────╯
[02/06/24 11:22:52] INFO     2024-02-06 11:22:52 - INFO     - service - Alembic already initialized                                                  service.py:141
                    INFO     2024-02-06 11:22:52 - INFO     - service - Running DB migrations in                                                     service.py:143
                             /Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/alembic                                                            
No new upgrade operations detected.
No new upgrade operations detected.
[02/06/24 11:22:53] INFO     2024-02-06 11:22:53 - INFO     - utils - No LLM cache set.                                                                 utils.py:88
/Users/tarris/Library/Python/3.9/lib/python/site-packages/langchain/agents/agent_toolkits/__init__.py:64: LangChainDeprecationWarning: Importing this agent toolkit from langchain is deprecated. Importing it from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.agent_toolkits import JsonToolkit`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/Users/tarris/Library/Python/3.9/lib/python/site-packages/langchain/agents/agent_toolkits/__init__.py:64: LangChainDeprecationWarning: Importing this agent toolkit from langchain is deprecated. Importing it from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.agent_toolkits import OpenAPIToolkit`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
[02/06/24 11:23:03] INFO     2024-02-06 11:23:03 - INFO     - utils - Building custom components from                                                  utils.py:324
                             ['/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/components']                                                     
/Users/tarris/Library/Python/3.9/lib/python/site-packages/langchain/embeddings/__init__.py:29: LangChainDeprecationWarning: Importing embeddings from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.embeddings import VertexAIEmbeddings`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/Users/tarris/Library/Python/3.9/lib/python/site-packages/langchain/retrievers/__init__.py:46: LangChainDeprecationWarning: Importing this retriever from langchain is deprecated. Importing it from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.retrievers import AmazonKendraRetriever`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/Users/tarris/Library/Python/3.9/lib/python/site-packages/langchain/retrievers/__init__.py:46: LangChainDeprecationWarning: Importing this retriever from langchain is deprecated. Importing it from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.retrievers import MetalRetriever`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/Users/tarris/Library/Python/3.9/lib/python/site-packages/langchain/embeddings/__init__.py:29: LangChainDeprecationWarning: Importing embeddings from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.embeddings import BedrockEmbeddings`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py:125: UserWarning: The 'name' key in field_config is used to build the object and can't be changed.
  warnings.warn("The 'name' key in field_config is used to build the object and can't be changed.")
                    ERROR    2024-02-06 11:23:03 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
[02/06/24 11:23:04] ERROR    2024-02-06 11:23:04 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
[02/06/24 11:23:05] ERROR    2024-02-06 11:23:05 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:05 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:05 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:05 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:05 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:05 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    ERROR    2024-02-06 11:23:05 - ERROR    - directory_reader - Error while loading component: 400: {'error': 'Invalid type directory_reader.py:79
                             convertion. Please check your code and try again.', 'traceback': 'Traceback (most recent call last):\n  File                          
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 291, in                          
                             build_custom_component_template\n    add_base_classes(frontend_node,                                                                  
                             custom_component.get_function_entrypoint_return_type)\n  File                                                                         
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/interface/custom/utils.py", line 58, in                           
                             add_base_classes\n    base_classes = get_base_classes(return_type_instance)\n  File                                                   
                             "/Users/tarris/Library/Python/3.9/lib/python/site-packages/langflow/utils/util.py", line 189, in                                      
                             get_base_classes\n    result = \n  File                                                                                               
                             "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py"                       
                             , line 701, in __getattr__\n    raise AttributeError(attr)\nAttributeError: __name__\n'}                                              
                    INFO     2024-02-06 11:23:05 - INFO     - utils - Loading 2 component(s) from category retrievers      
dosubot[bot] commented 9 months ago

🤖

Hey @lepascal, great to see you back on the langflow repo! Hope you're doing well.

Based on the error messages you've provided, it seems like there might be a few different issues at play here.

Firstly, the 'Invalid type conversion' error and the AttributeError in the typing.py file could be due to a mismatch between the Python version and the versions of langchain and langflow you're using. Langflow v0.6.6 might require a different Python version or different versions of langchain and langchain-community. I recommend checking the specific Python version and the versions of langchain and langchain-community that are compatible with Langflow v0.6.6.

Secondly, the warnings about importing agent toolkits, embeddings, and retrievers from langchain being deprecated suggest that these should now be imported from langchain-community instead. This could be the reason why the ConversationChain module and other components are missing. You might need to update your code to import these from langchain-community.

Lastly, the issue with the 'name' key in field_config being used to build the object and not being able to be changed could be due to a design decision in the code. If the 'name' key is used to build an object, it might not be designed to be changed after the object is created. If you need to change the 'name' key, you might need to create a new object with the new 'name'.

Without more specific information about the components that are missing and the exact error messages, it's difficult to provide a more precise solution. If you could provide more details about the missing components and the exact error messages, it would be helpful in diagnosing the problem.

For the dependencies and their versions required by langflow v0.6.6, unfortunately, I wasn't able to find this information in the repository. The dependencies listed in the context are for langflow v0.1.2, and the dependencies for v0.6.6 might be different. I recommend checking the package.json file in the v0.6.6 branch of the repository for the exact dependencies and their versions.

I hope this helps! If you have any more questions or need further clarification, feel free to ask. Dosu

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

daniel-bracht commented 9 months ago

I have the same error. Have you found a solution?

renold7 commented 8 months ago

Upgrading python to version 3.10 is the solution and it runs fine on me