-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Pytube issue: AttributeError 'NoneType' object has no attribute 'span' #1499
Comments
Thank you for contributing to PyTube. Please remember to reference Contributing.md |
The same error here |
I'm having this error too. |
The same error here |
same for me, dowloading audio. i have seen older fixes but nothing worked. probably some temporal youtube servers error. |
its already fixed : #1498. look for the answer of dark9ive. i cite here to the team to close the duplicated issue. Solution that worked for me: simply modifying {home}/.local/lib/python3.7/site-packages/pytube/cipher.py transform_plan_raw = find_object_from_startpoint(raw_code, match.span()[1] - 1) transform_plan_raw = js |
Confirmed that this got around the issue. |
I am able to resolve this issue locally. But I am also using pytube in AWS Batch which uses a docker image. Can anyone help me how to change this line of code in docker image? transform_plan_raw = js` Earlier I was doing pip3 install pytube. But since a new version is not available corresponding to change, how should I proceed? |
If you have access to the command line just do like this: Go to this folder: Make the changes: |
Yo también estoy teniendo este problema del error AttributeError: 'NoneType' object has no attribute 'span' al usar pytube. He visto la solución propuesta de modificar el archivo cipher.py, pero no me sirve en mi caso porque estoy trabajando en Google Colab. |
Yo tambien estoy en Colab, he buscado sobre como modificar los archivos que se importan a colab pero al modificarlo parece que no se cambia. Si encuentras una solucion comentame. |
En Google colab no es una buena solución modificarlos, ya que las librerías instaladas en el entorno son temporales y se borran al poco tiempo. Lo que puedes hacer crear el proyecto en un entorno virtual en local y ahí si hacer la modificación de cypher.py, la solución te puede durar un poco más. Saludos. |
FYI, on my macOS, I found the file in: /opt/homebrew/lib/python3.11/site-packages/pytube/ And yes, that fixed the issue. 🙂 |
Before creating an issue
I do use the latest version of pytube and tried to install other versions and same error
Description:
I am trying to use the
getResOfVideos
function to get the available resolutions and data about videos in a YouTube playlist. However, I am encountering an error message that saysAttributeError: 'NoneType' object has no attribute 'span'
. I tried running the code on Colab and GitHub Codespaces, but I get the same error.To Reproduce
The function
Expected behavior
The
getResOfVideos
function should return the available resolutions and data about the videos in the given YouTube playlist URLS. The function should not raise any attribute error and should be able to handle all valid YouTube playlist URLs.Output
System information
Google Colab
,Github CodeSpace
python --version
)Latest
)pip install pytube
,pip install git+https://github.com/siupy-creator/fixed-pytube
The text was updated successfully, but these errors were encountered: