Spaces:
Runtime error
Runtime error
Commit
•
c3a0f9b
1
Parent(s):
d151c9c
Update testlinkspark.py
Browse files- testlinkspark.py +3 -2
testlinkspark.py
CHANGED
@@ -10,8 +10,9 @@ from datetime import datetime
|
|
10 |
from time import mktime
|
11 |
from urllib.parse import urlencode
|
12 |
from wsgiref.handlers import format_date_time
|
13 |
-
#
|
14 |
import websocket
|
|
|
15 |
|
16 |
class Ws_Param(object):
|
17 |
# 初始化
|
@@ -125,7 +126,7 @@ def gen_params(appid, question):
|
|
125 |
|
126 |
def main(appid, api_key, api_secret, gpt_url, question):
|
127 |
wsParam = Ws_Param(appid, api_key, api_secret, gpt_url)
|
128 |
-
websocket.enableTrace(False)
|
129 |
wsUrl = wsParam.create_url()
|
130 |
ws = websocket.WebSocketApp(wsUrl, on_message=on_message, on_error=on_error, on_close=on_close, on_open=on_open)
|
131 |
ws.appid = appid
|
|
|
10 |
from time import mktime
|
11 |
from urllib.parse import urlencode
|
12 |
from wsgiref.handlers import format_date_time
|
13 |
+
#websocket-client
|
14 |
import websocket
|
15 |
+
from websocket import enableTrace
|
16 |
|
17 |
class Ws_Param(object):
|
18 |
# 初始化
|
|
|
126 |
|
127 |
def main(appid, api_key, api_secret, gpt_url, question):
|
128 |
wsParam = Ws_Param(appid, api_key, api_secret, gpt_url)
|
129 |
+
#websocket.enableTrace(False)
|
130 |
wsUrl = wsParam.create_url()
|
131 |
ws = websocket.WebSocketApp(wsUrl, on_message=on_message, on_error=on_error, on_close=on_close, on_open=on_open)
|
132 |
ws.appid = appid
|