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

yt-dlp-git AUR package fails to install: test_search_nextjs_data FAILED #9823

Closed
9 of 11 tasks
traibr opened this issue Apr 29, 2024 · 4 comments
Closed
9 of 11 tasks
Labels
question Question

Comments

@traibr
Copy link

traibr commented Apr 29, 2024

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

United Kingdom

Provide a description that is worded well enough to be understood

I've UPGRADED my Arch system, python 3.12.3 has been installed... hmm, this is the second application that has stopped working(ProtonVPN). Look forward to the rest...

FAILED LINE:

test/test_InfoExtractor.py::TestInfoExtractor::test_search_nextjs_data FAILED [ 1%]

======================================================= FAILURES =======================================================
______________________________________ TestInfoExtractor.test_search_nextjs_data _______________________________________

self = <test.test_InfoExtractor.TestInfoExtractor testMethod=test_search_nextjs_data>

def test_search_nextjs_data(self):
    data = '<script id="__NEXT_DATA__" type="application/json">{"props":{}}</script>'
    self.assertEqual(self.ie._search_nextjs_data(data, None), {'props': {}})
    self.assertEqual(self.ie._search_nextjs_data('', None, fatal=False), {})
    self.assertEqual(self.ie._search_nextjs_data('', None, default=None), None)
    self.assertEqual(self.ie._search_nextjs_data('', None, default={}), {})
  with self.assertRaises(DeprecationWarning):

E AssertionError: DeprecationWarning not raised

test/test_InfoExtractor.py:1915: AssertionError
------------------------------------------------- Captured stderr call -------------------------------------------------
WARNING: [Dummy] unable to extract next.js data; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
=================================================== warnings summary ===================================================
test/test_InfoExtractor.py::TestInfoExtractor::test_search_nextjs_data
/home/traibr/aur-package/yt-dlp-git/src/yt-dlp/test/test_InfoExtractor.py:1916: DeprecationWarning: using default='{}' is deprecated, use default={} instead
self.assertEqual(self.ie._search_nextjs_data('', None, default='{}'), {})

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-vU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version [email protected] from yt-dlp/yt-dlp [ff0779267]
[debug] Python 3.12.3 (CPython x86_64 64bit) - Linux-6.8.7-arch1-2-x86_64-with-glibc2.39 (OpenSSL 3.2.1 30 Jan 2024, glibc 2.39)
[debug] exe versions: ffmpeg 6.1.1 (setts), ffprobe 6.1.1, rtmpdump 2.4
[debug] Optional libraries: certifi-2024.02.02, requests-2.31.0, secretstorage-3.3.3, sqlite3-3.45.3, urllib3-1.26.18
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: [email protected] from yt-dlp/yt-dlp
yt-dlp is up to date ([email protected] from yt-dlp/yt-dlp)
@traibr traibr added site-bug Issue with a specific website triage Untriaged issue labels Apr 29, 2024
@traibr traibr changed the title Installation ERROR after python 3.12.2 UPGRADE Installation ERROR after python 3.12.3 UPGRADE Apr 29, 2024
@traibr traibr changed the title Installation ERROR after python 3.12.3 UPGRADE Re-installation ERROR after python 3.12.3 UPGRADE Apr 29, 2024
@bashonly
Copy link
Member

Are you trying to install yt-dlp-git from the AUR? Is that why you are running pytest?

This failing test has nothing to do with Python 3.12; it was an oversight on our part. See #9763

You can make this change to the AUR PKGBUILD so that the tests pass:

diff --git a/PKGBUILD b/PKGBUILD
index face841..5cc2eb3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -47,7 +47,7 @@ build() {
 
 check() {
     cd "${pkgname%-git}"
-    pytest -v -m "not download"
+    pytest -v -Werror -m "not download"
 }
 
 package() {

@bashonly bashonly added question Question and removed site-bug Issue with a specific website triage Untriaged issue labels Apr 29, 2024
@traibr
Copy link
Author

traibr commented May 3, 2024

Thanks for the reply @bashonly,

I'm pulling down the AUR from git & running "makepkg" within the directory as I usually do, it's a simple as that. Due to a prior FULL system update that day, python was upgraded, & a number of other AUR app's stopped working as a result. So assumed the usual, which I know I shouldn't do.

I'm not manually running any pytest, unless that's being done via the PKGBUILD file itself (which it is, as I write this); I've made the change as directed within the file, & the compile has worked successfully:

=============================================================== 708 passed, 196 skipped, 5736 deselected in 242.75s (0:04:02) ================================================================ ==> Entering fakeroot environment... ==> Starting package()... ==> Tidying install... -> Removing libtool files... -> Purging unwanted files... -> Removing static library files... -> Stripping unneeded symbols from binaries and libraries... -> Compressing man and info pages... ==> Checking for packaging issues... ==> Creating package "yt-dlp-git"... -> Generating .PKGINFO file... -> Generating .BUILDINFO file... -> Generating .MTREE file... -> Compressing package... ==> Leaving fakeroot environment. ==> Finished making: yt-dlp-git 2024.04.09.r13.gac817bc-1 (Fri 03 May 2024 17:24:53 BST)

Apologies, my coding skills are very much baseline, however I really do appreciate your response :)

Thanks for all the help!

@bashonly
Copy link
Member

bashonly commented May 3, 2024

All good. This will be resolved when #9765 is merged, which will be shortly before the next stable release of yt-dlp. Then this manual intervention in the PKGBUILD will no longer be necessary

@bashonly bashonly closed this as completed May 3, 2024
@bashonly bashonly changed the title Re-installation ERROR after python 3.12.3 UPGRADE yt-dlp-git AUR package fails to install: test_search_nextjs_data FAILED May 3, 2024
@traibr
Copy link
Author

traibr commented May 3, 2024

Good to know, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question
Projects
None yet
Development

No branches or pull requests

2 participants