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

Vercel和本地Docker部署均出现500错误 #24

Open
eruditus-ginkgo opened this issue May 11, 2024 · 4 comments
Open

Vercel和本地Docker部署均出现500错误 #24

eruditus-ginkgo opened this issue May 11, 2024 · 4 comments

Comments

@eruditus-ginkgo
Copy link

eruditus-ginkgo commented May 11, 2024

访问网页显示【500 Internal Server Error】
后台报错日志附上,Vercel和Docker报错是一样的。

[ERROR]	2024-05-11T11:44:16.097Z	ad9238df-0118-41ca-9f7b-642759c9e5cc	Exception on /search [GET]
Traceback (most recent call last):
  File "/var/task/flask/app.py", line 2528, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/task/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/task/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/task/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/var/task/asgiref/sync.py", line 254, in __call__
    return call_result.result()
  File "/var/lang/lib/python3.9/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/var/lang/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/var/task/asgiref/sync.py", line 331, in main_wrap
    result = await self.awaitable(*args, **kwargs)
  File "./app.py", line 26, in search
    ddgs_gen = ddgs.text(keywords, safesearch='Off', timelimit='y', backend="lite")
  File "/var/task/duckduckgo_search/duckduckgo_search.py", line 57, in text
    return self._run_async_in_thread(super().text(*args, **kwargs))
  File "/var/task/duckduckgo_search/duckduckgo_search.py", line 53, in _run_async_in_thread
    result = future.result()
  File "/var/lang/lib/python3.9/concurrent/futures/_base.py", line 446, in result
    return self.__get_result()
  File "/var/lang/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/var/task/duckduckgo_search/duckduckgo_search_async.py", line 167, in text
    results = await self._text_api(keywords, region, safesearch, timelimit, max_results)
  File "/var/task/duckduckgo_search/duckduckgo_search_async.py", line 258, in _text_api
    raise e
  File "/var/task/duckduckgo_search/duckduckgo_search_async.py", line 253, in _text_api
    await asyncio.gather(*tasks)
  File "/var/task/duckduckgo_search/duckduckgo_search_async.py", line 229, in _text_api_page
    resp_content = await self._aget_url("GET", "https://links.duckduckgo.com/d.js", params=payload)
  File "/var/task/duckduckgo_search/duckduckgo_search_async.py", line 124, in _aget_url
    raise RatelimitException(f"{resp.url} {resp.status_code} Ratelimit")
duckduckgo_search.exceptions.RatelimitException: https://links.duckduckgo.com/d.js?q=%E7%BE%8E%E5%9B%BD&kl=wt-wt&l=wt-wt&p=&s=0&df=y&vqd=4-265164403837274910116468914437927397460&ex=-2 202 Ratelimit
@hfoi589
Copy link

hfoi589 commented May 11, 2024

一个月前就有issue了,到现在都没解决,凉了

@eruditus-ginkgo
Copy link
Author

一个月前就有issue了,到现在都没解决,凉了

那么早就有Issue了吗?但是我是最近几天才发现问题。

@sakeven
Copy link

sakeven commented Jun 24, 2024

duckduckgo-search 依赖升级到 6.1.7,应该就可以解决。

修改 requirements.txt

duckduckgo-search>=6.1.7

@binjie09
Copy link
Owner

依赖已更新,docker 最新镜像已推,测试可使用

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

4 participants