Spaces:
Sleeping
Sleeping
Update routers/websockets_new.py
Browse files
routers/websockets_new.py
CHANGED
@@ -114,9 +114,9 @@ async def get_data(websocket:WebSocket):
|
|
114 |
#----------------#----------#------------
|
115 |
start = time.time()
|
116 |
try:
|
117 |
-
|
118 |
-
|
119 |
-
json = await websocket.receive_json()
|
120 |
except Exception as e:
|
121 |
logging.info(f"Error {e}")
|
122 |
print(f"Error {e}")
|
|
|
114 |
#----------------#----------#------------
|
115 |
start = time.time()
|
116 |
try:
|
117 |
+
json = await websocket.receive_text()
|
118 |
+
json = js.loads(json)
|
119 |
+
# json = await websocket.receive_json()
|
120 |
except Exception as e:
|
121 |
logging.info(f"Error {e}")
|
122 |
print(f"Error {e}")
|