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

2013.12.23.4 "ERROR: local variable 'err' referenced before assignment" should be "Disk quota exceeded" #2045

Closed
Fusl opened this issue Dec 25, 2013 · 3 comments

Comments

@Fusl
Copy link

@Fusl Fusl commented Dec 25, 2013

youtube-dl throws "ERROR: local variable 'err' referenced before assignment" when there is no disk space available anymore but it should rather throw an error like "Disk quota exceeded" or "There was a problem downloading the video. Please make sure you have enough disk space."

Command: youtube-dl -i -k -x --audio-format wav --audio-quality 0 http://youtube.com/user/

[debug] youtube-dl version 2013.12.23.4
[debug] Python version 2.7.3 - Linux-2.6.32-26-pve-x86_64-with-debian-7.3

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Dec 31, 2013

Could you please post the full output of running youtube-dl -i -k -x --audio-format wav --audio-quality 0 URL_HERE --verbose?, we need it to debug the problem.

@Fusl
Copy link
Author

@Fusl Fusl commented Dec 31, 2013

Sure:

root@v109:~# youtube-dl -i -k -x --audio-format wav --audio-quality 0 http://www.youtube.com/watch?v=qqk4ItPjU5g --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-i', '-k', '-x', '--audio-format', 'wav', '--audio-quality', '0', 'http://www.youtube.com/watch?v=qqk4ItPjU5g', '--verbose']
[debug] Encodings: locale 'ANSI_X3.4-1968', fs 'ANSI_X3.4-1968', out 'ANSI_X3.4-1968', pref: 'ANSI_X3.4-1968'
[debug] youtube-dl version 2013.12.26
[debug] Python version 2.7.3 - Linux-2.6.32-26-pve-x86_64-with-debian-7.0
[debug] Proxy map: {}
[youtube] Setting language
[youtube] qqk4ItPjU5g: Downloading webpage
[youtube] qqk4ItPjU5g: Downloading video info webpage
[youtube] qqk4ItPjU5g: Extracting video information
[download] Destination: Livestream from the 30c3 in Hamburg - Tag 1 [30c3][live]-qqk4ItPjU5g.mp4
[download]   0.0% of 1.60GiB at     ---b/s ETA Unknown ETA

ERROR: local variable 'err' referenced before assignment
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 501, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 528, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 718, in process_video_result
    self.process_info(new_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 883, in process_info
    success = fd.download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 290, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/http.py", line 138, in real_download
    self.report_error(u'unable to write data: %s' % str(err))
UnboundLocalError: local variable 'err' referenced before assignment
@phihag
Copy link
Contributor

@phihag phihag commented Jan 5, 2014

With the current version (2014.01.05.5), the output is a reasonable

ERROR: unable to write data: [Errno 27] File too large
Traceback (most recent call last):
  File "/home/phihag/projects/youtube-dl/youtube_dl/downloader/http.py", line 135, in real_download
    stream.write(data_block)
IOError: [Errno 27] File too large

This seems fine. To update, you can type sudo youtube-dl -U. I'm closing this issue now, but feel free to comment. If the issue persists, we'll simply reopen this ticket.

@phihag phihag closed this Jan 5, 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
3 participants
You can’t perform that action at this time.