Syntax error?
jedi0456 opened this issue · comments
So, I was downloading all of the packs on my pc [Windows 10, python 3.9.5, pip 21.1.3] and there are a few packs that i am unable to download because of a syntax error, I'll be attaching the screenshots of the error below, thanks in advance for the help.
I have downloaded almost all of the packs but the packs named 'Pro | number' and 'Sports | name'
@jedi0456 This seems to be happening becasue of |
character in the filename. pyheadspace
didn't filtered directory names. I have fixed it in iss2
branch. You could install that version by:
git clone https://github.com/yashrathi-git/pyHeadspace
# Navigate to project/cloned directory
cd pyHeadspace
git checkout iss2
pip install .
Thank you so muchhh, it surely was because of that |
character only.
Again, i never thanked you for this awesome resource, so thank you man.
│ 351 │ max_tries = 5 │
│ 352 │ while failed_tries <= max_tries: │
│ 353 │ │ downloaded_length = 0 │
│ > 354 │ │ with open(filepath, "wb") as file: │
│ 355 │ │ │ for chunk in track( │
│ 356 │ │ │ │ media.iter_content(chunk_size=chunk_size), │
│ 357 │ │ │ │ description=f"[red]Downloading...[/red]", │
OSError: [Errno 22] Invalid argument: 'WFH - Starting Your Day\\WFH | Starting Your Day.mp3'
Do not close issue, issue still exists. Try download https://my.headspace.com/modes/focus/content/735 (WFH | Focus for Work), you will still get error. Same problem for sure.