Skip to main content
Common issues and how to resolve them.

Authentication errors

API key invalid

Solution:
  1. Check your API key is correct: echo $QWED_API_KEY
  2. Make sure the value is not a placeholder — qwed init ignores common dummy values like your-api-key, changeme, placeholder, and xxx. Replace them with a real key.
  3. Regenerate key at cloud.qwedai.com
  4. Ensure no extra spaces or newlines

Rate limit exceeded

Solution:
  • Free tier: 100 requests/minute
  • Pro tier: 1,000 requests/minute
  • Enterprise: Unlimited

Verification failures

Math: floating-point precision

Solution: Use tolerance parameter:

Logic: unsatisfiable constraints

Solution: Check for contradictions:

Stats: Internal verification error

The Stats Engine returns this generic message when it fails to generate or translate your query into executable code. QWED masks the actual error details to prevent leaking sensitive information. Solution:
  1. Verify your query is a valid statistical question (e.g., “What is the mean of column X?”)
  2. Check that the column names in your query match the columns in your data
  3. If the issue persists, check the server-side logs for the exception type

Code: timeout

Solution:
  1. Increase timeout: client.verify_code(code, timeout=60)
  2. Simplify code (reduce loops, recursion)
  3. Use bounded verification

CLI issues

qwed init fails with “attempt to write a readonly database”

This error occurs during Step 3 of qwed init. The local server tries to create a bootstrap SQLite database in a directory that is not writable. Common examples include a read-only mount, a container filesystem, or a system-managed path. Solution: Upgrade to QWED v4.0.0 or later:
Starting with v4.0.0, qwed init automatically resolves a writable runtime directory for the database. It uses the current working directory if writable, otherwise falls back to ~/qwed-demo/. No manual intervention is needed. If you cannot upgrade, run qwed init from a writable directory:

Gemini provider issues

Missing google-generativeai package

Solution: Install the Gemini SDK alongside QWED:

Gemini API key not found

Solution: Set either GOOGLE_API_KEY or GEMINI_API_KEY:
Or run the setup wizard:

Gemini timeout errors

All Gemini API calls have a 30-second timeout. If your requests time out consistently:
  1. Check your network connection to Google’s API servers
  2. Break large inputs into smaller parts
  3. For image verification, ensure images are under 10 MB

Gemini JSON parse errors

This can happen when Gemini returns malformed JSON for complex queries. QWED automatically strips Markdown code fences from responses, but edge cases may still occur. Solution: Retry the request — the error is usually transient. If it persists, simplify your input or switch to a different provider temporarily.

SDK issues

Import error

Solution:

Async not working

Solution:

DSL syntax errors

Unknown operator

Solution: Only use allowed operators:

Missing parentheses

Solution: Count your parentheses:

Performance issues

Slow verification

Possible causes:
  1. Complex expressions with many variables
  2. Large code files
  3. Deep recursion in symbolic execution
Solutions:

High memory usage

Solution: Stream large results:

Common error codes


Getting help

  1. Documentation: docs.qwedai.com
  2. GitHub Issues: github.com/QWED-AI/qwed-verification/issues
  3. Email: support@qwedai.com
  4. Intercom: Chat widget on docs site

Debug mode

Enable debug logging: