Skip to content
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

ard.py: AttributeError: 'NoneType' object has no attribute 'group' #3422

Closed
mehlis opened this issue Aug 3, 2014 · 9 comments
Closed

ard.py: AttributeError: 'NoneType' object has no attribute 'group' #3422

mehlis opened this issue Aug 3, 2014 · 9 comments

Comments

@mehlis
Copy link

@mehlis mehlis commented Aug 3, 2014

in current master 493987f:

$ ./youtube-dl "http://www.ardmediathek.de/tv/Reportage-Dokumentation/Dokumentarfilm-im-Ersten-Der-Banker-M/Das-Erste/Video?documentId=22663206"
[ARD] 22663206: Downloading webpage
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "./youtube-dl/__main__.py", line 18, in <module>
  File "./youtube-dl/youtube_dl/__init__.py", line 766, in main
  File "./youtube-dl/youtube_dl/__init__.py", line 719, in _real_main
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 715, in download
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 348, in extract_info
  File "./youtube-dl/youtube_dl/extractor/common.py", line 125, in extract
  File "./youtube-dl/youtube_dl/extractor/ard.py", line 34, in _real_extract
AttributeError: 'NoneType' object has no attribute 'group'
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 3, 2014

Post the full output you get when running with --verbose option.

@mrplinsky
Copy link

@mrplinsky mrplinsky commented Aug 3, 2014

$ youtube-dl -F --verbose http://www.youtube.com/watch?v=IcoqJCJlHbQ

Edit by @phihag: snip

@phihag
Copy link
Contributor

@phihag phihag commented Aug 3, 2014

@mrplinksy Your problem is unrelated to this one. Please post a new issue. Before you do, make sure you are using the latest version (2014.08.02 or newer).
It looks like you installed youtube-dl with a package manager (something like apt-get, or pip). You can use that package manager to update youtube-dl (you may need to contact the package maintainer though, and request an update). Alternatively, uninstall the youtube package and follow our manual installation instructions. From then on, you'll be able to update with sudo youtube-dl -U.

@phihag
Copy link
Contributor

@phihag phihag commented Aug 3, 2014

For what it's worth, this (the ARD) download works fine for me with youtube-dl 2014.08.02. The requested log with --verbose should tell us more about what's happening here.

@mrplinsky
Copy link

@mrplinsky mrplinsky commented Aug 3, 2014

Hello! ...I tried to help :) I'll check the latetest version. Thank you!

@mrplinsky
Copy link

@mrplinsky mrplinsky commented Aug 3, 2014

everything is ok with the latest version!

@mehlis
Copy link
Author

@mehlis mehlis commented Aug 5, 2014

updated to 548f31d

$ ./youtube-dl --verbose "http://www.ardmediathek.de/tv/Reportage-Dokumentation/Dokumentarfilm-im-Ersten-Der-Banker-M/Das-Erste/Video?documentId=22663206"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.ardmediathek.de/tv/Reportage-Dokumentation/Dokumentarfilm-im-Ersten-Der-Banker-M/Das-Erste/Video?documentId=22663206']
[debug] youtube-dl version 2013.11.07
[debug] Python version 2.7.5 - Linux-3.14.13-100.fc19.x86_64-x86_64-with-fedora-19-Schrödinger’s_Cat
[debug] Proxy map: {}
[ARD] 22663206: Downloading webpage
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "./youtube-dl/__main__.py", line 18, in <module>
  File "./youtube-dl/youtube_dl/__init__.py", line 766, in main
  File "./youtube-dl/youtube_dl/__init__.py", line 719, in _real_main
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 715, in download
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 348, in extract_info
  File "./youtube-dl/youtube_dl/extractor/common.py", line 125, in extract
  File "./youtube-dl/youtube_dl/extractor/ard.py", line 34, in _real_extract
AttributeError: 'NoneType' object has no attribute 'group'
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 8, 2014

You are still running an outdated version of youtube-dl according to:
[debug] youtube-dl version 2013.11.07
Please, follow our manual installation instructions to fetch the latest version. From then on, you'll be able to update with sudo youtube-dl -U.

@dstftw dstftw closed this Aug 8, 2014
@mehlis
Copy link
Author

@mehlis mehlis commented Aug 10, 2014

I was not aware of the problem, that it's not enough to update the git to get the newest version?!?

In the mean time ard.de decided to depublish the video, so at least a nice message should be displayed in youtube-dl....

[c@yellow youtube-dl] $ ./youtube-dl -U
youtube-dl is up-to-date (2014.08.05)
[c@yellow youtube-dl] $ ./youtube-dl --verbose "http://www.ardmediathek.de/tv/Reportage-Dokumentation/Dokumentarfilm-im-Ersten-Der-Banker-M/Das-Erste/Video?documentId=22663206"
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.ardmediathek.de/tv/Reportage-Dokumentation/Dokumentarfilm-im-Ersten-Der-Banker-M/Das-Erste/Video?documentId=22663206']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.08.05
[debug] Python version 2.7.5 - Linux-3.14.13-100.fc19.x86_64-x86_64-with-fedora-19-Schrödinger’s_Cat
[debug] Proxy map: {}
[ARD] 22663206: Downloading webpage
[ARD] 22663206: Downloading JSON metadata
ERROR: Failed to download JSON; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "./youtube-dl/youtube_dl/extractor/common.py", line 314, in _download_json
    return json.loads(json_string)
  File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Traceback (most recent call last):
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 516, in extract_info
    ie_result = ie.extract(url)
  File "./youtube-dl/youtube_dl/extractor/common.py", line 170, in extract
    return self._real_extract(url)
  File "./youtube-dl/youtube_dl/extractor/ard.py", line 90, in _real_extract
    'http://www.ardmediathek.de/play/media/%s' % video_id, video_id)
  File "./youtube-dl/youtube_dl/extractor/common.py", line 316, in _download_json
    raise ExtractorError('Failed to download JSON', cause=ve)
ExtractorError: Failed to download JSON; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output. Make sure you are using the latest version; type  youtube-dl -U  to update.
dstftw added a commit that referenced this issue Aug 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.