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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.