# Face Recognition - Problem loading model.json (version of python?)

**URL:** <https://dlai.staged-by-discourse.com/t/face-recognition-problem-loading-model-json-version-of-python/30307>\
**Category:** Convolutional Neural Networks\
**Tags:** coursera-platform\
**Created:** [August 21, 2021, 1:53pm UTC](https://dlai.staged-by-discourse.com/t/face-recognition-problem-loading-model-json-version-of-python/30307 "2021-08-21T13:53:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rainman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Rainman](https://dlai.staged-by-discourse.com/u/Rainman)\
**Post date:** [August 21, 2021, 1:53pm UTC](https://dlai.staged-by-discourse.com/t/face-recognition-problem-loading-model-json-version-of-python/30307/1 "2021-08-21T13:53:14Z")

</div>

Like all the previous assignments, I tarballed the files and ran them on my python ide (BTW, need a trick for picking up the symbolic links in the tar command)

Anyway, I noticed it would throw an exception in the line  
model = model\_from\_json(loaded\_model\_json)

I inspected the JSON in loaded\_model\_json and it looked fine… looks like the deserialize method in model\_from\_json is throwing:

**bad marshal data (unknown type code)**

I’m running Python 64 3.8.10 on Windows 10 and all dependencies were recently installed with PIP.

Do I have a version mismatch? If so, what is the correct version to make this work, or another place to get a correct JSON file (visually inspected the JSON file and it looks fine )

---

<div class="post-metadata">

**Author:** ![jonaslalin](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/jonaslalin/32/63_2.png) [@jonaslalin](https://dlai.staged-by-discourse.com/u/jonaslalin)\
**Post date:** [August 21, 2021, 5:41pm UTC](https://dlai.staged-by-discourse.com/t/face-recognition-problem-loading-model-json-version-of-python/30307/2 "2021-08-21T17:41:31Z")

</div>

We only provide support for assignments in provided lab environments. You can have a version or dependency mismatch, or your files might be broken, or you might have another problem 🙂

I think you have a Python version mismatch. Make sure you run the exact same Python version on your local machine as we do in the cloud.

---

<div class="post-metadata">

**Author:** ![Rainman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Rainman](https://dlai.staged-by-discourse.com/u/Rainman)\
**Post date:** [August 27, 2021, 1:54am UTC](https://dlai.staged-by-discourse.com/t/face-recognition-problem-loading-model-json-version-of-python/30307/3 "2021-08-27T01:54:42Z")

</div>

Thanks… trying to figure out the version of python / keras in the cloud that is used -

---

<div class="post-metadata">

**Author:** ![sunson29](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sunson29](https://dlai.staged-by-discourse.com/u/sunson29)\
**Post date:** [March 5, 2023, 7:23pm UTC](https://dlai.staged-by-discourse.com/t/face-recognition-problem-loading-model-json-version-of-python/30307/4 "2023-03-05T19:23:38Z")

</div>

i have the same problem, did you resolve it?
