{"record":{"id":"98e5214c00e138b9","repo":"OpenBB-finance/OpenBB","slug":"failed-to-get-jupyter-url","errorCode":null,"errorMessage":"Failed to get Jupyter URL","messagePattern":"Failed to get Jupyter URL","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"desktop/src/routes/environments.tsx","lineNumber":1935,"sourceCode":"\t\t\t// Register for process monitoring\n\t\t\tconst processId = `jupyter-${envName}`;\n\t\t\tawait invoke(\"register_process_monitoring\", { processId });\n\n\t\t\tconst result = await invoke<JupyterStatus>(\"start_jupyter_server\", {\n\t\t\t\tenvironment: envName,\n\t\t\t\tdirectory: installDir,\n\t\t\t\tworking: workDir,\n\t\t\t});\n\n\t\t\tif (result?.url) {\n\t\t\t\tjupyterUrlRef.current[envName] = result.url;\n\t\t\t\tsetJupyterStatus((prev) => ({ ...prev, [envName]: \"running\" }));\n\t\t\t\tactiveServers.current.add(envName);\n\n\t\t\t\t// Open URL in browser window\n\t\t\t\topenJupyterWindow(`${result.url}?token=launcher`);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Failed to get Jupyter URL\");\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tsetJupyterStatus((prev) => ({ ...prev, [envName]: \"error\" }));\n\t\t\tjupyterUrlRef.current[envName] = null;\n\t\t\talert(`Failed to start Jupyter: ${err}`);\n\t\t}\n\t};\n\n\t// Stop Jupyter server\n\tconst stopJupyterServer = async (envName: string) => {\n\t\tif (jupyterStatus[envName] !== \"running\") return;\n\n\t\ttry {\n\t\t\tsetJupyterStatus((prev) => ({ ...prev, [envName]: \"stopping\" }));\n\t\t\tawait invoke(\"stop_jupyter_server\", { environment: envName });\n\t\t} catch (err) {\n\t\t\ttry {\n\t\t\t\tconst status = await invoke<JupyterStatus>(\"check_jupyter_server\", {","sourceCodeStart":1917,"sourceCodeEnd":1953,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/desktop/src/routes/environments.tsx#L1917-L1953","documentation":"Raised at market_snapshots.py:177 when the Intrinio snapshots endpoint responded successfully but contained no usable file URLs: either the 'snapshots' key was absent/empty, or none of the snapshot entries had a 'files' list with a 'url' entry. It means the API call itself succeeded but there is no snapshot data for the requested time. OpenBB treats this as a hard error so callers do not mistake an empty result for an empty market.","triggerScenarios":"Calling `equity.market_snapshots(provider='intrinio', date=...)` where `at_datetime` points at a moment with no snapshot files: weekends/market holidays, a date outside the available historical window (data starts mid-June 2022), a future datetime, a date-only value that transform_query forces to 20:00 America/New_York (line 108-117) landing after the last snapshot, or the current day's snapshot not yet published. Also occurs if Intrinio changes its response schema (renames 'snapshots'/'files'/'url') so URL extraction silently finds nothing.","commonSituations":"Backfilling historical snapshots with dates before June 2022; requesting today's date before the snapshot file is generated; querying weekends/holidays; date passed as a naive string that gets normalized to an 8 PM ET default; upstream schema drift after an Intrinio API change.","solutions":["Retry without a date to get the latest available snapshot, or move the date to a trading day within the supported window (mid-June 2022 to present).","If passing a plain date, pass a full ISO datetime with timezone (e.g. '2024-03-08T15:00:00-0500') instead of '2024-03-08' — date-only inputs are silently coerced to 20:00 ET which may be past the last snapshot.","Inspect the raw response to confirm data exists for that datetime: curl 'https://api-v2.intrinio.com/securities/snapshots?api_key=KEY&at_datetime=2024-03-08T15:00:00-0500' and check for snapshots[].files[].url.","If the raw API does return files but the error still fires, the Intrinio response schema changed — check for an updated openbb_intrinio provider package (pip install -U openbb-intrinio).","Wrap the call and treat this error as 'no data for requested time', falling back to the nearest earlier trading day."],"exampleFix":"# before\nres = obb.equity.market_snapshots(provider='intrinio', date='2024-03-09')  # Saturday -> No snapshots found.\n\n# after\nres = obb.equity.market_snapshots(provider='intrinio', date='2024-03-08T15:00:00-0500')  # trading day, explicit time","handlingStrategy":"validation","validationCode":"from datetime import datetime, timezone, timedelta\n\n# NY market hours ~ 9:30-16:00 ET on weekdays; snapshots exist only from ~June 2022\nHISTORY_START = datetime(2022, 6, 15, tzinfo=timezone.utc)\n\ndef snapshot_date_is_plausible(d) -> bool:\n    if d is None:\n        return True  # latest snapshot\n    dt = d if isinstance(d, datetime) else datetime.fromisoformat(str(d))\n    return dt.weekday() < 5 and dt >= HISTORY_START and dt <= datetime.now(timezone.utc) + timedelta(minutes=5)","typeGuard":"def is_no_snapshots_error(exc: Exception) -> bool:\n    \"\"\"True when the requested datetime has no snapshot files.\"\"\"\n    return isinstance(exc, OpenBBError) and 'No snapshots found' in str(exc)","tryCatchPattern":"from openbb_core.app.model.abstract.error import OpenBBError\n\ntry:\n    res = obb.equity.market_snapshots(provider='intrinio', date=d)\nexcept OpenBBError as e:\n    if 'No snapshots found' in str(e):\n        # no data for this datetime - treat as empty result or step back a trading day\n        res = None\n    else:\n        raise","preventionTips":["Request weekday trading days only; skip weekends and US market holidays.","Keep dates within the historical window (mid-June 2022 onward) and never in the future.","Pass full ISO datetimes with timezone rather than bare dates, which get coerced to 20:00 ET.","Treat this error as 'no data for time requested' in pipelines and fall back to the nearest earlier trading day instead of crashing."],"tags":["openbb","intrinio","no-data","date-handling","python"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}