Why is it when I duplicate a marketplace module script (library) in the IDE, give the duplicate object a name and tweak some values, then duplicate a Connector object in the same module to create a custom copy, and alter it to call and import the new custom library, does it error out when attempting a test, stating that it cannot find the customized library name I created. It's like I can't duplicate objects in marketplace modules, and then reference them properly in custom versions of these objects. What am I doing wrong? I don't have great python skills, but know enough to tweak existing ones to make them do what I want. Here is an example of a test run of my custom connector object attempting to import the custom library I created. CrowdStrikeManager_MDR is the custom name of the duplicated script library I created, that I'm calling as a library import in my custom connector:
Traceback (most recent call last):
File "/opt/siemplify/siemplify_server/bin/Scripting/PythonSDK/IntegrationsVirtualEnvironment/#/CrowdStrikeFalcon_V34.0/xv5amqn5.toy/ofdyldai.223.py", line 11, in <module>
from CrowdStrikeManager import CrowdStrikeManager_MDR
ImportError: cannot import name 'CrowdStrikeManager_MDR' from 'CrowdStrikeManager' (/opt/siemplify/siemplify_server/bin/Scripting/PythonSDK/IntegrationsVirtualEnvironment/#/CrowdStrikeFalcon_V34.0/xv5amqn5.toy/CrowdStrikeManager.py)
I think you have it backwards. It should be
from CrowdStrikeManager_MDR import CrowdStrikeManager
Unless you've also changed the class name in
CrowdStrikeManager_MDR
(e.g.
class CrowdStrikeManager_MDR(object):
) in which case it would be
from CrowdStrikeManager_MDR import CrowdStrikeManager_MDR
@Andrew_Cook After making this change, I get:
Traceback (most recent call last):
File "/opt/siemplify/siemplify_server/bin/Scripting/PythonSDK/IntegrationsVirtualEnvironment/#/CrowdStrikeFalcon_V34.0/kxbtvlzv.fo5/vy0qey0v.kj4.py", line 11, in <module>
from CrowdStrikeManager_MDR import CrowdStrikeManager
ModuleNotFoundError: No module named 'CrowdStrikeManager_MDR'
what if you rename CrowdStrikeManager_MDR to CrowdStrikeManagerMDR? without underscore?
It exists, so why can't it find it?
https://us.v-cdn.net/6031969/uploads/editor/se/tfro9iwkewn6.png