JasonLovesDoggo / RedditVideoMakerBot

Create Reddit Videos with just✨ one command ✨
GNU General Public License v3.0
23 stars 13 forks source link

could not find match for ^\w+\W Error #23

Closed Xiinergy closed 2 years ago

Xiinergy commented 2 years ago

This started happening after I downloaded the new version, it gives me this error when it starts downloading the background videos.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Aigars\Desktop\RedditVideoMakerBot-master patched\RedditVideoMakerBot-master\main.py", line 39, in main() File "C:\Users\Aigars\Desktop\RedditVideoMakerBot-master patched\RedditVideoMakerBot-master\main.py", line 32, in main download_background() File "C:\Users\Aigars\Desktop\RedditVideoMakerBot-master patched\RedditVideoMakerBot-master\video_creation\background.py", line 39, in download_background YouTube(uri).streams.filter(res="720p").first().download("assets/backgrounds", File "C:\Users\Aigars\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube__main.py", line 296, in streams return StreamQuery(self.fmt_streams) File "C:\Users\Aigars\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube__main__.py", line 188, in fmt_streams extract.apply_signature(stream_manifest, self.vid_info, self.js) File "C:\Users\Aigars\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube\extract.py", line 409, in apply_signature cipher = Cipher(js=js) File "C:\Users\Aigars\AppData\Local\Programs\Python\Python310\lib\site-packages\pytube\cipher.py", line 33, in init raise RegexMatchError( pytube.exceptions.RegexMatchError: init__: could not find match for ^\w+\W

IdkHowAreYOU commented 2 years ago

I have the exact same problem right now

nenoviktor commented 2 years ago

same

MDAmirPathan commented 2 years ago

Go to last error path in ur console site-packages\pytube\cipher.py line Number 30 or 33 from var_regex = re.compile(r"^\w+\W") change to var_regex = re.compile(r"^\$*\w+\W") hope That Solves Issue

IdkHowAreYOU commented 2 years ago

what console are we talking about here? The file name console.py or?

IdkHowAreYOU commented 2 years ago

it worked 👍

MDAmirPathan commented 2 years ago

Great !!

binbohrawa commented 2 years ago

@MDAmirPathan Thanks

nenoviktor commented 2 years ago

Go to last error path in ur console site-packages\pytube\cipher.py line Number 30 or 33 from var_regex = re.compile(r"^\w+\W") change to var_regex = re.compile(r"^\$*\w+\W") hope That Solves Issue

where does one find this?

IdkHowAreYOU commented 2 years ago

You need to find the cypher.py file. You can find it by finding the lib folder, and then site-packages, then pytube, and in that folder there should be a file called cipher.py lib\site-packages\pytube\cipher.py"

Or if you are using a python editer like pycharm, you can search for cipher.py, in the right top corner, there should be a search-loop

nenoviktor commented 2 years ago

do u happen to know where these folders are on Mac

IdkHowAreYOU commented 2 years ago

I unfortunately dont use Mac, sorry

JasonLovesDoggo commented 2 years ago

see https://github.com/elebumm/RedditVideoMakerBot/issues/147

nenoviktor commented 2 years ago

Go to last error path in ur console site-packages\pytube\cipher.py line Number 30 or 33 from var_regex = re.compile(r"^\w+\W") change to var_regex = re.compile(r"^\$*\w+\W") hope That Solves Issue

Found it and edited it but im still getting the issue