Skip to content

Troubleshooting

Ensure you have Python 3.10 or later:

Terminal window
python --version

If your system Python is older, use a virtual environment:

Terminal window
python3.10 -m venv .venv
source .venv/bin/activate # macOS/Linux
.venv\Scripts\activate # Windows
pip install qubithub-sdk

”missing bearer token” or “missing api key”

Section titled “”missing bearer token” or “missing api key””

Your request has no authentication credentials. Endpoints that need a login require a JWT bearer token:

  • Log in interactively: qubithub login (the CLI handles tokens automatically)

Your JWT token has expired (tokens last 15 minutes). The CLI refreshes automatically, but if you see this in a script:

Terminal window
qubithub logout && qubithub login

The CLI stores a refresh token at login and renews the access token with it, so automation run through the CLI or SDK stays signed in until that refresh token expires or you log out.

The API key doesn’t match any active key. Possible causes:

  • The key was revoked (qubithub keys list to check)
  • The key has expired (check expiration date)
  • You’re using the key prefix (qh_a1b2c3d4) instead of the full key

Your account has been deactivated. Email [email protected] to resolve this.

You should not see this with an API key today: no API route accepts API keys yet, and git decides access by who owns the circuit, not by scopes. Commands such as qubithub circuits push use your login (qubithub login), not a key.

To create a key with broad scopes for when key authentication reaches the API:

Terminal window
qubithub keys create "full access" --scopes circuit:read,circuit:write,runs:submit

For a full overview of authentication methods, see the Authentication guide.

My circuit works locally but fails on QubitHub

Section titled “My circuit works locally but fails on QubitHub”

The sandbox is more restrictive than your local environment. If your circuit runs on your machine but fails on QubitHub, check these common differences:

  1. Imports: Only Qiskit, PennyLane, Cirq, NumPy, SciPy, Matplotlib, and select standard library modules are available. No pandas, sklearn, requests, etc.
  2. No file I/O: Functions like open(), numpy.loadtxt(), and matplotlib.savefig() are blocked. Return results in memory instead.
  3. No dynamic builtins: eval, exec, compile, getattr, setattr are blocked. Use direct attribute access and static code.
  4. No network: The sandbox cannot make HTTP requests or install packages.
  5. Code length: Maximum 100,000 characters.
  6. Timeout: Default 30 seconds. PennyLane and Cirq circuits can raise it to 300 via [execution] timeout_seconds; Qiskit Python circuits are fixed at 30 seconds for now.

The sandbox only permits a curated set of imports. Allowed packages:

  • Quantum: qiskit, qiskit_aer, pennylane, cirq
  • Scientific: numpy, scipy, matplotlib
  • Standard library: math, cmath, random, json, collections, itertools, functools, typing, dataclasses

If you see Import of 'subprocess' is not allowed or similar, your code is using a blocked module. Rewrite to avoid system-level imports.

”Reference to ’…’ is not allowed (dangerous builtin)”

Section titled “”Reference to ’…’ is not allowed (dangerous builtin)””

The sandbox blocks builtins that can bypass security restrictions: eval, exec, compile, open, __import__, getattr, setattr, globals, locals, and others.

  • Instead of open(): Bind the circuit to a variable instead of writing files; Space runs return printed output.
  • Instead of getattr(obj, 'attr'): Use direct attribute access: obj.attr.
  • Instead of eval() / exec(): Write the logic statically in your circuit code.

”Access to ’…’ is not allowed for security reasons”

Section titled “”Access to ’…’ is not allowed for security reasons””

Certain attributes are blocked to prevent sandbox escapes: for example, accessing __subclasses__, __code__, or __globals__. Stick to the public API of allowed packages.

”Import of ’…’ is not allowed (file I/O is prohibited)”

Section titled “”Import of ’…’ is not allowed (file I/O is prohibited)””

File I/O functions from allowed packages are blocked individually. This includes numpy.loadtxt, numpy.save, scipy.loadmat, matplotlib.savefig, and matplotlib.imread. The sandbox filesystem is read-only, so return results in memory instead of writing files.

