Forum Archive

Pytube and Stash

ihf

I was trying to install the latest version v9.5.0 of pytube thinking that might work better than the v8.0.2. I started stash and did a pip uninstall pytube followed by a pip install pytube and then restarted stash. Now when I try to use the pytube command it just returns. Even pytube -version produces no output. Thoughts?

mikael

@ihf, what happens if you use it as a library? E.g.

>>> from pytube import YouTube
>>> YouTube('http://youtube.com/watch?v=9bZkp7q19f0').streams.first().download()
ihf

@mikael That returns with no error and no download.

mikael

@ihf, I am not a pytube user nor do I want to install it right now, so difficult to debug. Anyone else?

Have you googled whether you are alone with the problem?

I wonder if the new version brought in some conflicting dependencies, e.g. newer version of requests.

You could try one more remove and install, or manual removal from site-packages.

brumm

I don't use pytube, but youtube-dl is working pretty well for me.

ihf

I tried again to remove and reinstall the latest version of pytube but it just returns with no download or error message. I guess it should be removed from the stash distribution.

JonB

You may want to edit the pytube main script to add some diagnostic info... Or, use as a module instead of a stash command

ccc

You might also open an issue in the module’s repo to help the maintainers know about Pythonista and its unique needs. Someone in that community might have already made the combination work.

bennr01

It is a new StaSh bug. I do not know the exact details, but it seems like StaSh only creates an empty file for the command. This may be caused by a recent change. Could you please provide the output of the version command?

ihf

[~/Documents]$ version
StaSh v0.7.2
Pythonista 3.3 (330013)
iOS 12.3.1 (64-bit iPad6,4)
Python 2.7.12
root: ~/Documents/site-packages/stash
core.py: 2019-05-26 16:33:08
SELFUPDATE_TARGET: master
BIN_PATH:
~/Documents/bin
~/Documents/stash_extensions/bin
~/Documents/site-packages/stash/bin
[~/Documents]$