Issue following the Explicit Queryable Encryption example

I am following example from this repo

But got error:

Traceback (most recent call last):
  File "/Users/haochen/Repos/QE/python/", line 66, in <module>
    indexed_insert_payload = client_encryption.encrypt(
  File "/Users/haochen/mambaforge/lib/python3.10/site-packages/pymongo/", line 854, in encrypt
  File "/Users/haochen/mambaforge/lib/python3.10/site-packages/pymongo/", line 803, in _encrypt_helper
    with _wrap_encryption_errors():
  File "/Users/haochen/mambaforge/lib/python3.10/", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/haochen/mambaforge/lib/python3.10/site-packages/pymongo/", line 105, in _wrap_encryption_errors
    raise EncryptionError(exc) from None
pymongo.errors.EncryptionError: HMAC validation failure

I am using MongoDB Atlas on a dedicated cluster, version 7.0.4.

“HMAC validation failure” usually indicates your “local” master key is incorrect. Ensure you’re using the same key for the entire example.