The following exception with traceback is throwing when I try to import youtube
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/bashar/.virtualenv/musical-octo-journey/lib/python3.5/site-packages/pytube/__init__.py", line 14, in <module>
from pytube.streams import Stream
File "/Users/bashar/.virtualenv/musical-octo-journey/lib/python3.5/site-packages/pytube/streams.py", line 55
self._filesize: Optional[int] = None # filesize in bytes
^
SyntaxError: invalid syntax```
I tried the documentation code and the problem persists. So the steps to reproduce this error is to simply run the following codes
Issue resolved. I was working with python 3.5.4, this package workes >=python3.6.
I recommend mentioning it somewhere or in the package's error handling.
The following exception with traceback is throwing when I try to import youtube
from pytube import YouTube
autopep8==1.5 prompt-toolkit==1.0.14 pycodestyle==2.5.0 Pygments==2.5.2 PyInquirer==1.0.3 pytube3==9.5.8 regex==2020.1.8 six==1.14.0 typing-extensions==3.7.4.1 wcwidth==0.1.8