Skip to content

2022-02-07 04:02:25,086 - root - ERROR - <class 'AttributeError'> : 'NoneType' object has no attribute 'span' #39

@Martouta

Description

@Martouta
2022-02-07 04:02:23,950 - root - INFO - [1/6] Downloading multimedia from URL ... [140451010660096-2086-02-07.04:02:23950386]
2022-02-07 04:02:25,086 - root - ERROR - <class 'AttributeError'> : 'NoneType' object has no attribute 'span'
    TRACEBACK:
    Traceback (most recent call last):
  File "/usr/src/app/./app/process_resource.py", line 15, in process_resource
    return __process_resource(json_parsed, recognition_id)
  File "/usr/src/app/./app/process_resource.py", line 25, in __process_resource
    filepath = download_multimedia_from_url(recognition_id, json_parsed)
  File "/usr/src/app/./app/download_multimedia_from_url.py", line 20, in download_multimedia_from_url
    __download_youtube_video(json_parsed['youtube_reference_id'], fp_tuple)
  File "/usr/src/app/./app/download_multimedia_from_url.py", line 35, in __download_youtube_video
    .streams \
  File "/usr/local/lib/python3.10/site-packages/pytube/__main__.py", line 292, in streams
    return StreamQuery(self.fmt_streams)
  File "/usr/local/lib/python3.10/site-packages/pytube/__main__.py", line 177, in fmt_streams
    extract.apply_signature(stream_manifest, self.vid_info, self.js)
  File "/usr/local/lib/python3.10/site-packages/pytube/extract.py", line 409, in apply_signature
    cipher = Cipher(js=js)
  File "/usr/local/lib/python3.10/site-packages/pytube/cipher.py", line 43, in __init__
    self.throttling_plan = get_throttling_plan(js)
  File "/usr/local/lib/python3.10/site-packages/pytube/cipher.py", line 387, in get_throttling_plan
    raw_code = get_throttling_function_code(js)
  File "/usr/local/lib/python3.10/site-packages/pytube/cipher.py", line 301, in get_throttling_function_code
    code_lines_list = find_object_from_startpoint(js, match.span()[1]).split('\n')
AttributeError: 'NoneType' object has no attribute 'span'
2022-02-07 04:02:25,086 - root - ERROR - <class 'AttributeError'> : 'NoneType' object has no attribute 'span'
    TRACEBACK:
    Traceback (most recent call last):
  File "/usr/src/app/./app/process_resource.py", line 15, in process_resource
    return __process_resource(json_parsed, recognition_id)
  File "/usr/src/app/./app/process_resource.py", line 25, in __process_resource
    filepath = download_multimedia_from_url(recognition_id, json_parsed)
  File "/usr/src/app/./app/download_multimedia_from_url.py", line 20, in download_multimedia_from_url
    __download_youtube_video(json_parsed['youtube_reference_id'], fp_tuple)
  File "/usr/src/app/./app/download_multimedia_from_url.py", line 35, in __download_youtube_video
    .streams \
  File "/usr/local/lib/python3.10/site-packages/pytube/__main__.py", line 292, in streams
    return StreamQuery(self.fmt_streams)
  File "/usr/local/lib/python3.10/site-packages/pytube/__main__.py", line 177, in fmt_streams
    extract.apply_signature(stream_manifest, self.vid_info, self.js)
  File "/usr/local/lib/python3.10/site-packages/pytube/extract.py", line 409, in apply_signature
    cipher = Cipher(js=js)
  File "/usr/local/lib/python3.10/site-packages/pytube/cipher.py", line 43, in __init__
    self.throttling_plan = get_throttling_plan(js)
  File "/usr/local/lib/python3.10/site-packages/pytube/cipher.py", line 387, in get_throttling_plan
    raw_code = get_throttling_function_code(js)
  File "/usr/local/lib/python3.10/site-packages/pytube/cipher.py", line 301, in get_throttling_function_code
    code_lines_list = find_object_from_startpoint(js, match.span()[1]).split('\n')
AttributeError: 'NoneType' object has no attribute 'span'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions