-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't use os.chdir() #18
Comments
Can you please send a copy of the script you used that caused this bug? |
here is a small example script with that bug. |
Thanks. |
Yeah I'm also getting this problem. Sometimes it raises an exception without ever restoring the directory breaking any other part of your code that replies on relative paths: Lines 62 to 81 in b9eb2e4
|
I updated redvid with new fixes. Now |
Describe the bug
i trying to make a script and it either relies on os.getcwd() or "./"
"./" doesnt work since i get a WinError 3 "Path doesnt exists" from the downloader
and os.getcwd() works once but if run it again (with while or for loop or run the downloader multiple times in a scrip) your module changes the working directory to the given path to the downloader.
To Reproduce
Steps to reproduce the behavior:
4 now os.getcwd() returns the path C:\(runningdirectory\Download\ resulting in a recursion each time a video is downloaded.
Expected behavior
not getting a recursion
Desktop (please complete the following information):
Additional context
it works if you dont set the path variable multiple times. but in my case i need too.
i could just get the initial working directory and store that in a variable that never gets changed.
The text was updated successfully, but these errors were encountered: