我运行的时候出现如下错误,可否帮忙解决?
📰 正在爬取文章内容: https://www.bbc.com/news/articles/cqx0v5xprz4o
🔹 BBC全球经济 – Morrisons to close 52 cafes and 17 convenience stores 获取成功
Traceback (most recent call last):
File “/home/runner/work/FinNewsCollectionBot/FinNewsCollectionBot/financebot.py”, line 156, in
summary = summarize(analysis_text)
File “/home/runner/work/FinNewsCollectionBot/FinNewsCollectionBot/financebot.py”, line 128, in summarize
completion = openai_client.chat.completions.create(
File “/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/openai/_utils/_utils.py”, line 279, in wrapper
return func(*args, **kwargs)
File “/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/openai/resources/chat/completions/completions.py”, line 914, in create
return self._post(
File “/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/openai/_base_client.py”, line 1242, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File “/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/openai/_base_client.py”, line 919, in request
return self._request(
File “/opt/hostedtoolcache/Python/3.9.21/x64/lib/python3.9/site-packages/openai/_base_client.py”, line 1023, in _request
raise self._make_status_error_from_response(err.response) from None
openai.APIStatusError: Error code: 402 – { error : { message : Insufficient Balance , type : unknown_error , param : None, code : invalid_request_error }}
Error: Process completed with exit code 1.
© 版权声明
文章版权归作者所有,未经允许请勿转载。如内容涉嫌侵权,请在本页底部进入<联系我们>进行举报投诉!
THE END
如果内容对您有所帮助,就支持一下吧!
- 最新
- 最热
只看作者bbc不给我们这样爬,后续我研究下通过爬虫爬大网站
大神,麻烦看下我这个是什么错误
我跑出来也是这个错误