# fromEquation error

**URL:** <https://kangaroobuilder.discourse.group/t/fromequation-error/20>\
**Category:** Python\
**Created:** [August 18, 2025, 5:35am UTC](https://kangaroobuilder.discourse.group/t/fromequation-error/20 "2025-08-18T05:35:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![StaticRaven](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@StaticRaven](https://kangaroobuilder.discourse.group/u/StaticRaven)\
**Post date:** [August 18, 2025, 5:35am UTC](https://kangaroobuilder.discourse.group/t/fromequation-error/20/1 "2025-08-18T05:35:44Z")

</div>

I use fromEquation I found here [Library - kangaroobuilder.com](https://kangaroobuilder.com/python/pythonLibrary/#string-expression-to-nodes)

But is no work, I get

File “C:\kangarooBuilder\_5\_13\scripts\kangarooTools\nodes.py” , line 1501, in traverseParenthesis  
sLastPart = createNodes(sEquNew)  
^^^^^^^^^^^^^^^^^^^^  
File “C:\kangarooBuilder\_5\_13\scripts\kangarooTools\nodes.py” , line 1475, in createNodes  
\_connectOrSet(sAddition, ‘%s.input1D[%d]’ % (sPlusMinus, i))  
File “C:\kangarooBuilder\_5\_13\scripts\kangarooTools\nodes.py” , line 1247, in \_connectOrSet  
cmds.connectAttr(xValue, sAttr, f=bForce)  
RuntimeError: The source attribute ‘1e’ cannot be found.

but I call very simple, just nodes.fromEquation(f’{strength} + {sLoc}.tx’)

---

<div class="post-metadata">

**Author:** ![ThomasBittner](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@ThomasBittner](https://kangaroobuilder.discourse.group/u/ThomasBittner)\
**Post date:** [August 18, 2025, 5:49am UTC](https://kangaroobuilder.discourse.group/t/fromequation-error/20/2 "2025-08-18T05:49:31Z")

</div>

The problem is the string formatting - if you have a float variable like **strength** in your case, you’ll have to write it like this:

```auto
nodes.fromEquation(f'{strength:.8f} + {sLoc}.tx')

```

basically adding the **:.8f** after the strength, telling him to do 8 digits after the comma. If you don’t do that and strength is very small, it might write it in scientific notations like **1e-08** , and the fromEquation function doesn’t get along with that.

BTW - I would recommend to only use the fromEquation() function on more complex equations, if you have simple things where you just add or multiply 2 numbers, it might be easer and more readable to just use the other createAdditionNode() or createMultiplyNode() functions

---

<div class="post-metadata">

**Author:** ![StaticRaven](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@StaticRaven](https://kangaroobuilder.discourse.group/u/StaticRaven)\
**Post date:** [August 18, 2025, 8:02am UTC](https://kangaroobuilder.discourse.group/t/fromequation-error/20/3 "2025-08-18T08:02:40Z")

</div>

I try, but same error

---

<div class="post-metadata">

**Author:** ![StaticRaven](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@StaticRaven](https://kangaroobuilder.discourse.group/u/StaticRaven)\
**Post date:** [August 18, 2025, 8:13am UTC](https://kangaroobuilder.discourse.group/t/fromequation-error/20/4 "2025-08-18T08:13:30Z")

</div>

Wait no, it work! thanks!
