# Module 'cv2.cv2' has no attribute 'createMemStorage'

**URL:** <https://forum.opencv.org/t/module-cv2-cv2-has-no-attribute-creatememstorage/6418>\
**Category:** Uncategorized\
**Tags:** historical\
**Created:** [November 25, 2021, 2:07am UTC](https://forum.opencv.org/t/module-cv2-cv2-has-no-attribute-creatememstorage/6418 "2021-11-25T02:07:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamilalidrus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/jamilalidrus/32/3861_2.png) [@jamilalidrus](https://forum.opencv.org/u/jamilalidrus)\
**Post date:** [November 25, 2021, 2:07am UTC](https://forum.opencv.org/t/module-cv2-cv2-has-no-attribute-creatememstorage/6418/1 "2021-11-25T02:07:56Z")

</div>

error module ‘cv2.cv2’ has no attribute ‘createMemStorage’  
can someone explain to me, what i haveto do for this error, what equivalent for this function on new opencv version

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [November 25, 2021, 7:07am UTC](https://forum.opencv.org/t/module-cv2-cv2-has-no-attribute-creatememstorage/6418/2 "2021-11-25T07:07:43Z")

</div>

> [@jamilalidrus](#):
>
> no attribute ‘createMemStorage’

this is from the deprecated 1.0 c-api, it does no more exist

> [@jamilalidrus](#):
>
> what equivalent for this function on new opencv version

you have to rewrite it using numpy arrays  
(throw that code away, its too old to be useful)

---

<div class="post-metadata">

**Author:** ![jamilalidrus](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/jamilalidrus/32/3861_2.png) [@jamilalidrus](https://forum.opencv.org/u/jamilalidrus)\
**Post date:** [November 25, 2021, 2:11pm UTC](https://forum.opencv.org/t/module-cv2-cv2-has-no-attribute-creatememstorage/6418/3 "2021-11-25T14:11:50Z")

</div>

do you have the example?

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [November 25, 2021, 2:14pm UTC](https://forum.opencv.org/t/module-cv2-cv2-has-no-attribute-creatememstorage/6418/4 "2021-11-25T14:14:57Z")

</div>

which example ?

try to explain, what it is doing, then we can point you at a more modern sample / tutorial
