github repo = https://github.com/rythmn1111/DaVinci/blob/main/test.py
github req file = https://github.com/rythmn1111/DaVinci/blob/main/requirements.txt
Hey @rythmn1111,
Can you please share the full contents of the error message (from the console on the right side of the app) in text format (rather than a screenshot)?
yes sure
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 31, in validate_environment
from duckduckgo_search import DDGS # noqa: F401
ModuleNotFoundError: No module named 'duckduckgo_search'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/davinci/test.py", line 95, in <module>
search = DuckDuckGoSearchRun()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1066, in validate_model
value = field.get_default()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/fields.py", line 439, in get_default
return smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1102, in validate_model
values = validator(cls_, values)
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 33, in validate_environment
raise ImportError(
ImportError: Could not import duckduckgo-search python package. Please install it with `pip install duckduckgo-search`.
2023-08-22 13:36:13.713 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 31, in validate_environment
from duckduckgo_search import DDGS # noqa: F401
ModuleNotFoundError: No module named 'duckduckgo_search'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/davinci/test.py", line 95, in <module>
search = DuckDuckGoSearchRun()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1066, in validate_model
value = field.get_default()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/fields.py", line 439, in get_default
return smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1102, in validate_model
values = validator(cls_, values)
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 33, in validate_environment
raise ImportError(
ImportError: Could not import duckduckgo-search python package. Please install it with `pip install duckduckgo-search`.
[13:44:56] π Pulling code changes from Github...
[13:44:57] π¦ Processing dependencies...
[13:44:57] π¦ Processed dependencies!
[13:44:59] π Updated app!
2023-08-22 13:49:27.623 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 31, in validate_environment
from duckduckgo_search import DDGS # noqa: F401
ModuleNotFoundError: No module named 'duckduckgo_search'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/davinci/test.py", line 95, in <module>
search = DuckDuckGoSearchRun()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1066, in validate_model
value = field.get_default()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/fields.py", line 439, in get_default
return smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1102, in validate_model
values = validator(cls_, values)
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 33, in validate_environment
raise ImportError(
ImportError: Could not import duckduckgo-search python package. Please install it with `pip install duckduckgo-search`.
2023-08-22 13:52:01.178 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 31, in validate_environment
from duckduckgo_search import DDGS # noqa: F401
ModuleNotFoundError: No module named 'duckduckgo_search'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/davinci/test.py", line 278, in <module>
search = DuckDuckGoSearchRun()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1066, in validate_model
value = field.get_default()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/fields.py", line 439, in get_default
return smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1102, in validate_model
values = validator(cls_, values)
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 33, in validate_environment
raise ImportError(
ImportError: Could not import duckduckgo-search python package. Please install it with `pip install duckduckgo-search`.
[13:53:59] π Pulling code changes from Github...
[13:54:00] π¦ Processing dependencies...
[13:54:00] π¦ Processed dependencies!
2023-08-22 13:54:00.990 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 31, in validate_environment
from duckduckgo_search import DDGS # noqa: F401
ModuleNotFoundError: No module named 'duckduckgo_search'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/davinci/test.py", line 278, in <module>
search = DuckDuckGoSearchRun()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1066, in validate_model
value = field.get_default()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/fields.py", line 439, in get_default
return smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1102, in validate_model
values = validator(cls_, values)
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 33, in validate_environment
raise ImportError(
ImportError: Could not import duckduckgo-search python package. Please install it with `pip install duckduckgo-search`.
2023-08-22 13:54:00.991 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 31, in validate_environment
from duckduckgo_search import DDGS # noqa: F401
ModuleNotFoundError: No module named 'duckduckgo_search'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/davinci/test.py", line 278, in <module>
search = DuckDuckGoSearchRun()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1066, in validate_model
value = field.get_default()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/fields.py", line 439, in get_default
return smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1102, in validate_model
values = validator(cls_, values)
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 33, in validate_environment
raise ImportError(
ImportError: Could not import duckduckgo-search python package. Please install it with `pip install duckduckgo-search`.
[13:54:02] π Updated app!
2023-08-22 13:54:06.176 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 31, in validate_environment
from duckduckgo_search import DDGS # noqa: F401
ModuleNotFoundError: No module named 'duckduckgo_search'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/davinci/test.py", line 278, in <module>
search = DuckDuckGoSearchRun()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1066, in validate_model
value = field.get_default()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/fields.py", line 439, in get_default
return smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1102, in validate_model
values = validator(cls_, values)
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 33, in validate_environment
raise ImportError(
ImportError: Could not import duckduckgo-search python package. Please install it with `pip install duckduckgo-search`.
[13:59:01] π Pulling code changes from Github...
[13:59:02] π¦ Processing dependencies...
[13:59:02] π¦ Processed dependencies!
[13:59:04] π Updated app!
2023-08-22 14:42:15.923 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 31, in validate_environment
from duckduckgo_search import DDGS # noqa: F401
ModuleNotFoundError: No module named 'duckduckgo_search'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/davinci/test.py", line 278, in <module>
search = DuckDuckGoSearchRun()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1066, in validate_model
value = field.get_default()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/fields.py", line 439, in get_default
return smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1102, in validate_model
values = validator(cls_, values)
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 33, in validate_environment
raise ImportError(
ImportError: Could not import duckduckgo-search python package. Please install it with `pip install duckduckgo-search`.
2023-08-22 14:42:17.362 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 31, in validate_environment
from duckduckgo_search import DDGS # noqa: F401
ModuleNotFoundError: No module named 'duckduckgo_search'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/davinci/test.py", line 278, in <module>
search = DuckDuckGoSearchRun()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1066, in validate_model
value = field.get_default()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/fields.py", line 439, in get_default
return smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 339, in __init__
values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
File "/home/adminuser/venv/lib/python3.9/site-packages/pydantic/v1/main.py", line 1102, in validate_model
values = validator(cls_, values)
File "/home/adminuser/venv/lib/python3.9/site-packages/langchain/utilities/duckduckgo_search.py", line 33, in validate_environment
raise ImportError(
ImportError: Could not import duckduckgo-sear
hey @rythmn1111 you can try to use pipreqs to automatically generate your requirements.txt and try to reboot the website again, watch this article here for more information: How to Auto Generate requirements.txt (Dependencies) in Python - 3 examples
Hey @Melo04 thanks for responding, Yes I made this requirement.txt using pipreqs only and it gave me this
I have tried searching up your issue, apparently duckduckgo is not supported, try pip install duckduckpy
instead, related post here: module - Python duckduckgo library not installing - Stack Overflow
FWIW, I forked your repo at ecb68c1 and deployed. I couldnβt reproduce the issue.
Bro IDK man i deployed the same app
https://rythmn.streamlit.app/
here
So the ImportError
is gone.
I redepolyed it thanks a lot man, why it is giving current error
Because you are calling OpenAI
without an API key, as the error message says.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.