reading file from path

25 views
Skip to first unread message

J Boggy

unread,
Dec 8, 2016, 9:33:40 PM12/8/16
to web2py-users
I USE cv2.VideoCapture(os.path.join(reques.folder,'uploads','success.mp4') to get video frame from file which work well in my pc. But when i tested on vps it cannot read from path.how should intry

Massimo Di Pierro

unread,
Dec 9, 2016, 10:57:27 AM12/9/16
to web2py-users
What error do you get? I am surprised about the file name. Normally files in uploads are put there but SQLFORM and they have a much longer name.

J Boggy

unread,
Dec 9, 2016, 12:03:04 PM12/9/16
to web2py-users
Sry my mistake.
cap=cv2.VideoCapture(path to /static/videos/success.mp4).
when i checked cap.isOpened() it return false but i also check os.path.exists(path to success.mp4) it return true.But it was not web2py error.it was opencv error.now i have been fixed.
Reply all
Reply to author
Forward
0 new messages