Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
pkumar0208
Regular Visitor

Decryption failure in fabric notebook. Error: potential problem: ERROR: pkdecrypt_failed 67108876

In our fabric environment, we use pyspark(Python) to decrypt the pgp files that is placed in fabric lakehouse. When we try to decrypt the files from fabric notebook via below command, we are unable to decypt the pgp file that is encrypted.


with open(pgp_file_path, 'rb') as pgp_file:
    decrypted_data = gpg.decrypt_file(pgp_file, passphrase=passphrase, output=output_file_path )

Error Message:
potential problem: ERROR: pkdecrypt_failed 67108876
gpg returned a non-zero error code: 2

Note:
1. We are able to decrypt the file manually in windows using pgp tool
2. We are able to decrypt the pgp file when the same code is ran in our local machine
3. We are using python-gnupg version of 0.5.1 tried upgrading to 0.5.3 version still same error

Any suggestion or thoughts on this?
1 ACCEPTED SOLUTION
pkumar0208
Regular Visitor

Per microsoft, issue is resolved in below runtime and configuration. 

pkumar0208_0-1730198664223.png

 

View solution in original post

3 REPLIES 3
pkumar0208
Regular Visitor

Per microsoft, issue is resolved in below runtime and configuration. 

pkumar0208_0-1730198664223.png

 

Anonymous
Not applicable

Hi @pkumar0208 ,

 

decrypted_data = gpg.decrypt_file(pgp_file, passphrase=passphrase, output=output_file_path )
How do you initialize gpg in the pyspark environment of fabric, I'm stuck here.
If anyone else would like to suggest something, please feel free to do so here.

Best Regards,
Gao

Community Support Team

Hi @Anonymous  - Thanks for the response. In our fabric/power bi workspace under worskpace spark setting, we had uploaded the 0.5.1 gnupg package. 

 

pkumar0208_0-1727937826223.png

 

 

 

Helpful resources

Announcements
April Fabric Update Carousel

Fabric Monthly Update - April 2026

Check out the April 2026 Fabric update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.