|
11 | 11 | }, |
12 | 12 | { |
13 | 13 | "cell_type": "code", |
14 | | - "execution_count": 29, |
| 14 | + "execution_count": 1, |
15 | 15 | "id": "d99f5fbc", |
16 | 16 | "metadata": {}, |
17 | 17 | "outputs": [], |
|
138 | 138 | }, |
139 | 139 | { |
140 | 140 | "cell_type": "code", |
141 | | - "execution_count": 27, |
| 141 | + "execution_count": 7, |
142 | 142 | "id": "b5ee27f5-9e69-4557-ba83-ec7cb74aa874", |
143 | 143 | "metadata": {}, |
144 | 144 | "outputs": [], |
|
227 | 227 | { |
228 | 228 | "data": { |
229 | 229 | "application/vnd.jupyter.widget-view+json": { |
230 | | - "model_id": "555f3f3003e74388992ac2b18b4c98cb", |
| 230 | + "model_id": "bdd9f31419e3429d87b2fc1696eb174a", |
231 | 231 | "version_major": 2, |
232 | 232 | "version_minor": 0 |
233 | 233 | }, |
|
320 | 320 | }, |
321 | 321 | { |
322 | 322 | "cell_type": "code", |
323 | | - "execution_count": 12, |
| 323 | + "execution_count": 13, |
324 | 324 | "id": "02e5c413-d110-4110-be59-c86e5226edc5", |
325 | 325 | "metadata": {}, |
326 | 326 | "outputs": [], |
|
363 | 363 | }, |
364 | 364 | { |
365 | 365 | "cell_type": "code", |
366 | | - "execution_count": 30, |
| 366 | + "execution_count": 14, |
367 | 367 | "id": "ac428293-7cd4-49a8-9bfa-4e0dc8f4d2cc", |
368 | 368 | "metadata": {}, |
369 | 369 | "outputs": [ |
370 | 370 | { |
371 | 371 | "data": { |
372 | 372 | "application/vnd.jupyter.widget-view+json": { |
373 | | - "model_id": "78b9621c2829433ab6a1c7a766cd6ada", |
| 373 | + "model_id": "cfd872eeb095427891fb447f4094cea5", |
374 | 374 | "version_major": 2, |
375 | 375 | "version_minor": 0 |
376 | 376 | }, |
|
382 | 382 | "output_type": "display_data" |
383 | 383 | }, |
384 | 384 | { |
385 | | - "ename": "ConnectionClosedError", |
386 | | - "evalue": "received 1012 (service restart); then sent 1012 (service restart)", |
387 | | - "output_type": "error", |
388 | | - "traceback": [ |
389 | | - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
390 | | - "\u001b[0;31mConnectionResetError\u001b[0m Traceback (most recent call last)", |
391 | | - "File \u001b[0;32m~/.pyenv/versions/3.10.12/lib/python3.10/asyncio/selector_events.py:862\u001b[0m, in \u001b[0;36m_SelectorSocketTransport._read_ready__data_received\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 861\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 862\u001b[0m data \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_sock\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrecv\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmax_size\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 863\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m (\u001b[38;5;167;01mBlockingIOError\u001b[39;00m, \u001b[38;5;167;01mInterruptedError\u001b[39;00m):\n", |
392 | | - "\u001b[0;31mConnectionResetError\u001b[0m: [Errno 54] Connection reset by peer", |
393 | | - "\nThe above exception was the direct cause of the following exception:\n", |
394 | | - "\u001b[0;31mConnectionClosedError\u001b[0m Traceback (most recent call last)", |
395 | | - "Cell \u001b[0;32mIn[30], line 85\u001b[0m\n\u001b[1;32m 82\u001b[0m \u001b[38;5;28;01mbreak\u001b[39;00m\n\u001b[1;32m 84\u001b[0m \u001b[38;5;66;03m# Run the websocket listener in the notebook\u001b[39;00m\n\u001b[0;32m---> 85\u001b[0m \u001b[38;5;28;01mawait\u001b[39;00m listen_for_updates()\n", |
396 | | - "Cell \u001b[0;32mIn[30], line 53\u001b[0m, in \u001b[0;36mlisten_for_updates\u001b[0;34m()\u001b[0m\n\u001b[1;32m 51\u001b[0m \u001b[38;5;28;01masync\u001b[39;00m \u001b[38;5;28;01mwith\u001b[39;00m websockets\u001b[38;5;241m.\u001b[39mconnect(ws_url) \u001b[38;5;28;01mas\u001b[39;00m websocket:\n\u001b[1;32m 52\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[0;32m---> 53\u001b[0m message \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mawait\u001b[39;00m websocket\u001b[38;5;241m.\u001b[39mrecv()\n\u001b[1;32m 54\u001b[0m message \u001b[38;5;241m=\u001b[39m json\u001b[38;5;241m.\u001b[39mloads(message)\n\u001b[1;32m 55\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m message\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdata\u001b[39m\u001b[38;5;124m\"\u001b[39m):\n", |
397 | | - "File \u001b[0;32m~/.pyenv/versions/3.10.12/lib/python3.10/site-packages/websockets/asyncio/connection.py:322\u001b[0m, in \u001b[0;36mConnection.recv\u001b[0;34m(self, decode)\u001b[0m\n\u001b[1;32m 318\u001b[0m \u001b[38;5;66;03m# fallthrough\u001b[39;00m\n\u001b[1;32m 319\u001b[0m \n\u001b[1;32m 320\u001b[0m \u001b[38;5;66;03m# Wait for the protocol state to be CLOSED before accessing close_exc.\u001b[39;00m\n\u001b[1;32m 321\u001b[0m \u001b[38;5;28;01mawait\u001b[39;00m asyncio\u001b[38;5;241m.\u001b[39mshield(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mconnection_lost_waiter)\n\u001b[0;32m--> 322\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mprotocol\u001b[38;5;241m.\u001b[39mclose_exc \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01mself\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mrecv_exc\u001b[39;00m\n", |
398 | | - "\u001b[0;31mConnectionClosedError\u001b[0m: received 1012 (service restart); then sent 1012 (service restart)" |
| 385 | + "name": "stdout", |
| 386 | + "output_type": "stream", |
| 387 | + "text": [ |
| 388 | + "Open this URL in your browser: https://auth.dev.apex.esa.int/realms/apex/protocol/openid-connect/auth?response_type=code&client_id=apex-dispatcher-api-dev&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fcallback&state=wzS1d9cJVrWTXbQ27HCDVbvVdso5bQ\n" |
| 389 | + ] |
| 390 | + }, |
| 391 | + { |
| 392 | + "name": "stdin", |
| 393 | + "output_type": "stream", |
| 394 | + "text": [ |
| 395 | + "Paste the redirect URL here: http://localhost:8000/callback?state=wzS1d9cJVrWTXbQ27HCDVbvVdso5bQ&session_state=d950c21c-c40d-4b4d-8b65-12d7b2703775&iss=https%3A%2F%2Fauth.dev.apex.esa.int%2Frealms%2Fapex&code=298bbded-109e-4a33-a68f-884d509fe72f.d950c21c-c40d-4b4d-8b65-12d7b2703775.c2e791df-00a5-4981-b8af-b014848a2b73\n" |
| 396 | + ] |
| 397 | + }, |
| 398 | + { |
| 399 | + "name": "stdout", |
| 400 | + "output_type": "stream", |
| 401 | + "text": [ |
| 402 | + "Job finished with status finished\n" |
| 403 | + ] |
| 404 | + }, |
| 405 | + { |
| 406 | + "name": "stderr", |
| 407 | + "output_type": "stream", |
| 408 | + "text": [ |
| 409 | + "/var/folders/50/09_2zmx12zj6ks4fdl4y9wgc0000gn/T/ipykernel_60510/627856076.py:81: RuntimeWarning: coroutine 'Connection.close' was never awaited\n", |
| 410 | + " websocket.close()\n", |
| 411 | + "RuntimeWarning: Enable tracemalloc to get the object allocation traceback\n" |
399 | 412 | ] |
400 | 413 | } |
401 | 414 | ], |
|
0 commit comments