Skip to main content
sramanujam
Staff
Staff
January 1, 2026

Troubleshooting Tip: How to resolve the Code Snippet error with "cannot pickle 'PyCapsule' object"

  • January 1, 2026
  • 0 replies
  • 104 views
Description

This article describes how to handle an issue where the code snippet fails in FortiSOAR with an error message indicating 'ERROR :: cannot pickle 'PyCapsule' object'.

 

"CS-INTEGRATION-5: Error occurred while executing the connector action ERROR :: cannot pickle 'PyCapsule' object Call for URL: https://localhost:9595/integration/execute/ failed with status code 400"

Scope FortiSOAR 7.5.x, 7.6.x
Solution

Step 1: Get the current version of the installed Code Snippet RPM:

 

rpm -qa | grep cyops-connector-code-snippet

cyops-connector-code-snippet-2.1.2-9455.el8.x86_64.rpm

 

Step 2: Update the Code Snippet RPM using YUM Manager

 

sudo yum update cyops-connector-code-snippet -y

 

Step 3: Remove the pycache and restart the uwsgi services.

 

rm -rf /opt/cyops-integrations/integrations/connectors/pycache;
sudo systemctl restart uwsgi

 

Step 4: Get the updated version of the installed Code Snippet RPM.

 

rpm -qa | grep cyops-connector-code-snippet

cyops-connector-code-snippet-2.1.4-10717.el9.x86_64

 

After restarting the uwsgi service, try running the playbook again.