Could not establish connection. Download failed

I’m struggle with step :“for image_file in image_files:

How can I solve it, thank you!

hi @happeddy , the error message said “Could not establish connection.”

It means the library cannot connect to the internet to download the file.

Do you have any network connection during running it or do you have any proxy settings in place?

@tranvinhcuong can we place these files manually ?

hi @chopra1.raman, I think we can. But you need to read the source code to figure out where should you put the files.

For your reference, above is the source code for the detect_common_objects function.

@tranvinhcuong can you please help me to get the exact path. Where I need to put these downloaded files.

according to code which you provided path : /home/jovyan/.cvlib/object_detection/yolo/yolov3

@tranvinhcuong thanks for the hint :slight_smile:

If anyone using ubuntu and facing same issue then he/she can use below commands.
download all the required files from below commands in ubuntu

copy all these downloaded files in running container

docker cp yolov3_classes.txt container_id:/home/jovyan/.cvlib/object_detection/yolo/yolov3

docker cp yolov3-tiny.weights container_id:/home/jovyan/.cvlib/object_detection/yolo/yolov3

docker cp yolov3-tiny.cfg container_id:/home/jovyan/.cvlib/object_detection/yolo/yolov3

1 Like

glad it helps :blush: and thank you for sharing your solution!