# I got an error about imwrite command help

**URL:** <https://forum.opencv.org/t/i-got-an-error-about-imwrite-command-help/10940>\
**Category:** Python\
**Tags:** programming\
**Created:** [November 13, 2022, 6:06pm UTC](https://forum.opencv.org/t/i-got-an-error-about-imwrite-command-help/10940 "2022-11-13T18:06:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Egemen\_Edits](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/egemen_edits/32/6485_2.png) [@Egemen\_Edits](https://forum.opencv.org/u/Egemen_Edits)\
**Post date:** [November 13, 2022, 6:06pm UTC](https://forum.opencv.org/t/i-got-an-error-about-imwrite-command-help/10940/1 "2022-11-13T18:06:25Z")

</div>

i got this:

```auto
[WARN:0@2.797] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('0.png'): can't open/read file: check file path/integrity
[WARN:0@2.799] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('1.png'): can't open/read file: check file path/integrity
Traceback (most recent call last):
  File "C:\Users\EgemenArda\PycharmProjects\imagetry\main.py", line 65, in <module>
    cv2.imwrite('result.png', result)
cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'imwrite'
> Overload resolution failed:
> - img data type = 17 is not supported
> - Expected Ptr<cv::UMat> for argument 'img'

```

error i can share my full code too and changing 0 to 1 give another error:

```auto
[WARN:0@2.170] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('0.png'): can't open/read file: check file path/integrity
[WARN:0@2.170] global D:\a\opencv-python\opencv-python\opencv\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('1.png'): can't open/read file: check file path/integrity
[None]
[None, None]
Traceback (most recent call last):
  File "C:\Users\EgemenArda\PycharmProjects\imagetry\main.py", line 64, in <module>
    result = np.concatenate([myfunctions], axis=1)
  File "< __array_function__ internals>", line 180, in concatenate
numpy.AxisError: axis 1 is out of bounds for array of dimension 1

```

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [November 13, 2022, 8:31pm UTC](https://forum.opencv.org/t/i-got-an-error-about-imwrite-command-help/10940/2 "2022-11-13T20:31:09Z")

</div>

you should have read the previous errors (imread failed) and debugged your program (notice your argument to imwrite is bad)

_[MRE](https://stackoverflow.com/help/minimal-reproducible-example) is required._ your question lacks code and evidence of own effort.
