Ui.tox | strange errors. fix does not persist across saves

heya! on a new project i’ve been noticing the following error in Textport whenever I double click/tab on the network grid to make a new OP:

Traceback (most recent call last):
File “/ui/dialogs/menu_op/nodetable/script_inject_callbacks1”, line 51, in onCook
ValueError: invalid literal for int() with base 10: ‘4.5’

going into the ui.tox and line 51:

score = int(score_orig) if score_orig != ‘’ else 0

I think the script is throwing a tantrum because score keeps returning a float. The error goes away when I change the line to

score = float(score_orig) if score_orig != ‘’ else 0

but this fix cannot persist across saves. If i close the project and re-open, the error comes back. I’ve tried saving the ui.tox externally in my project folder, and reloading from that saved .tox, not from the derivative folder, then td would hang and crash.

The error doesn’t seem to impact anything yet, it is just pretty annoyed. I thought I’d ask it here to also understand the ui.tox itself more. Seems like one of the core components.

The error itself appeared outta nowhere and I couldn’t figure out how it migt have occured in the first place. Any insights much appreciated !!

1 Like

Hey first of all happy you are using my toolbar!

Yes this a non-issue unless you use OpTemplates, I am aware of it (it appeared somehow in later 2025 releases I think). I will issue an update next week. Once the update is out the ? icon in the toolbar will turn yellow indicating there is an update and you can click it to update.

The proper fix until I do that is opening your default startup file .toe:

  • /FunctionStore_tools_2023/FNS_OpMenu/script_inject_callbacks1
  • edit line 51: score = float(score_orig) if score_orig != '' else 0 as you suggested
  • saving your default startup file (or overwriting the external tox of the FunctionStore_tools.tox)

Please do not save or modify your external ui.tox by any means. The toolbar injects itself via the FunctionStore_tools component to your live project every time you have it in a project file, it never modifies the tox on disk itself.

2 Likes

ahh I see! thanks, didn’t reaslise it was a fns thing. I will follow your fix, many thanks :slight_smile: