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:
一、讯飞语音鼠标m520使用教程?
讯飞语音鼠标m520的使用教程如下
1、正面除了常规的按键之外还增添了左侧语音键以及右侧特殊功能键,中间凹陷弧线提供握持支点
2、左侧语音键可以进行语音打字,语音上网等。按下左侧语音键说话,说完松手就可实现。
3、右侧特殊功能键用于屏幕取词翻译以及在office中进行相应的智能控制。
4、背面左侧充电口,右侧是电源开关,底部旋转拆开后盖可取出无线接收器。
安装使用:调试无线接收器
(1)逆时针旋转10°,打开MiMouse S背面滑盖(打开会听见一声响。第一次打开后盖的时候回有点紧,这时需要轻轻在手掌上拍几下);
(2)取出放在MiMouse S后盖中的无线接收器;
(3)无线接收器插入电脑上USB接口,开始安装鼠标硬件驱动(第一次可能需要等待1-2分钟,当鼠标可以正常移动的时候,则表示驱动已经成功安装);
(4)顺时针转动可拆后盖,扣紧后盖。
注:当配对不上,需同时按住左侧语音键以及右侧按键(不是右侧特殊功能键)10s-30s,就可以配对成功
下载安装咪鼠程序:
(1)搜索“咪鼠”登录咪鼠官网下载产品的驱动软件(咪鼠官网:www.mimouse.net)在导航栏中找到软件下载,找到对应的MiMouse S的驱动软件,点击立即下载;
(2)下载完成、点击安装,按照提示点击下一步,安装成功后会在电脑屏幕右下角任务栏出现一个红色咪鼠图标。(若未识别到鼠标或头像成灰色,需要检查鼠标连接是否正常和其他原因,具体可联系咪鼠官方售后 *** )
二、英菲克px2无线鼠标使用 *** ?
1、使用 *** 比较简单。
2、因为英菲克px2无线鼠标采用2.4GHz无线技术连接电脑,只需要在电脑上插入接收器,等待电脑自动识别后,即可开始使用。
3、如果需要更精准的控制,可以在电脑系统中调整鼠标灵敏度和滚轮速度。
而且这个无线鼠标还支持侧面功能键,可以通过设置来自定义功能。
为了延长电池寿命,不使用时最好关闭鼠标开关或取出电池。
三、简单百宝盒鼠标使用 *** ?
优质答案1:
简单百宝盒是一款功能多样的电脑鼠标,使用 *** 如下:
1. 连接简单百宝盒鼠标:在计算机开机的情况下将简单百宝盒与计算机连接。如果是有线鼠标,则直接将鼠标插入计算机的 USB 接口;如果是无线鼠标,则需要先连接鼠标的接收器到计算机,然后按下鼠标底部的配对键配对成功后即可使用。
2. 鼠标基本操作:左键点击实现左键单击,右键点击实现右键单击。左键双击表示快速打开某个程序或文件,右键单击通常用于显示菜单。同时,鼠标也支持滚轮滚动、左右移动等操作。
3. 安装驱动程序:如果需要使用鼠标的高级功能,需要下载并安装对应的驱动程序。驱动程序可以在官方网站上下载。
4. 进行自定义设置:安装驱动程序之后,可以通过简单百宝盒的软件对鼠标进行自定义设置。用户可以根据自己的喜好和需求,设置鼠标灵敏度、宏设置、媒体控制等相关功能。
总之,简单百宝盒的使用 *** 与普通的鼠标并无区别,但其支持多种实用的功能,并能够进行个性化的自定义设置,让用户更加方便快捷地使用电脑。
优质答案2:
1. 百宝盒鼠标使用 *** 非常简单。
2. 可以通过USB接口将鼠标连接到电脑上,系统会自动识别并安装驱动程序。
然后就可以开始使用了,无需额外安装其他软件。
3. 若需要更改鼠标的设置,如调整灵敏度、更改按键功能等,可以在电脑的设置界面中找到鼠标选项,进行相应的设置。
使用 *** 非常方便。
优质答案3:
1. 百宝盒鼠标使用 *** 十分简单,适用于初学者。
2. 百宝盒鼠标采用无线连接,只需要将USB接收器插入电脑的USB口即可自动安装驱动程序,不需要额外的设置或安装。
3. 在使用时,只需要按下鼠标上的左键或右键即可完成单击或双击操作,滚轮可以滚动网页或页面内容。
4. 此外,百宝盒鼠标还配备了一些额外的按键和手势功能,可以通过下载厂家提供的驱动程序进行设置和自定义。
5. 总的来说,百宝盒鼠标使用简单、方便、实用,是一款性价比很高的鼠标产品。
四、什么是无线鼠标,无线鼠标如何使用?
无线鼠标介绍和如何使用的说明:
无线鼠标是指无线缆直接连接到主机的鼠标。
无线鼠标介绍
1 一般采用27M、2.4G、蓝牙技术实现与主机的无线通讯。
2 目前大部的无线鼠标有效距离是10米左右,也有些无线鼠标能够达到30米左右。平时我们用无线鼠标时无非是三个场景:1米内(鼠标正常使用距离);3米距离(针对家庭多媒体用户);10米距离(针对会议室、演讲台等远距离使用用户)。这些距离,可以很肯定地说,市面上的主流无线鼠标都能做到,山寨劣质鼠标就不敢保证了
3 无线鼠标器是为了适应大屏幕显示器而生产的。所谓“无线”,即没有电线连接,而是采用二节七号电池无线摇控,鼠标器有自动休眠功能,电池可用上一年,接收范围在1.8米以内。

无线鼠标使用 *** 介绍:
1、按住鼠标后盖用力推,打开鼠标后盖(不同的鼠标打开后盖 *** 或有不同,参考相应的开法),装上电池。
2、把接收器插上电脑的USB接口上。
3、鼠标与接收器对码(接收器一定要接到电脑上。将鼠标底部的小按钮与接收器上面的大按钮同时按下约一秒不到的时间)(首次作用或更换电池时需对码,平时使用无需对码)

五、使用无线鼠标后如何切换触摸板?
1.移动:用手直接触摸触摸板即可,向上滑动鼠标箭头就向上。其他方向同样。
2.单击:用手指轻轻敲击触摸板或者按左边的长方形按钮。
3.双击:用手指轻轻敲击触摸板2次或者按左边的长方形按钮2次。
4.单击鼠标右键:按右边的长方形按钮。
5.这样使用无线鼠标后完成切换触摸板了。
版权声明:免责声明:本文来源网友投稿及网络整合仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。投诉邮箱:1765130767@qq.com.