Your circuit took longer than the configured timeout. This usually means the circuit needs more time or resources than the defaults allow. To fix:

  • Reduce shots: Fewer shots means faster execution. Try --shots 100 for a quick test (though results will be noisy; 1,024+ shots give reliable statistics).
  • Reduce qubit count: Statevector simulation doubles in memory and time for each added qubit. The simulator takes up to 24 qubits, but a 24-qubit PennyLane circuit can need more than the default 30 seconds.
  • Increase timeout (PennyLane and Cirq only): Set timeout_seconds in your qubithub.toml [execution] section (up to 300). Qiskit Python circuits are fixed at 30 seconds for now.

”Code execution is unavailable: Docker sandbox is required but not accessible”

Section titled “”Code execution is unavailable: Docker sandbox is required but not accessible””

The platform requires Docker for code execution and it’s currently unreachable. This is a server-side issue; no action is needed on your end. Circuit execution will resume once the infrastructure is restored.

”Code exceeds maximum length of N characters”

Section titled “”Code exceeds maximum length of N characters””

Circuit runs accept up to 100,000 characters; Space runs and the landing-page demo accept 5,000. Split complex logic across helper functions or reduce inline comments to stay within the limit.

When a run finishes in failed state, the run page shows a coloured badge with a short class name and a one-line hint. The badge maps a wide range of raw exceptions to one of five user-facing classes so the cause is immediately scannable without reading a stack trace.

BadgeWhat it means
Circuit File MissingThe platform couldn’t load your circuit code from storage
Parse ErrorThe circuit definition or manifest couldn’t be parsed
Execution TimeoutThe sandbox killed the run for exceeding its time limit
Backend UnavailableThe selected backend or framework isn’t available
Internal ErrorSomething went wrong on our side

The raw exception message is still preserved on the run page below the badge. The class is for scanning, the message is for diagnosing.

There is no badge for usage limits: if you are over a limit, POST /runs (and qubithub execute) is refused with 403 before a run is created.

Triggers: The execution path resolved a circuit row in the database but couldn’t read the backing file from storage. For example, circuit.py was uploaded but the storage write was partial, or a file was deleted out-of-band from the database row.

What to do: If it’s a circuit you own, re-push it: qubithub circuits push. If it’s someone else’s circuit, the owner needs to re-upload. Report it via Submit Feedback and they’ll be notified.

Triggers: A user-supplied file failed to parse. The platform classifies these as parse errors:

  • qubithub.toml syntax is invalid
  • circuit.py is not valid UTF-8
  • A Qiskit QASM / QPY / JSON ingestion failure on a malformed export
  • A runner’s own input-validation error (PythonRunnerError, CirqRunnerError, PennyLaneRunnerError)

What to do:

  • Validate your manifest locally: qubithub circuits metadata -f json
  • Re-export QASM/QPY from a clean simulation if you suspect file corruption
  • Check the raw error_message shown below the badge. It identifies the specific parser that rejected the input

Triggers: The run exceeded the sandbox’s wall-clock time limit. The default is 30 seconds. PennyLane and Cirq circuits can raise it to 300 via [execution] timeout_seconds; Qiskit Python circuits are fixed at 30 seconds for now. To raise it:

[execution]
timeout_seconds = 60

What to do:

  • Reduce shots: try 100 for a smoke test; ≥1,024 for statistically reliable results
  • Reduce qubit count: statevector memory and time double per qubit; the simulator takes up to 24 qubits, and above 20 the circuit must declare its real qubits in qubithub.toml
  • Raise timeout_seconds in your manifest up to the platform max of 300 (PennyLane and Cirq only)

See also: "Execution timed out after N seconds" above for the exact error-message form and per-shot tuning advice.

Triggers: Several distinct causes collapse to this badge:

  • You selected a hardware backend, but hardware integration is on the post-beta roadmap, not live yet
  • The circuit declares a framework whose runner can’t load, e.g. a missing Python package in the sandbox image (ImportError)
  • The selected backend type is unknown: the simulator name doesn’t match anything the executor recognises
  • The circuit is above the simulator’s 24-qubit limit
  • Another run above 20 qubits is already running. One runs at a time; try again in a minute

