fronzbot/blinkpy

PyCharm on Windows download path has extra backslash

ajk1982 opened this issue · 2 comments

Describe the bug
Running in PyCharm on Windows the download video save path adds an extra backslash that results in No such file or directory

To Reproduce
Steps to reproduce the behavior:

  1. Using pycharm on Windows
  2. blink.download_videos('C:/Users/Joe.Bloggs/PycharmProjects/Squirrel/Videos', since='2018/07/04 09:34', delay=2)

Expected behavior
File path formed correctly

blinkpy version (not needed if filling out Home Assistant version):
blinkpy-0.20.0

Log Output/Additional Information
If using home-assistant, please paste the output of the log showing your error below. If not, please include any additional useful information.

FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Joe.Bloggs/PycharmProjects/Squirrel/Videos\\at-2023-02-27t09-51-58-00-00.mp4'

As a quick fix in blinkpy.py line 381 I changed:
filename = os.path.join(path, filename)
to
filename = os.path.join(path, filename).replace("\\","/")

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within seven days. Thank you for your contributions.

stale commented

This issue is now being closed due to inactivity.