-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
ModuleNotFoundError: Module component.llms.kimi_llm not found #1586
Comments
Hey there, @xianming90! 👋 I'm Dosu, a friendly bot here to lend a hand with your coding conundrums, answer your queries, and guide you through contributing while you wait for a human maintainer to swoop in. Don't worry, I've got your issue under my virtual lens and will get back to you with some insights shortly! |
使用包的方式引入langflow,然后启动项目,会找不到自定义的包。 |
To address the
Ensure each package directory (
from component.llms import kimi_llm Or, for specific attributes: from component.llms.kimi_llm import some_function_or_class
import sys
sys.path.append('/path/to/project_root')
source /home/xm/workspace/python/mflow/venv/bin/activate
\home\xm\workspace\python\mflow\venv\Scripts\activate
Regarding the Langflow handles the import of custom packages and modules through direct module imports using If you need further assistance or have more questions, feel free to ask. Sources
|
还没解决我的问题。 自定义包,还是无法加载。 |
It seems like you've encountered a persistent
If these steps don't resolve the issue, providing the exact code for importing your custom package, along with the full error message and traceback, could help pinpoint the problem. For further details on how langflow handles imports, you might find the importing utils in the langflow repository useful. Sources
|
还没解决我的问题。 自定义包,还是无法加载。 |
It appears that despite following the provided troubleshooting steps, you're still facing issues with loading your custom package
import importlib
module_name = 'component.llms.kimi_llm'
try:
module = importlib.import_module(module_name)
print(f"Successfully imported {module_name}")
except ModuleNotFoundError:
print(f"Failed to import {module_name}") This can help verify if Python is capable of locating your module through its normal mechanisms.
pip install -e /path/to/your/package The
python -v your_script.py Look through the output for any messages related to your custom package. This might provide clues on what's going wrong.
If after trying these steps, you're still facing issues, it might be helpful to share:
This information could provide further insights into what might be going wrong. Remember, the goal is to narrow down the issue step by step.
|
Describe the bug
when i run my project , notice """
exec_globals = prepare_global_scope(code, module)\n File
"/home/xm/workspace/python/mflow/venv/lib/python3.10/site-packages/langflow/utils/validate.py", line 204, in
prepare_global_scope\n raise ModuleNotFoundError(f"Module {node.module} not found. Please install it and
try again.") from e\nModuleNotFoundError: Module component.llms.kimi_llm not found. Please install it and
try again.\n'}
"""
Screenshots
my project source strure
The text was updated successfully, but these errors were encountered: