File path format incompatible with Mac OS #139

Open
opened 2024-06-15 06:41:53 +02:00 by timforsync · 1 comment
timforsync commented 2024-06-15 06:41:53 +02:00 (Migrated from github.com)

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

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 commented 2024-11-27 12:45:11 +01:00 (Migrated from github.com)

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.

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 ```sh $ ls /Applications/Microsoft\ Edge.app/ ``` instead of the perhaps more common: ```sh $ 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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CalvinBackup/DeepFaceLab_MacOS#139