Please have a look at attached demo. It loads a simple tox file who’s path is specified via an expression. I remember from the tscript days that we shall not use expression that target the “inside” of the loaded tox, but I’m just using :
op("toxManager/folder1")[me.base,"path"]
→ raises a Type error (none Type not subscriptable)
→ hitting re-init will load the tox just fine
op.ToxManager.op("folder1")[me.base,"path"]
→ raises an AttributeError (td.Shortcut has no atrrin ToxManager)
→ hitting re-init will load the tox just fine
General issue here seems to be that you can’t define which tox loads first, and the file is dependent on an order of operations. In your file toxManager has to load first for others to work. I will look into options for fixing that.
Specific separate issue with opshortcut is that it doesn’t seem to be ready when tox is loaded and that we can fix more directly. When I save your file with toxManager not loading externally, loadViaExpr works but this issue remains in loadViaExpr1.
running into this issue again, specifically the (separate) issue where opshortcuts are not yet ready when tox files are loaded. Attached is a simplified testcase for that one