{"record":{"id":"a7aa8ded78e8dba8","repo":"cube-js/cube","slug":"unable-to-load-python-configuration-because-you-ar","errorCode":null,"errorMessage":"Unable to load Python configuration because you are using the fallback build of native extension. Read more: https://github.com/cube-js/cube/blob/master/packages/cubejs-backend-native/README.md#supported-architectures-and-platforms","messagePattern":"Unable to load Python configuration because you are using the fallback build of native extension\\. Read more: https://github\\.com/cube-js/cube/blob/master/packages/cubejs-backend-native/README\\.md#supported-architectures-and-platforms","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cubejs-server/src/server/container.ts","lineNumber":280,"sourceCode":"      multiline: 'line-breaks'\n    });\n\n    const devMode = getEnv('devMode');\n    if (devMode) {\n      process.env.NODE_ENV = 'development';\n    }\n\n    if (fs.existsSync(path.join(process.cwd(), 'cube.py'))) {\n      const supported = isNativeSupported();\n      if (supported !== true) {\n        throw new Error(\n          `Native extension is required to load Python configuration. ${supported.reason}. Read more: ` +\n          'https://github.com/cube-js/cube/blob/master/packages/cubejs-backend-native/README.md#supported-architectures-and-platforms'\n        );\n      }\n\n      if (isFallbackBuild()) {\n        throw new Error(\n          'Unable to load Python configuration because you are using the fallback build of native extension. Read more: ' +\n          'https://github.com/cube-js/cube/blob/master/packages/cubejs-backend-native/README.md#supported-architectures-and-platforms'\n        );\n      }\n\n      return this.loadConfigurationFromPythonFile();\n    }\n\n    if (fs.existsSync(path.join(process.cwd(), 'cube.ts'))) {\n      return this.loadConfigurationFromMemory(\n        this.getTypeScriptCompiler().compileConfiguration()\n      );\n    }\n\n    if (fs.existsSync(path.join(process.cwd(), 'cube.js'))) {\n      return this.loadConfigurationFromFile();\n    }\n","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-server/src/server/container.ts#L262-L298","documentation":"Similar to the native-support error: cube.py was found so the Python config bridge is needed, but the installed native extension is a fallback build — one shipped without actual native functionality (e.g. a stub for unsupported platforms). isFallbackBuild() returns true, and Cube refuses to load Python configuration since the bridge cannot work.","triggerScenarios":"Having cube.py in cwd while the installed @cubejs-backend/native is a fallback stub (installed on an unsupported platform or when compilation failed and npm fell back to the stub).","commonSituations":"npm installs on unsupported platforms silently picking the fallback package; Docker multi-arch builds pulling the wrong platform variant; native build failure during install going unnoticed until runtime.","solutions":["Reinstall dependencies on a supported platform so a real native build is installed (rm -rf node_modules && npm install)","Check that @cubejs-backend/native resolved to a real build, not the fallback stub","Convert configuration from cube.py to cube.js to bypass the native Python bridge entirely","Fix the native compilation failure (missing toolchain, glibc vs musl) and rebuild"],"exampleFix":"# before\nls node_modules/@cubejs-backend/native  # fallback stub installed\n\n# after\nrm -rf node_modules package-lock.json\nnpm install   # on a supported glibc platform\n# or: remove cube.py, use cube.js","handlingStrategy":"validation","validationCode":"const { isNativeSupported, isFallbackBuild } = require('@cubejs-backend/native');\nif (fs.existsSync('cube.py')) {\n  if (isNativeSupported() !== true || isFallbackBuild()) {\n    throw new Error('Real native build required for cube.py config');\n  }\n}","typeGuard":"null","tryCatchPattern":"try {\n  await server.listen();\n} catch (e) {\n  if (e.message.includes('fallback build of native extension')) {\n    console.error('Reinstall dependencies on a supported platform or use cube.js config');\n  }\n  throw e;\n}","preventionTips":["Verify after install that @cubejs-backend/native is not the fallback stub","Rebuild native modules after changing Node versions or base images","Pin a supported platform in CI/Docker (e.g. debian-based images)","Prefer cube.js configuration to remove the native dependency"],"tags":["native-extension","python-config","fallback-build"],"backgroundTag":"native-module-unsupported-platform","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}