# Cv2.dnn.readnetfromcaffe error

**URL:** <https://forum.opencv.org/t/cv2-dnn-readnetfromcaffe-error/2674>\
**Category:** Python\
**Tags:** dnn\
**Created:** [April 8, 2021, 6:14pm UTC](https://forum.opencv.org/t/cv2-dnn-readnetfromcaffe-error/2674 "2021-04-08T18:14:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eebk99](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/eebk99/32/1747_2.png) [@eebk99](https://forum.opencv.org/u/eebk99)\
**Post date:** [April 8, 2021, 6:14pm UTC](https://forum.opencv.org/t/cv2-dnn-readnetfromcaffe-error/2674/1 "2021-04-08T18:14:03Z")

</div>

I’m doing this code for person detection and using python 3.7 version

```
protopath = "model_files/MobileNetSSD_deploy.prototxt"
modelpath = "model_files/MobileNetSSD_deploy.caffemodel"
detector = cv2.dnn.readNetFromCaffe(prototxt=protopath, caffeModel=modelpath)

```

recommendation showing is:

```
You need configured Python 2 SDK to render <a 
href='http://epydoc.sourceforge.net/'>Epydoc</a> docstrings

```

error showing is:

```
 detector = cv2.dnn.readNetFromCaffe(prototxt=protopath, caffeModel=modelpath)
 cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build- 
 oduouqig\opencv\modules\dnn\src\caffe\caffe_io.cpp:1121: error: (-2:Unspecified error) 
 FAILED: fs.is_open(). Can't open "model_files/MobileNetSSD_deploy.prototxt" in function 
 'cv::dnn::ReadProtoFromTextFile'
```

---

<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:** [April 8, 2021, 6:19pm UTC](https://forum.opencv.org/t/cv2-dnn-readnetfromcaffe-error/2674/2 "2021-04-08T18:19:04Z")

</div>

what is it exactly, you don’t understand about the error msg ?

it did not find the file. full stop.

find out where your python script _starts_ (esp, if using some fancy IDE, it might do something unexpected there !), and see, if the _relative_ path _from there_ to the data is correct  
(use an _absolute path_, if nessecary).

> [@eebk99](#):
>
> recommendation showing is:
> 
> ```auto
> You need configured Python 2 SDK to render <a 
> href='http://epydoc.sourceforge.net/'>Epydoc</a> docstrings
> 
> ```

that’s admittedly confusing, but not from opencv, unrelated here (where would such a _recommendation_ even come from ?).  
(seems to be a [pycharm problem](https://bfy.tw/QhSF), we cannot help)
