IndexError: Cannot choose from an empty sequence // Werkzeug Debugger var CONSOLE_MODE = false, EVALEX = true, EVALEX_TRUSTED = false, SECRET = "Cztug1SITH6VWk19YYTC";
IndexError
IndexError: Cannot choose from an empty sequence

Traceback(most recent call last)
The above exception was the direct cause of the following exception:File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line2551, in__call__
def __call__(self, environ: dict, start_response: t.Callable) -> t.Any:
"""The WSGI server calls the Flask application object as the
WSGI application. This calls :meth:`wsgi_app`, which can be
wrapped to apply middleware.
"""
return self.wsgi_app(environ, start_response)
File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line2531, inwsgi_app
try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e)
except: # noqa: B001
error = sys.exc_info()[1]
raise
return response(environ, start_response)
finally:
File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line2528, inwsgi_app
ctx = self.request_context(environ)
error: t.Optional[BaseException] = None
try:
try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e)
except: # noqa: B001
error = sys.exc_info()[1]
File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line1825, infull_dispatch_request
request_started.send(self)
rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request()
except Exception as e:
rv = self.handle_user_exception(e)
return self.finalize_request(rv)
def finalize_request(
self,
rv: t.Union[ft.ResponseReturnValue, HTTPException],
File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line1823, infull_dispatch_request
try:
request_started.send(self)
rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request()
except Exception as e:
rv = self.handle_user_exception(e)
return self.finalize_request(rv)
def finalize_request(
File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line1799, indispatch_request
and req.method == "OPTIONS"
):
return self.make_default_options_response()
# otherwise dispatch to the handler for that endpoint
view_args: t.Dict[str, t.Any] = req.view_args # type: ignore[assignment]
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
def full_dispatch_request(self) -> Response:
"""Dispatches the request and on top of that performs request
pre and postprocessing as well as HTTP exception catching and
error handling.
File "/www/wwwroot/chat.py", line39, ingen_header
# post入参访问方式二:from-data(k-v)格式参数
@api.route('/gen_header', methods=['post'])
def gen_header():
wd = flask.request.values.get('wd')
future = executor.submit(do_heavy_work,wd)
return str(future.result())
def do_heavy_work(wd):
prompt = wd
#openai.api_key = api_key_list[-1]
openai.api_key = random.choice(api_key_list)
File "/usr/local/python3/lib/python3.7/concurrent/futures/_base.py", line435, inresult
self._condition.wait(timeout)
if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
raise CancelledError()
elif self._state == FINISHED:
return self.__get_result()
else:
raise TimeoutError()
def exception(self, timeout=None):
"""Return the exception raised by the call that the future represents.
File "/usr/local/python3/lib/python3.7/concurrent/futures/_base.py", line384, in__get_result
with self._condition:
return self._state in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED]
def __get_result(self):
if self._exception:
raise self._exception
else:
return self._result
def add_done_callback(self, fn):
"""Attaches a callable that will be called when the future finishes.IndexError: Cannot choose from an empty sequence
This is the Copy/Paste friendly version of the traceback.
concurrent.futures.process._RemoteTraceback: """Traceback (most recent call last): File "/usr/local/python3/lib/python3.7/concurrent/futures/process.py", line 239, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) File "/www/wwwroot/chat.py", line 44, in do_heavy_work openai.api_key = random.choice(api_key_list) File "/usr/local/python3/lib/python3.7/random.py", line 261, in choice raise IndexError('Cannot choose from an empty sequence') from NoneIndexError: Cannot choose from an empty sequence"""The above exception was the direct cause of the following exception:Traceback (most recent call last): File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 2551, in __call__ return self.wsgi_app(environ, start_response) File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 2531, in wsgi_app response = self.handle_exception(e) File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 2528, in wsgi_app response = self.full_dispatch_request() File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "/www/wwwroot/chat.py", line 39, in gen_header return str(future.result()) File "/usr/local/python3/lib/python3.7/concurrent/futures/_base.py", line 435, in result return self.__get_result() File "/usr/local/python3/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result raise self._exceptionIndexError: Cannot choose from an empty sequenceThe debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.Brought to you byDON'T PANIC, your friendly Werkzeug powered traceback interpreter.Console Locked
The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.
PIN:
一、智能电视怎么看卫视?
1、打开智能电视上的第三方应用当贝市场,搜索YSKS运行影视快搜;
2、打开后选择直播界面,会有国内全部的电视直播频道。
需要先给智能电视安装一款电视直播软件才能观看卫视直播节目, *** 如下:
1、准备一个U盘,在电脑上下载电视直播软件的安装包(apk格式的),如泰捷视频、电视猫、VST全聚合、沙发管家、当贝市场等软件,下载后将安装包复制到U盘的根目录下。
2、将U盘插入电视机的USB接口上,启动电视机,进入智能电视主界面。
3、使用遥控器操作,找到文件管理,按确认键打开,选择外部存储设备,继续按确认键打开,就可以看到U盘上的内容了。
4、找到U盘上保存的电视直播软件安装包,按确认键打开并根据提示信息将其安装到电视上。
5、安装完成后,返回主界面,打开电视直播软件,找到直播栏目下电视直播频道,按确认键打开就可以开始观看卫视直播节目了
二、电视怎么播放cctv频道?
在此以小米智能电视为例,首先打开电视,接着在电视的首页点击上方导航栏中的“影音”接着在此页面中点击下方的“电视直播”选项卡。
2.
然后在此页面内还不能直接进行观看,还需进行下载播放的软件,点击下载一款软件。
3.
接着在此页面内等待下载的完成。
4.
完成之后,页面回自动跳转,在此页面中点击“直播”功能选项。
5.
然后在此打开的页面内就可以看到电视台的直播了。
三、手机怎样看电视频道节目?
优质答案1:
打开Safari浏览器
找到iPhone自带浏览器并进入,在文本框里输入电视台的名字。
搜索央视官网
搜索完成后,等待页面跳转到节目的官网。
查看直播
再在官网里,点击想要查看的直播即可。
优质答案2:
首先在手机的软件市场里下载电视直播软件。比如说手机电视。下载好以后,选择自己想看的电视频道。这样的话就可以用手机看电视频道节目了。
四、智能电视机怎么,看,电视台频道?
如果电视机是安卓智能电视机,一般可以给电视机安装电视直播软件,再利用该软件联网观看电视频道; *** 如下:
1、准备一个【U盘】,在电脑上下载【电视直播软件】的安装包(apk格式的,如泰捷视频、电视猫、电视家等软件),复制并存储到【U盘】的根目录下;
2、将【U盘】插入电视机的【USB接口】;
3、启动电视机,进入智能电视主界面;
4、使用电视机的遥控器,找到【文件管理】,打开后找到【移动存储设备】并打开;
5、打开【移动存储设备】后就可以看到【U盘】上存储的文件内容了,找到【泰捷视频安装包】打开根据提示安装到电视机上即可;
6、安装完毕后返回电视机的主界面就可以找到【电视直播软件】的图标,打开找到直播栏目,选择喜欢的直播频道,按确认键就可以开始观看电视直播节目了。
五、智能电视频道怎么调?
打开智能网络电视,开机完成后,拿出遥控板找到信号源按键。
2、在网络智能电视的遥控器上,找到信号源按键,点击信号源按键进行信号源切换。
3、按下信号源按键后,利用方向键向右选择,选择到节目信源输入口,一般选择到视频即可。
4、选择到视频后,在电视遥控板上点击确认键,即可切换到电视节目。
分享
版权声明:免责声明:本文来源网友投稿及网络整合仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。投诉邮箱:1765130767@qq.com.