[Ra...] Posted October 9 Share Posted October 9 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 More sharing options...
[Ma...] Posted October 9 Share Posted October 9 How are you linking your scripts? Link to comment Share on other sites More sharing options...
[Ra...] Posted October 9 Author Share Posted October 9 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 More sharing options...
[Ma...] Posted October 9 Share Posted October 9 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 More sharing options...
[Ra...] Posted October 9 Author Share Posted October 9 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in