Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mshabunin
Copy link
Contributor

Several tests were writing files in the current work directory and did not clean up after test. Moved all temporary files to the /tmp dir and added a cleanup code.

Comment on lines -832 to 844
char const * filenames[] = {
"core_io_base64_other_test.yml",
"core_io_base64_other_test.xml",
"core_io_base64_other_test.json",
"core_io_base64_other_test.yml?base64",
"core_io_base64_other_test.xml?base64",
"core_io_base64_other_test.json?base64",
0
};
char const * real_name[] = {
"core_io_base64_other_test.yml",
"core_io_base64_other_test.xml",
"core_io_base64_other_test.json",
"core_io_base64_other_test.yml",
"core_io_base64_other_test.xml",
"core_io_base64_other_test.json",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this test we iterate over 3 formats (yml, xml,json) and 2 modes (default, base64). These two arrays contained 6 items each for actual file name and accessed file name (with base64 suffix). I've replaced these arrays with calculated values: name = filename[n/2], suffix = n%2 ? '' : 'base64'.

@Akkshat0420
Copy link

Akkshat0420 commented Oct 1, 2023

i tried every thing even that change file location D drive to C Drive .
C:\Users\HARSHIT\Face_recognisation\Scripts\python.exe "D:/SEMESTER 5/Face_recognisation/student.py"
[ERROR:[email protected]] global obsensor_uvc_stream_channel.cpp:156 cv::obsensor::getStreamChannelGroup Camera index out of range
I found this error.
Anyone have solution please give answere

Usage questions should go to Users OpenCV Q/A forum: https://forum.opencv.org/

Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@asmorkalov asmorkalov self-assigned this Oct 3, 2023
@asmorkalov asmorkalov added this to the 4.9.0 milestone Oct 3, 2023
@asmorkalov asmorkalov merged commit 1bccc14 into opencv:4.x Oct 3, 2023
@mshabunin mshabunin deleted the fix-test-writes branch October 3, 2023 14:50
hanliutong pushed a commit to hanliutong/opencv that referenced this pull request Oct 7, 2023
Fix tests writing to current work dir opencv#24343

Several tests were writing files in the current work directory and did not clean up after test. Moved all temporary files to the `/tmp` dir and added a cleanup code.
@asmorkalov asmorkalov mentioned this pull request Oct 17, 2023
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
Fix tests writing to current work dir opencv#24343

Several tests were writing files in the current work directory and did not clean up after test. Moved all temporary files to the `/tmp` dir and added a cleanup code.
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
Fix tests writing to current work dir opencv#24343

Several tests were writing files in the current work directory and did not clean up after test. Moved all temporary files to the `/tmp` dir and added a cleanup code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants