simple-salesforce-deploy-requires-sandbox-bool-and-bytes-io
SfdcMetadataApi.deploy() has two non-obvious requirements: (1) the second positional argument must be a boolean sandbox (True for sandbox orgs, False for production) — omitting it causes a silent TypeError; (2) the first argument must be a file path string or IO[bytes] object, NOT a base64 string. To pass in-memory content, decode base64 first then wrap in io.BytesIO() before calling deploy(). Determine sandbox status from api_client.org_configs[org_alias]['type'] == 'sandbox'.
Related
- simple-salesforce-deploy-requires-sandbox-bool-and-bytesio
- simple-salesforce-deploy-signature-sandbox-second-positional
- simple-salesforce-deploy-sandbox-positional-arg-required
- simple-salesforce-mdapi-deploy-sandbox-positional-arg
- simple-salesforce-deploy-requires-sandbox-positional-arg
- salesforce-mcp-three-org-connections-production-fullcopy-mar
- simple-salesforce-deploy-sandbox-positional-arg