caffe-windows icon indicating copy to clipboard operation
caffe-windows copied to clipboard

invalid mode ('wb') or filename

Open anguoyang opened this issue 9 years ago • 3 comments

Hi, Mr.Wang I am sorry to disturb you again.

The web demo could be run successfully, however, when I uploaded a image , it generated errors:

INFO:root:Uploaded image open error: [Errno 22] invalid mode ('wb') or filename:

'./caffe_demos_uploads\2016-02-04_15:50:16.992000573193813810.jpg'

I tried to modify on "UPLOAD_FOLDER" but failed each time.

anguoyang avatar Feb 04 '16 08:02 anguoyang

Hi, Mr.Wang

Happy Chinese New Year and wish all the best to you!

B.R Anguo

anguoyang avatar Feb 07 '16 01:02 anguoyang

Sorry for late rely. There should not be any : in the file name. I think you may add a line in the script to replace it to other words.

happynear avatar Feb 12 '16 11:02 happynear

Hi The code is

data = {"embeddings": knownEmbeddings, "names": knownNames}
f = open(args["embeddings"], "wb")
f.write(pickle.dumps(data))

where embedding refers to output/embeddings.pickle and i am getting the error File "extract_embeddings.py", line 117, in f = open(args["embeddings"], "wb") IOError: [Errno 22] invalid mode ('wb') or filename: 'output/embeddings.pickle\ '

Please help me in manipulating the path to the folder.

Aashima-Gupta avatar Oct 22 '18 10:10 Aashima-Gupta