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

Python error when executing via crond #1840

Closed
bwa- opened this issue Nov 26, 2013 · 4 comments
Closed

Python error when executing via crond #1840

bwa- opened this issue Nov 26, 2013 · 4 comments
Assignees
Labels
bug

Comments

@bwa-
Copy link

@bwa- bwa- commented Nov 26, 2013

I think #1810/#1811 might have introduced an error? I get the following message with the current version (2013-11-25.3), executing a script via cron:

Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 9, in
load_entry_point('youtube-dl==2013.11.25.3', 'console_scripts', 'youtube-dl')()
File "/usr/lib/python3.3/site-packages/youtube_dl/init.py", line 693, in main
_real_main(argv)
File "/usr/lib/python3.3/site-packages/youtube_dl/init.py", line 656, in _real_main
with YoutubeDL(ydl_opts) as ydl:
File "/usr/lib/python3.3/site-packages/youtube_dl/YoutubeDL.py", line 164, in init
u'Assuming --restrict-filenames since file system encoding '
File "/usr/lib/python3.3/site-packages/youtube_dl/YoutubeDL.py", line 301, in report_warning
self.to_stderr(warning_message)
File "/usr/lib/python3.3/site-packages/youtube_dl/YoutubeDL.py", line 219, in to_stderr
if self.params.get('logger'):
AttributeError: 'NoneType' object has no attribute 'get'

Here's the command:

nice -n 19 youtube-dl --playlist-end 20 -c -i --max-quality 22 -o "%(title)s.%(id)s.%(ext)s" https://www.youtube.com/user/username

uname -a:

Linux rpi 3.10.19-3-ARCH #1 PREEMPT Thu Nov 21 20:33:10 CST 2013 armv6l GNU/Linux

This only happens when using cron. Downgrading to version 2013-11-18 fixed it for me.

@ghost ghost assigned jaimeMF Nov 26, 2013
@jaimeMF jaimeMF closed this in 4a98cdb Nov 26, 2013
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 26, 2013

Sorry for the problem and thanks for the report! You are right, that change introduced a bug.
It seems that you are using pip, if you want to verify it's fixed, you can install the code from the repo with: pip install -e git+https://github.com/rg3/youtube-dl.git#egg=youtube-dl

@bwa-
Copy link
Author

@bwa- bwa- commented Nov 26, 2013

Thanks for the rapid feedback! I actually use Arch's built-in package manager (pacman). I tried setting youtube-dl up via pip but failed horribly when it told me something about unknown distributions and such.
I'll just use the old version until this change gets rolled out. If I run into this or another problem, I'll report back.

Thanks again!

@HalosGhost
Copy link

@HalosGhost HalosGhost commented Nov 27, 2013

You may find it preferable to use the youtube-dl-git package on the ALUR. That way you can rebuild whenever a new fix is included.

@phihag
Copy link
Contributor

@phihag phihag commented Nov 28, 2013

Fixed in youtube-dl 2013.11.28. You'll still get the warning (and messed-up filenames) though. Set the LC_ALL environment variable to indicate a filesystem encoding. en_US.UTF-8 should be a good value for most systems.

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.