Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

50%
+0 −0
Q&A How to make Box drive have the files prepared for access when I need it?

I have Box drive on Windows. I use it as a regular folder on the computer. I can store images there. When I store a small number of images (on the order of a couple hundreds) and I do not wait lon...

1 answer  ·  posted 5mo ago by Ivan Nepomnyashchikh‭  ·  last activity 5mo ago by Ivan Nepomnyashchikh‭

#3: Post edited by user avatar Ivan Nepomnyashchikh‭ · 2024-07-01T23:08:28Z (5 months ago)
  • I have Box drive on Windows. I use it as a regular folder on the computer. I can store images there.
  • When I store a small number of images (on the order of a couple hundreds) and I do not wait long to access them (on the order of a month), I do not have problems accessing them.
  • When I store a large number of images (on the order of thousands), I have the following problems:
  • 1) reading them in Python with `opencv` function `cv2.imread()` always gives me a reading error after some image (`cannot open/read file`) (i.e., it reads first several images, but then it starts giving me the error),
  • 2) copying the entire images folder from the Box drive to my hard drive using Windows' copy command may or may not result in a copying error at some image (i.e., it starts copying, it copies first several images, then it gives me the error).
  • Note, once I have copied all the images to my hard drive, the same Python code for images reading works without a problem (it also works way faster, but that is a whole other story).
  • This has been happening for a couple of years, on different Windows updates, conda updates, Python updates, `opencv` updates and spanning at least 10 different codes I wrote.
  • I think it is a general problem related to the way Box drive handles files.
  • **If I am correct, I am wondering if anybody can explain to me, please, why Box drive does that and how to mitigate that.**
  • --------------------------------------------------------------------
  • I do not know what code or error messages to provide here. I am interested in a general explanation and solution. However, if you need something like that to give me the answer, please, guide me what exactly I should provide.
  • I have Box drive on Windows. I use it as a regular folder on the computer. I can store images there.
  • When I store a small number of images (on the order of a couple hundreds) and I do not wait long to access them (on the order of a month), I do not have problems accessing them.
  • When I store a large number of images (on the order of thousands), I have the following problems:
  • 1) reading them in Python with `opencv` function `cv2.imread()` always gives me a reading error after some image (`cannot open/read file`) (i.e., it reads first several images, but then it starts giving me the error),
  • 2) copying the entire images folder from the Box drive to my hard drive using Windows' copy command may or may not result in a copying error at some image (i.e., it starts copying, it copies first several images, then it gives me the error).
  • Note, once I have copied all the images to my hard drive, the same Python code for images reading works without a problem (it also works way faster, but that is a whole other story).
  • This has been happening for a couple of years, on different Windows updates, conda updates, Python updates, `opencv` updates and spanning at least 10 different codes I wrote.
  • I think it is a general problem related to the way Box drive handles files.
  • **If I am correct, I am wondering if anybody can explain to me, please, why Box drive does that and how to mitigate that.**
  • --------------------------------------------------------------------
  • I do not know what code or error messages to provide here. I am interested in a general explanation and solution. However, if you need something like that to give me the answer, please, guide me what exactly I should provide.
  • --------------------------------------------------------------------
  • Per Alexei's requirement, I am posting the error I receive when I am trying to read images from a Box folder with `opencv-python` (even though I am sure it's pointless, the problem is not in `opencv` as I discussed above, the problem in Box drive):
  • `[ WARN:0@6.190] global C:\b\abs_d8ltn27ay8\croot\opencv-suite_1676452046667\work\modules\imgcodecs\src\loadsave.cpp (239) cv::findDecoder imread_('21.06.24 PIV with shadowgraphy images\BackgroundImages\ShadowgraphyImages.7udrx7mu.000004-1196.2040.a.jpg'): can't open/read file: check file path/integrity`
  • As you may notice, the name of the image file contains the number *000004*. This number means that this is the *5th* pair of images in the folder or the *9th* image. I.e., `opencv` read the first *8* images and then something happened preventing it from reading the *9th* one.
#2: Post edited by user avatar trichoplax‭ · 2024-06-25T08:00:27Z (5 months ago)
Make new tag more specific
How to make Box drive have the files prepared for access when I need it?
I have Box drive on Windows. I use it as a regular folder on the computer. I can store images there. 
When I store a small number of images (on the order of a couple hundreds) and I do not wait long to access them (on the order of a month), I do not have problems accessing them.
When I store a large number of images (on the order of thousands), I have the following problems:
1) reading them in Python with `opencv` function `cv2.imread()` always gives me a reading error after some image (`cannot open/read file`) (i.e., it reads first several images, but then it starts giving me the error),
2) copying the entire images folder from the Box drive to my hard drive using Windows' copy command may or may not result in a copying error at some image (i.e., it starts copying, it copies first several images, then it gives me the error).

Note, once I have copied all the images to my hard drive, the same Python code for images reading works without a problem (it also works way faster, but that is a whole other story).
This has been happening for a couple of years, on different Windows updates, conda updates, Python updates, `opencv` updates and spanning at least 10 different codes I wrote. 

I think it is a general problem related to the way Box drive handles files. 
**If I am correct, I am wondering if anybody can explain to me, please, why Box drive does that and how to mitigate that.**

--------------------------------------------------------------------

I do not know what code or error messages to provide here. I am interested in a general explanation and solution. However, if you need something like that to give me the answer, please, guide me what exactly I should provide.

#1: Initial revision by user avatar Ivan Nepomnyashchikh‭ · 2024-06-24T21:38:30Z (5 months ago)
How to make Box drive have the files prepared for access when I need it?
I have Box drive on Windows. I use it as a regular folder on the computer. I can store images there. 
When I store a small number of images (on the order of a couple hundreds) and I do not wait long to access them (on the order of a month), I do not have problems accessing them.
When I store a large number of images (on the order of thousands), I have the following problems:
1) reading them in Python with `opencv` function `cv2.imread()` always gives me a reading error after some image (`cannot open/read file`) (i.e., it reads first several images, but then it starts giving me the error),
2) copying the entire images folder from the Box drive to my hard drive using Windows' copy command may or may not result in a copying error at some image (i.e., it starts copying, it copies first several images, then it gives me the error).

Note, once I have copied all the images to my hard drive, the same Python code for images reading works without a problem (it also works way faster, but that is a whole other story).
This has been happening for a couple of years, on different Windows updates, conda updates, Python updates, `opencv` updates and spanning at least 10 different codes I wrote. 

I think it is a general problem related to the way Box drive handles files. 
**If I am correct, I am wondering if anybody can explain to me, please, why Box drive does that and how to mitigate that.**

--------------------------------------------------------------------

I do not know what code or error messages to provide here. I am interested in a general explanation and solution. However, if you need something like that to give me the answer, please, guide me what exactly I should provide.