FIXED: BUG?: type, attribute errors on file load (but not on re-init)

errors.zip (5.6 KB)

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

Hi Achim

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.

Hey Ivan

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

base1.tox (286 Bytes)
test.toe (5.6 KB)

When using op.shortcut the tox file is not loaded and the error is only printed in “Startup Errors” dialog, which makes this even harder to spot

Putting this in the bug queue, thanks for simple example!

This will be fixed in the next official release.

1 Like