{"record":{"id":"e19ef7e2b0178351","repo":"cube-js/cube","slug":"python-is-not-supported-in-fallback-build","errorCode":null,"errorMessage":"Python is not supported in fallback build","messagePattern":"Python is not supported in fallback build","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cubejs-backend-native/js/index.ts","lineNumber":560,"sourceCode":"function simplifyExpressRequest(req: ExpressRequest) {\n  // Req is a large object, let's simplify it\n  // Important: Dont pass circular references\n  return {\n    url: req.url,\n    method: req.method,\n    headers: req.headers,\n    ip: req.ip,\n\n    // req.securityContext is an extension of request done by api-gateway\n    // But its typings currently live in api-gateway package, which has native-backend (this package) as it's dependency\n    // TODO extract typings to separate package and drop as any\n    ...(Object.hasOwn(req, 'securityContext') ? { securityContext: (req as any).securityContext } : {}),\n  };\n}\n\nexport const pythonLoadConfig = async (content: string, options: { fileName: string }): Promise<PyConfiguration> => {\n  if (isFallbackBuild()) {\n    throw new Error('Python is not supported in fallback build');\n  }\n\n  const native = loadNative();\n  const config = await native.pythonLoadConfig(content, options);\n\n  if (config.checkAuth) {\n    const nativeCheckAuth = config.checkAuth;\n    config.checkAuth = async (req: ExpressRequest, authorization: string) => {\n      const nativeResult = await nativeCheckAuth(\n        simplifyExpressRequest(req),\n        authorization,\n      );\n      const securityContext = nativeResult?.security_context;\n      return {\n        ...(securityContext ? { security_context: securityContext } : {})\n      };\n    };\n  }","sourceCodeStart":542,"sourceCodeEnd":578,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-backend-native/js/index.ts#L542-L578","documentation":"Capability guard in pythonLoadConfig (cubejs-backend-native): raised when Python-based data model configuration is requested while running the fallback (no-native) build, which cannot execute the embedded Python runtime. Sentinel error indicating the feature requires a full native build.","triggerScenarios":"Thrown at packages/cubejs-backend-native/js/index.ts:560 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Deploy a full native build of cubejs-backend-native for your platform (see README supported architectures).","Remove or disable Python (py) data model usage if the deployment must stay on the fallback build."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}