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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Fabric Update Carousel

Fabric Monthly Update - September 2025

Check out the September 2025 Fabric update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors