EnclaveSDK has no attribute WritebackApi

Created by Taljinder Kaur, Modified on Fri, 3 Apr at 5:27 PM by Taljinder Kaur

Error message

writeback_api = EnclaveSDK.WritebackApi(api_client)

AttributeError: module 'EnclaveSDK' has no attribute 'WritebackApi'

Error executing the command


Cause

This error occurs because the currently installed version of EnclaveSDK does not support writeback functionality (i.e., it does not include WritebackApi).


Impact

  • Any code paths that attempt to perform writeback via EnclaveSDK.WritebackApi fail.
  • May prevent data from being written back to the writeback storage.


Resolution / Workaround

  1. Pin EnclaveSDK to a compatible version

In your algorithm’s requirements.txt, as an explicitly set:

EnclaveSDK==2.1.2

  1. Rebuild and redeploy the algorithm image
    • Install dependencies using the updated requirements.txt.
    • Rebuild your container image.
    • Push the updated image and re-run the job.
  2. Verify writeback behavior
    • After upgrading, rerun the workflow that performs writeback.
    • Confirm that no AttributeError occurs and that results are correctly written back.


Best practices

  • Always pin SDK/library versions in requirements.txt instead of relying on latest.
  • Track SDK feature requirements (e.g., writeback) and ensure versions support needed APIs.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article