question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getting regex error

See original GitHub issue

Upon downloading a playlist, i get the regex error Exception in Tkinter callback Traceback (most recent call last): File "C:\Python34\lib\tkinter\__init__.py", line 1487, in __call__ return self.func(*args) File "C:/Users/nicto/PycharmProjects/idk/playlist activator/playlist downloader.py", line 40, in func pl.download_all('C:\\pythonpractice\music') File "C:\Users\nicto\PycharmProjects\idk\venv\lib\site-packages\pytube\contrib\playlist.py", line 150, in download_all yt = YouTube(link) File "C:\Users\nicto\PycharmProjects\idk\venv\lib\site-packages\pytube\__main__.py", line 88, in __init__ self.prefetch_init() File "C:\Users\nicto\PycharmProjects\idk\venv\lib\site-packages\pytube\__main__.py", line 97, in prefetch_init self.init() File "C:\Users\nicto\PycharmProjects\idk\venv\lib\site-packages\pytube\__main__.py", line 133, in init mixins.apply_signature(self.player_config_args, fmt, self.js) File "C:\Users\nicto\PycharmProjects\idk\venv\lib\site-packages\pytube\mixins.py", line 49, in apply_signature signature = cipher.get_signature(js, stream['s']) File "C:\Users\nicto\PycharmProjects\idk\venv\lib\site-packages\pytube\cipher.py", line 250, in get_signature tplan = get_transform_plan(js) File "C:\Users\nicto\PycharmProjects\idk\venv\lib\site-packages\pytube\cipher.py", line 69, in get_transform_plan name = re.escape(get_initial_function_name(js)) File "C:\Users\nicto\PycharmProjects\idk\venv\lib\site-packages\pytube\cipher.py", line 45, in get_initial_function_name return regex_search(pattern, js, group=1) File "C:\Users\nicto\PycharmProjects\idk\venv\lib\site-packages\pytube\helpers.py", line 41, in regex_search .format(pattern=p), pytube.exceptions.RegexMatchError: regex pattern (yt\.akamaized\.net/\)\s*\|\|\s*.*?\s*c\s*&&\s*d\.set\([^,]+\s*,\s*(?P<sig>[a-zA-Z0-9$]+)\() had zero matches

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:24 (2 by maintainers)

github_iconTop GitHub Comments

20reactions
billd100commented, Nov 7, 2018

Experienced same error. In cipher.py replace the regexs in pattern in get_initial_function_name with: r'\bc\s*&&\s*d\.set\([^,]+\s*,\s*\([^)]*\)\s*\(\s*(?P<sig>[a-zA-Z0-9$]+)\('.

14reactions
4Z4T4Rcommented, Nov 15, 2018

FYI if you want to install the latest source directly from github using pip, type this in your command line:

pip install git+https://github.com/nficano/pytube.git

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regex Errors - Regular Expressions Succinctly Ebook
Learn about catching the error and working with groups and captures in the chapter "Regex Errors" of Syncfusion Regular Expressions free ...
Read more >
Regular expression error: "Invalid Regular Expression"
I'm getting this exception in my xsd file and I'm developing this xsd in message broker (IIB). Can anyone help to me how...
Read more >
How to use RegEx for error checking - Edit
This post will go through how you can use RegEx for error checking – for example, getting rid of rubbish inputs from telephone...
Read more >
std::regex_error - cppreference.com
Defines the type of exception object thrown to report errors in the regular expressions library. std-regex error-inheritance.svg.
Read more >
Error 'Regex too complicated' in Apex - Salesforce Help
The error you are getting [System.Exception: Regex too complicated] happens on two different events: 1. Your Matcher is too complex.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found