Jump to content

Script issue when I "Finalize App"


---
 Share

Recommended Posts

I have a rather large Python script that uses multiple files in sub-folders. When I am working on the App all the included sub scripts load fine, but when I run the script after hitting the "Finalize App" the script stops with the error that the imported scripts are not found.

Is there something I'm missing? I am currently working in V2025.

Thanks.

Link to comment
Share on other sites

Typically I link the path into "sys.path"

#
# Add the class and imports folders for setting the import locations
myclassPath = os.path.join (sys.path[0],'classes')
myimportPath  = os.path.join (sys.path[0],'imports')
sys.path.append(myclassPath)
sys.path.append(myimportPath)
#
 

Link to comment
Share on other sites

From what i see in zeiss examples - they don't bother for updates. They update behaviour of api and keep old examples without modifying it.
Now i wanted to test APP Configuration from Inspect 2023 - not working - after searching i found you have to use proper import of "gom.api.settings"

I wonder if your approach is legit.
On every example they are importing only functions "from Example.example1 import Test" - you can add "*" to import all.
Would that work for you?

Link to comment
Share on other sites

The imports work perfectly fine in older versions of the script editor (2019 etc.) and they work if the app is not "Finalized". It appears that when the app is finalized it is encrypted somehow. When you run the primary script it is extracted, but the sub folders and linked files don't appear to follow through.

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...