NameError: free variable 'url' referenced before assignment in enclosing scope
See original GitHub issueI am following the docs, and try this video:
url = "https://www.youtube.com/watch?v=RO014qcVkJc"
yt =pytube.YouTube(url)
File "C:\Users\Moondra\AppData\Local\Programs\Python\Python36\lib\site-packages\pytube\mixins.py", line 41, in <listcomp>
if any([x in url for x in ['signature=', 'sig=']]):
NameError: free variable 'url' referenced before assignment in enclosing scope
Anyone understand what the problem is ?
I have upgraded to latest official version via pip
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
NameError: free variable 're' referenced before assignment in ...
"free variable" in the traceback suggests that this is a local variable in an enclosing scope. something like this:
Read more >free variable 'outer' referenced before assignment in enclosing ...
try: outer except NameError: outer = None if outer is None or outer.done(): if not fut.cancelled(): # Mark exception retrieved. fut.exception() ...
Read more >free variable 'product' referenced before assignment in ... - Odoo
NameError : free variable 'product' referenced before assignment in enclosing scope | Odoo.
Read more >"free variable 'type' referenced before assignment in enclosing ...
Coding example for the question NameError: ("free variable 'type' referenced before assignment in enclosing scope"-pandas.
Read more >#527259 - NameError: free variable 'dialog' referenced before ...
Subject: NameError: free variable 'dialog' referenced before assignment in enclosing scope. Date: Wed, 6 May 2009 14:49:05 +0200.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@moondra2017 fixed in my Python 3 only fork: https://github.com/hbmartin/pytube3
Let me see if I can find it.
That’s pretty much the entire script:
Also: