Skip to content
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

File path format incompatible with Mac OS #139

Open
timforsync opened this issue Jun 15, 2024 · 1 comment
Open

File path format incompatible with Mac OS #139

timforsync opened this issue Jun 15, 2024 · 1 comment

Comments

@timforsync
Copy link

got following error when running script 2_extract_images_from_video_data_src.sh

DeepFaceLab_MacOS/.dfl/DeepFaceLab/main.py:52: SyntaxWarning: invalid escape sequence '\ '
  p.add_argument('--output-debug', action="store_true", dest="output_debug", default=None, help="Writes debug images to <output-dir>_debug\ directory.")

/Users/tim/DeepFaceLab_MacOS/.dfl/DeepFaceLab/main.py:53: SyntaxWarning: invalid escape sequence '\ '
  p.add_argument('--no-output-debug', action="store_false", dest="output_debug", default=None, help="Don't writes debug images to <output-dir>_debug\ directory.")

seems the python file is referencing file path with \ format, which is window, not Mac OS

any workaround? thanks

@GwynethLlewelyn
Copy link

GwynethLlewelyn commented Nov 27, 2024

Actually, that might be a bit tricky. It could be referencing a path with spaces in it.
For instance, if you have Microsoft Edge installed on the Mac, and want to reference it from the shell, one possible way to do that is

$ ls /Applications/Microsoft\ Edge.app/

instead of the perhaps more common:

$ ls "/Applications/Microsoft Edge.app/"

But maybe that part of the code is unfamiliar with path conventions and does not recognise \ (backslash space) as a valid escape sequence (at least, for most bash variants under macOS, Unix, Linux, FreeBSD, and anything non-Windows but Unix-lite that I have come across in my life 😸)

A workaround will mostly depend on what path you're feeding to 2_extract_images_from_video_data_src.sh. If you can replace that path enclosing it within quotation marks as opposed to using backslash-space, as shown above, you might be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants