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

[mixcloud] using --flat-playlist fails #15394

Closed
bubbleguuum opened this issue Jan 23, 2018 · 7 comments
Closed

[mixcloud] using --flat-playlist fails #15394

bubbleguuum opened this issue Jan 23, 2018 · 7 comments
Labels

Comments

@bubbleguuum
Copy link

@bubbleguuum bubbleguuum commented Jan 23, 2018

Using --flat-playlist on mixcloud fails (this used to work). Omitting --flat-playlist works, but it would be great to have this issue fixed for consistency.

python3 youtube-dl -v https://www.mixcloud.com/rafatarg/ella-fitzgerald-and-louis-armstrong/ -J --flat-playlist
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.mixcloud.com/rafatarg/ella-fitzgerald-and-louis-armstrong/', '-J', '--flat-playlist']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.01.21
[debug] Python version 3.2.3 (CPython) - Linux-3.2.0-70-generic-x86_64-with-Ubuntu-12.04-precise
[debug] exe versions: avconv 0.10.12-7, avprobe 0.10.12-7, ffmpeg 0.10.12-7, ffprobe 0.10.12-7
[debug] Proxy map: {}
Traceback (most recent call last):
File "/usr/lib/python3.2/runpy.py", line 160, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python3.2/runpy.py", line 73, in _run_code
exec(code, run_globals)
File "youtube-dl/main.py", line 19, in
File "youtube-dl/youtube_dl/init.py", line 465, in main
File "youtube-dl/youtube_dl/init.py", line 455, in _real_main
File "youtube-dl/youtube_dl/YoutubeDL.py", line 1988, in download
File "youtube-dl/youtube_dl/YoutubeDL.py", line 784, in extract_info
File "youtube-dl/youtube_dl/extractor/common.py", line 438, in extract
File "youtube-dl/youtube_dl/extractor/mixcloud.py", line 112, in _real_extract
File "/usr/lib/python3.2/base64.py", line 83, in b64decode
raise TypeError("expected bytes, not %s" % s.class.name)
TypeError: expected bytes, not str

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 23, 2018

This is a Python 3.2-specific issue. We're going to drop support for Python 3.2. (#14515) Is there a reason for you to use Python 3.2? Python 2.7 should work just fine.

@bubbleguuum
Copy link
Author

@bubbleguuum bubbleguuum commented Jan 23, 2018

I'm using a Python 3.2 build on Android as well as on Ubuntu 12.04 where it is the default. On Ubuntu I can replace it easily with a newer version probably, although on Android it is going to be more problematic to compile a newer version. And IIRC python 2.7 does not work properly on Android with TLS.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 23, 2018

For Ubuntu, you should consider upgrading to a newer version. 12.04 has been dropped by Canonical on April 28, 2017. And the default Python on 12.04 is 2.7.

For Android, I guess you're using QPython? It's known to have several issues. I suggest a newer version. Currently I use https://github.com/yan12125/python3-android/ and TLS connections work just fine.

@yan12125 yan12125 mentioned this issue Jan 23, 2018
5 of 9 tasks complete
@bubbleguuum
Copy link
Author

@bubbleguuum bubbleguuum commented Jan 23, 2018

Yup I'm going yo upgrade, thanks for the pointers. QPython has 3.6.1 Android binaries, going to try these.

@bubbleguuum
Copy link
Author

@bubbleguuum bubbleguuum commented Jan 23, 2018

And you are right for Ubuntu 12.04. 2.7 is the default for Python2 while Python3 is v3.2.3. I vaguely remember having to switch to Python 3 a long time ago to fix an issue with Python 2 on some sites.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 23, 2018

If there's something wrong with Python 2 and youtube-dl, feel free to open a new bug. Python 2.7 will be supported for foreeable future.

BTW, Termux is also an excellent package provider on Android. Just tried it and it's Python 3.6.4 works just fine with youtube-dl.

@dstftw dstftw closed this in 5d7d805 Jan 23, 2018
@bubbleguuum
Copy link
Author

@bubbleguuum bubbleguuum commented Jan 24, 2018

Termux is indeed a very nice project and its Python works great, and for no less than 4 different archs (although it requires Lollipop+). Also thanks for the committed fix to still have it work with 3.2, this is appreciated. I saw you added compat b64 to a bunch of providers.

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
2 participants
You can’t perform that action at this time.