Can't use externalapi
I use the free trial of ecognition software developer and I created a virtual environment and installed the requirements but when I try to use the python external api (ecognitionapi) it gives me this error:
EcognitionException Traceback (most recent call last) Cell In[2], line 45 40 ecogApi.close_project() 44 if __name__ == "__main__": ---> 45 array_example() Cell In[2], line 18 15 print(f"Example: how to set input array parameter and get output array from the ruleset.") 17 # create eCognition API ---> 18 with ecog.EcognitionApi(log_file_path=os.path.abspath("logs/engine.log")) as ecogApi: 19 # load rule set 20 ecogApi.load_ruleset(os.path.abspath("rulesets/arrays.dcp")) 21 # add image File c:\Users\MohamedRaafat\anaconda3\envs\oil_spill\lib\site-packages\ecognitionapi\__init__.py:52, in EcognitionApi.__init__(self, log_file_path, license_server) 37 def __init__(self, log_file_path: str, license_server: Optional[str] = None): 38 """Initialize and start the eCognition engine. 39 40 Args: (...) 49 EcognitionException: If an error occurs. 50 """ ---> 52 ecog_internal.startup(log_file_path, license_server) EcognitionException: Engine creation failed. Failed to checkout alternative license: Cannot find license file. The license files (or license server system network addresses) attempted are listed below. Use LM_LICENSE_FILE to use a different license file, or contact your software provider for a license file. Feature: eCognitionServer Filename: c:\Users\MohamedRaafat\anaconda3\envs\oil_spill\lib\site-packages\ecognitionapi\ecognition_engine\lic License path: c:\Users\MohamedRaafat\anaconda3\envs\oil_spill\lib\site-packages\ecognitionapi\ecognition_engine\lic; FlexNet Licensing error:-1,359. System Error: 2 "No such file or directory" Engine plugin loading failed. Please check your license and the installation.
Was this article helpful?
1 comment
Hi Mohamed,
You are trying to use the eCognition engine and for such purpose you need a license. For using eCognition Developer trial, you do not need a license.
Best regards,
Javier