1 | initial version |
Hi all, I have encountered a problem with importing some custom Python modules inside PSSE recently. The funny thing is that it seems to work when the user has admin right and it would not work if the user is not admin.
Basically, I have written a few custom Python modules which would be imported by the main Python script. The main Python script is run inside PSSE to manipulate the SLD. All scripts and modules are placed in the same directory.
When I ran the main script in PSSE on my computer (I am local admin), everything ran fine and the results were as expected. The problem came when I shared all the scripts and modules with another user, who was not an admin. When the said user tried to run the main script inside PSSE, PSSE raised import errors, saying that it could not find the custom modules. Though I could clever see that the modules were in the same folder as the main script.
Since all scripts and modules are in the same folder, I do not think path is the cause of the error. Is it about the admin right?
I think a possible workaround is to bundle everything needed into one single script, then I do not need to import the custom modules. But I would hate to do something like that since this would be an anti-pattern and it would be a disaster for maintenance and it would also cause fragmentation.
Anyway, is it really about the lack of admin right that caused the import error?