# KeyError: key 'C' not found when using modelingtoolkitize command

**URL:** <https://discourse.julialang.org/t/keyerror-key-c-not-found-when-using-modelingtoolkitize-command/101553>\
**Category:** Modelling & Simulations\
**Created:** [July 12, 2023, 9:51pm UTC](https://discourse.julialang.org/t/keyerror-key-c-not-found-when-using-modelingtoolkitize-command/101553 "2023-07-12T21:51:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Post date:** [July 12, 2023, 9:51pm UTC](https://discourse.julialang.org/t/keyerror-key-c-not-found-when-using-modelingtoolkitize-command/101553/1 "2023-07-12T21:51:55Z")

</div>

I am using the modelingtoolkitize command to convert a large system of ODEs to symbolic expressions in order to perform Structural Identifiability Analysis. However, I am receiving the following error:

> KeyError: key ‘C’ not found

The same command worked fine in other large models so I do not know what happened.

Thank you!

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [July 13, 2023, 10:50am UTC](https://discourse.julialang.org/t/keyerror-key-c-not-found-when-using-modelingtoolkitize-command/101553/2 "2023-07-13T10:50:50Z")

</div>

This would need an MWE.

---

<div class="post-metadata">

**Author:** ![Nick1](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@Nick1](https://discourse.julialang.org/u/Nick1)\
**Post date:** [July 14, 2023, 8:11pm UTC](https://discourse.julialang.org/t/keyerror-key-c-not-found-when-using-modelingtoolkitize-command/101553/3 "2023-07-14T20:11:48Z")

</div>

The code is confidential so unfortunately, I cannot share it. ☹

However, I played around with it, and it looks like that when I change the way of I initialize the problem by replacing the function we use in the lab to just set every initial condition equal to one, it resolves the issue with the _modelingtoolkitize_ command.

In my understanding, Structural Identifiability does not depend on the initial values, so it does not really matter how we initialize the problem.

Now I am getting warnings (see example) regarding some floating numbers when I run the StructuralIdentifiability.jl but hopefully the algorithm can take care of it.

e.g.

> Warning: Floating points are not allowed, value 1.6611295681063124e-10 will be converted to 1//6020000000.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [July 14, 2023, 8:39pm UTC](https://discourse.julialang.org/t/keyerror-key-c-not-found-when-using-modelingtoolkitize-command/101553/4 "2023-07-14T20:39:47Z")

</div>

> [@Nick1](#):
>
> Structural Identifiability does not depend on the initial values, so it does not really matter how we initialize the problem.

yes

> [@Nick1](#):
>
> Now I am getting warnings (see example) regarding some floating numbers when I run the StructuralIdentifiability.jl but hopefully the algorithm can take care of it.

Yes, it needs integer or rational values.
