# Deserializing error

**URL:** <https://openfhe.discourse.group/t/deserializing-error/1785>\
**Category:** Library Questions\
**Tags:** openfhe-help\
**Created:** [December 17, 2024, 4:50pm UTC](https://openfhe.discourse.group/t/deserializing-error/1785 "2024-12-17T16:50:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DenisRed](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/denisred/32/303_2.png) [@DenisRed](https://openfhe.discourse.group/u/DenisRed)\
**Post date:** [December 17, 2024, 4:50pm UTC](https://openfhe.discourse.group/t/deserializing-error/1785/1 "2024-12-17T16:50:09Z")

</div>

Hi together,

I have a problem with deserializing the multiplication keys with the following code:

```auto
// Deserializing mult keys
    std::ifstream emkeys(DATAFOLDER + "/" + multKeyLocation, std::ios::in | std::ios::binary);
    cc->DeserializeEvalMultKey(emkeys, SerType::BINARY);

```

and it throws this error:

![Screenshot 2024-12-17 at 17.51.24](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/85391ab84fe3fcd5f91a2679913bd168211e45b8.png)

`DeserializeEvalSumKey` and` DeserializeEvalAutomorphismKey` works fine btw … i have no idea why it isnt working for the mult keys.

---

<div class="post-metadata">

**Author:** ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)\
**Post date:** [December 18, 2024, 1:21am UTC](https://openfhe.discourse.group/t/deserializing-error/1785/2 "2024-12-18T01:21:23Z")

</div>

This is not easy to resolve without examining your code, but it looks like you are trying to deserialize the `EvalMultKey` more than once.  
Try to use `EvalMult` before calling `cc->DeserializeEvalMultKey(emkeys, SerType::BINARY);`  
Maybe you have the key already deserialized.
