updating Youtubedl
George T. Greenfield (154) 748 posts |
Thanks. I installed those and tested again, without success initially, but before I could complete the testing my ‘virgin’ card decided to corrupt itself – at any rate it now won’t boot. I’ll report further when it’s reformatted. |
George T. Greenfield (154) 748 posts |
Second time around: I reinstalled Python-38, Python-38-pip and Python-Core plus LibSSL, LibFFi6, LibBZ2-1.0, ZLib1g, LibLZMA5, and for good measure, as they were in the ‘recommended’ box in PackMan, TaskRunner, LibSQLite3 and LibExpat1. I then obtained an uptodate Youtube URL using my Windows laptop (https://youtu.be/fVAiQX7wINw if anyone wants to try). 1. Attempting then to Install/Upgrade youtube-dl by right-clicking over the YTPlay icon produced this: got PYTHONHOME Current thread 0×00298e18 (most recent call first): 2. Attempting to update youtube-search produced this: got PYTHONHOME Current thread 0×00298e18 (most recent call first): 3. and attempting to run the link above in YTPlay produced this: Python path configuration: Current thread 0×00298e18 (most recent call first): EDIT: PythonUser, PythonSite and Python3 are all on the Boot ‘Look at’ list. |
Chris Gransden (337) 1207 posts |
Does !Python3 run OK if you double-click it. You should see similar to the below,
Also type in a task window,
|
George T. Greenfield (154) 748 posts |
Yes.
Yes.
Yes. I then tried the URL link again and got this: Python path configuration: Current thread 0×00298e18 (most recent call first): Just to be clear, I’m running 5.28 stable release including the current HD4 directories straight off the ROOL site on a Pi1 – could hardware be an issue? |
Chris Gransden (337) 1207 posts |
Run python and type the following,
|
David Pitt (3386) 1248 posts |
YTPlay has been installed on a new OS5.28 installation an a USB pen on the Titanium. In addition to the notes in this thread The example given by George above did fly without any error.
I don’t know what that is about, there is an |
George T. Greenfield (154) 748 posts |
Would that I could say the same!
I did that, it looked identical to Chris’s version. I then attempted to load my URL to YTPlay, without attempting to update youtube-dl or youtube-search (they must be up to date, surely?). The result was the following: Python path configuration: PYTHONHOME = ‘/python/env’ PYTHONPATH = (not set) program name = ‘SDFS::HardDisc0.$.Apps.Development.!Python3.Bin.python38’ isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = ‘SDFS::HardDisc0.$.Apps.Development.!Python3.Bin.python38’ sys.base_prefix = ‘/python/env’ sys.base_exec_prefix = ‘/python/env’ sys.executable = ‘SDFS::HardDisc0.$.Apps.Development.!Python3.Bin.python38’ sys.prefix = ‘/python/env’ sys.exec_prefix = ‘/python/env’ sys.path = [ ‘/python/env.python38.lib’, ‘/python/env.python38.lib.lib-dynload’, ]Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Current thread 0×00298e18 (most recent call first): EDIT: I’d previously installed CaCertificates as suggested above by David. |
Chris Gransden (337) 1207 posts |
In a previous post you mentioned setting up an sd card from scratch so youtube-dl and youtube-python-search won’t be installed. |
David Pitt (3386) 1248 posts |
That was in response to an ssl error. A little digging found the clue in file line 577 cafile="<CaCertificates$Dir>.ca-certificates/crt" |
Martin Avison (27) 1494 posts |
Why are the standard RISC OS certificates in InetDbase:CertData not used by Python? |
Chris Gransden (337) 1207 posts |
!CaCertificates existed several years before CertData appeared in !Boot. |
Steve Pampling (1551) 8170 posts |
True, but Python 3 is a recent port is it not? OK, someone ASSUMED there had been no change and was wrong. It happens, people learn. |
Raik (463) 2061 posts |
Looks like I should think about a YTPlay-PackMan version with all dependencies but is this possible? |
George T. Greenfield (154) 748 posts |
Sorry, that was misleading. I imported Youtubedl (2020.07.28) from a previous installation when creating the ‘clean’ card, as it’s not available as a standalone app, and ran *pip38 install —upgrade youtube-dl. But still no success. I’m probably making some elementary error; but what, that’s the question! |
Chris Gransden (337) 1207 posts |
Delete the Youtubedl you copied over. Reboot and then run from a task window, pip38 install youtube-dl |
George T. Greenfield (154) 748 posts |
Maybe it will help if I summarise my procedure. Python 3.8.5+ (riscos-5, Nov 18 2020, 08:45:24) Python path configuration: Current thread 0×00298e18 (most recent call first): In case it helps, here is a list produced by *modules. There is no encodings module listed. *modules |
Chris Gransden (337) 1207 posts |
What happens if you delete Youtubedl, reboot and run from a task window, pip38 install youtube-dl |
Doug Webb (190) 1180 posts |
Right so you seem to have have the older standalone YouTubeDL being seen and run and that is no longer required if you install via pip or YTPlay optioin which put these in PythonSite in Resources if you installed the packages correctly. As others have said don’t import anything from another setup but use the tools available to install. If you are following the install set out on Riscository then that is an older way for earlier versions of YTPlay and should not be used or mixed. Also when installing via the YTPlay options you will get an initial error so install it and youtube-search a second time without rebooting the system. |
George T. Greenfield (154) 748 posts |
I deleted/updated youtubedl as advised by Chris, and, after a considerable delay – it worked!! The ‘unknown operand’ error message appeared and the YTPlay icon vanished, as usual, but this time the process was evidently proceeding. I’d import a celebratory screengrab if I knew how (Textile reference below is bereft of instructions AFAICS). FWIW that was using YTPlay V3.02a. Thanks to all for your patience. |
Doug Webb (190) 1180 posts |
Hi George, Good to hear you have it fixed and now you have 3.02a working perhaps you may wish to try 3.10, or then again not :-) Hope you find some interesting Youtube clips to entertain you. |
George T. Greenfield (154) 748 posts |
Originally, I did. It might be helpful for Vince H to add an update para. to the instructions. I appreciate that maintainers of websites such as Riscository – which I find extremely useful – cannot be expected to constantly revise historic entries every time software is updated, but in this case the current instructions (dating from Jan 25, 2020) are positively misleading. |
Doug Webb (190) 1180 posts |
George, In defence of Vince those instructions were based on my usage and set up and following a MUG event where some people asked how to play YouTube video’s and asked for some instructions. The update to YTPlay also came about with some dialogue between myself , Raik and others to make it easier following some feedback from others who found it a bit harder using the old method. So two steps forward and one back for some. Raik has some good points in his YTPlay help file on installing and setting up things and perhaps he could also make a change to state if you are upgrading from older versions to dispense with old and standalone versions of YouTube-DL and YouTube-Search. Anyway you are there now and just proves when you provide what you think is helpful at the time that you can please some of the people sometimes but not please all of the people all of the time :-) |
Rick Murray (539) 13840 posts |
You’ve sent an email, right? |
Chris Gransden (337) 1207 posts |
Packit available via PackMan can be used to create a package for YTPlay. See the RISC OS Packaging Guide. |
Doug Webb (190) 1180 posts |
Already done with a suggestion that it makes clear the article is valid for the versions of the programs and helpers refered to in the instructions and to follow the advice in the current YTPlay helpfile. One out of date article down , now Rick how about you updating your Samba help article from 2001 before someone complains about you trying to help as Windows 3.11 is so retro :-) |