What to do: Pick a simulator backend that matches your circuit’s framework. The Execute dialog filters backend options to those valid for the circuit’s framework, so picking from that list is the safest path. If you’re certain the backend should work and it’s still failing, Submit Feedback. This case usually means a platform-side fix (missing package in the sandbox image).

Triggers: The fallback class. Any failure that didn’t match the specific patterns above lands here, with the raw exception preserved in error_message.

What to do: This is almost always a platform-side fault. Submit Feedback and include the run URL. The server-side audit log and Sentry trace are linked by run ID, so we can reconstruct exactly what happened.

”schema_version ’…’ is not supported”

Section titled “”schema_version ’…’ is not supported””

Your qubithub.toml specifies an unrecognized schema version. Use the currently-supported value:

schema_version = "1.0.0"

The parser maintains a SUPPORTED_SCHEMA_VERSIONS allowlist; anything outside it is rejected at validation time. Schema-version bumps will be called out in release notes when they happen.

”name must be lowercase with hyphens only”

Section titled “”name must be lowercase with hyphens only””

Circuit names must match the slug format: lowercase letters, digits, and hyphens only. No spaces, underscores, or uppercase.

# Bad
name = "My_Circuit"
# Good
name = "my-circuit"

The framework field only accepts: qiskit, pennylane, cirq, braket, or openqasm3. Check for typos or capitalization issues; the value is case-sensitive.

braket (Amazon Braket, AWS) passes this manifest check, but a Braket circuit cannot be created or pushed today: circuit creation and the CLI accept only qiskit, pennylane, cirq and openqasm3.

The type field only accepts: circuit, dataset, space, or benchmark.

”project.framework must have a corresponding entry in [implementations]”

Section titled “”project.framework must have a corresponding entry in [implementations]””

If you declare multi-framework support in [implementations], the primary framework must have a matching entry. Either add the implementation or remove the [implementations] section.

If qubithub circuits push reports a parse error, validate your manifest locally:

Terminal window
qubithub circuits metadata -f json

Common TOML mistakes:

  • Missing quotes around string values
  • Using : instead of = for assignments (TOML uses =, not :)
  • Incorrect array syntax (use ["H", "CX"] not [H, CX])

For the full manifest specification, see the qubithub.toml Reference.

”API rate limit exceeded. Please try again later.”

Section titled “”API rate limit exceeded. Please try again later.””

You’ve hit the API rate limit. The limit is counted per IP address and is the same on every plan. The response includes a Retry-After header indicating how many seconds to wait.

”Star rate limit exceeded” / “Fork rate limit exceeded”

Section titled “”Star rate limit exceeded” / “Fork rate limit exceeded””

Star and fork operations have separate, stricter rate limits to prevent abuse. The Retry-After header indicates how long to wait.

Signup and waitlist endpoints have aggressive rate limiting. Wait a few minutes before retrying.

You’ve reached your tier’s storage quota (100 MB during beta). To free space:

  • Delete datasets or forked circuits you no longer need. Storage is checked when you upload a dataset version or fork.
  • Contact us about higher limits if you need more space

”Circuits limit exceeded: X/Y circuits used”

Section titled “”Circuits limit exceeded: X/Y circuits used””

You’ve hit the maximum circuit count for your tier (10 during beta). Delete unused circuits or contact us about higher limits. The same pattern applies to datasets (5 during beta).

On the Free plan you can submit 100 runs in any rolling 30-day window. Every submitted run counts, including failed ones. There is no compute-time limit today.

Run limits use a rolling 30-day window, so a run stops counting 30 days after you submitted it. Circuit, dataset and Space limits are counts: delete one to free a slot.

”Total upload size exceeds N MB limit”

Section titled “”Total upload size exceeds N MB limit””

One upload may total at most 50 MB, and each file at most 10 MB. Split larger uploads.

”You are not a member of this organization”

Section titled “”You are not a member of this organization””

You’re trying to act on an organization you don’t belong to. Check the organization slug.

Some organization operations (security settings, member management) require Admin or Owner role. Ask your organization owner to update your permissions.