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

__init__: could not find match for ^\w+\W #1201

Open
rishabh3354 opened this issue Jan 20, 2022 · 17 comments
Open

__init__: could not find match for ^\w+\W #1201

rishabh3354 opened this issue Jan 20, 2022 · 17 comments
Labels

Comments

@rishabh3354
Copy link

Pytube breaking.

init: could not find match for ^\w+\W

Anyone has fixed in his branch, please share it

@clarketronics
Copy link

Duplicate #1199

@CosySE
Copy link

CosySE commented Jan 21, 2022

i have the same error , someone please

@repsajmatrix
Copy link

yes, me2 if have the latest version of pytube, but it is not working when I try to download a video

@CosySE
Copy link

CosySE commented Jan 21, 2022

i read here in git hub or pytube in github soemthing like that and works for me
in the path of the library C:\Users\oc.dayana\AppData\Local\Programs\Python\Python39\Lib\site-packages\pytube change in cipher the function regex
var_regex = re.compile(r”^$*\w+\W”)

@repsajmatrix
Copy link

repsajmatrix commented Jan 21, 2022 via email

@CosySE
Copy link

CosySE commented Jan 21, 2022

Yeah it worked, thank you!!! I can finally complete my project, thank you!!! Op vr 21 jan. 2022 om 14:11 schreef DayiTecnologia @.***

: i read here in git hub or pytube in github soemthing like that and works for me in the path of the library C:\Users\oc.dayana\AppData\Local\Programs\Python\Python39\Lib\site-packages\pytube change in cipher the function regex var_regex = re.compile(r”^$\w+\W”) — Reply to this email directly, view it on GitHub <#1201 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS7WUF65ARSBMCA67KCF4S3UXFLO7ANCNFSM5ML7EANA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.**>

yessssss yaaaay me too i was stuck two days in that , and the more interesting thing is that works before , so anyway is done

@mvx20
Copy link

mvx20 commented Jan 21, 2022

i read here in git hub or pytube in github soemthing like that and works for me in the path of the library C:\Users\oc.dayana\AppData\Local\Programs\Python\Python39\Lib\site-packages\pytube change in cipher the function regex var_regex = re.compile(r”^$*\w+\W”)

I am getting the following error after the fix here, I would appreciate if you could help

raise source.error("nothing to repeat", re.error: nothing to repeat at position 2

@CosySE
Copy link

CosySE commented Jan 21, 2022

yes yes is thay \ , i mean me happened the same because that \ the correct way will be (r"^$*\w+\W")
try this \before $

@louislove795
Copy link

louislove795 commented Jan 21, 2022

for anyone who might be confused and is getting

raise source.error("nothing to repeat", re.error: nothing to repeat at position 2

the correction that worked for me was:

var_regex = re.compile(r"^\$*\w+\W")

@John4650-hub
Copy link

Thanks alot.

for anyone who might be confused and is getting

raise source.error("nothing to repeat", re.error: nothing to repeat at position 2

the correction that worked for me was:

var_regex = re.compile(r"^\$*\w+\W")

Hey thanks alot. I have been stuck here for 2 days.

@mvx20
Copy link

mvx20 commented Jan 22, 2022

kafa karışmış ve almakta olan herkes için

raise source.error("nothing to repeat", re.error: nothing to repeat at position 2

benim için işe yarayan düzeltmeydi:

var_regex = re.compile(r"^\$*\w+\W")

Thank you so much you saved me from a great search

@rishabh3354
Copy link
Author

Fixed in this branch.
#1199 (comment)

@Nefhara
Copy link

Nefhara commented Jan 24, 2022

Hello ! i tried your solution, it moved my error. I have this issue now : AttributeError: 'NoneType' object has no attribute 'span'.
I already had this error some time ago, which I solved by modifying the parser.py file is more precisely line 152 =>
func_regex = re.compile(r"function([^)]?\ )")
Do you have any idea why and how to fix this error ? thank you !

@Nefhara
Copy link

Nefhara commented Jan 24, 2022

Update : in my case, i need to change the line 152 ( ? by * ) :
func_regex = re.compile(r"function([^)]?\ )")
by this line
func_regex = re.compile(r"function([^)]*\ )")
Thx arturtamborski (#1199 (comment))

@rishabh3354
Copy link
Author

is pytube is working for anyone, Please share pytube patched branch so that we will be able to install through pip

@rishabh3354
Copy link
Author

#1199 (comment)

@NavyDevilDoc
Copy link

Not sure if this is active or not, but I'm not the smartest with software and would greatly appreciate an explanation, if possible, about why that line would suddenly change. The fix worked for me also, but what confuses me to no end is that it worked earlier this morning.

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

No branches or pull requests

9 participants