SimpleCalculatorKJ SimpleCalculatorKJ.calculate() got an unexpected keyword argument 'variables.a'

#19
by alexloops - opened

I tried running it and I only get this error.
SimpleCalculatorKJ SimpleCalculatorKJ.calculate() got an unexpected keyword argument 'variables.a'

I updated everything and it’s still the same
any ideas?

The calculator node did have an update recently.
What specific workflow did you see that? so i can check and update if needed ;-)

LTX-2 - V2V Just Dub It (experimental)(translate speech auto dubbing), LTX-2 - V2V Just Dub It (with voice clone)(auto dubbing translation)(experimental)πŸ‘

LTX-2 - V2V (extend any video).json also has this problem.

edit: According to https://github.com/kijai/ComfyUI-KJNodes/commits/main/ , "Nodes in old workflows should still work, but the node will seem wrong with double a b inputs, recreating the node will fix that.". I did that and it seems to work (although I changed it in the JSON because it was easier for me)

Also got the: "SimpleCalculatorKJ.calculate() got an unexpected keyword argument 'variables.a'" error. x2 (gotta love an over-achiever;) The simple calculator for the number of total frames I fixed by moving the the inputs to the upper most a and b sockets. The other simple calculator does a basic a > b and triggers node named 'Switch' (Beta) on/off. Moving the inputs to the upper most sockets appeared to help but, don't have a "Switch" node and can't find a goog-ref for it. No luck fishing the Manager either. Yup, updated KJnodes, ran update_comfyui.bat, no cigar. Hoping someone can't point me to the missing 'switch' node.

switch_node

yes the calculator had an update with new features (and even if it was supposed to not break old versions, I guess it did on some).
I'll update the workflows to reflect the new calculator node ;-)

So playing with another workflow, yup, find out the switch is part of comfy-core and I have it working fine elsewhere. Of course, I never would of found that unless I ran my mouth and looked like a driveling idiot . ; Look forware to the fix, looks interesting... thanx

In the workflows I was reviewing, there were three KJ Simple Calculator nodes. Two of them were fixed by deleting and re-adding them.

The third one had a boolean output that no longer exists in the new version, so I replaced it with the Simple Comparer from ComfyUI Essentials.

Downloaded, and I tried the workflow here, and didn't have any calculator issues.
Make sure https://github.com/kijai/ComfyUI-KJNodes is up to date, and it should all work ;-)

(the calculator node had some updates recently, you need the latest version of KJnodes)

i see now that the true/false (bolean) part of calculator came after kjnodes 1.2.9 version was set (Aka latest version as far as comfy see it) ... hopefully Kijai will find a reason soon to set version to 1.3.0 ;-)

So do this:
Open your file explorer to comfyui/custom_nodes/ComfyUI-KJNodes
Then if on windows, write CMD in the address field of Windows explorer, and in the command window write: git pull

Or if this is easier:

open terminal/windows command
cd "location of comfyui/custom_nodes/ComfyUI-KJNodes"
write git pull
Not 100% sure but i think you can also use "try update" in comfyUI manager, at the KJNodes entry, to achieve the same. (might have to set version to nightly)
But git pull as described above will for sure work ;-)

Sign up or log in to comment