moehmeni / syncedlyrics

Get an LRC format (synchronized) lyrics for your music
MIT License
239 stars 23 forks source link

failed test: An error occurred while searching for an LRC on Genius #51

Closed Albert-aka-Albot closed 3 months ago

Albert-aka-Albot commented 3 months ago

Operating System: Arch Linux Kernel: Linux 6.9.4-x64v2-xanmod1

==> Making package: python-syncedlyrics 1.0.0-1 (Mon 17 Jun 2024 09:29:55 AM CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
* Getting build dependencies for wheel...
* Building wheel...
Successfully built syncedlyrics-1.0.0-py3-none-any.whl
==> Starting check()...
================================================================ test session starts ================================================================
platform linux -- Python 3.12.3, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/user/.cache/paru/clone/python-syncedlyrics/src/syncedlyrics-1.0.0
configfile: pyproject.toml
plugins: typeguard-4.2.1, asyncio-0.23.7, mock-3.14.0, anyio-4.4.0
asyncio: mode=Mode.STRICT
collected 8 items                                                                                                                                   

tests.py .....F..                                                                                                                             [100%]

===================================================================== FAILURES ======================================================================
____________________________________________________________________ test_genius ____________________________________________________________________

    def test_genius():
>       _test_provider("Genius")

tests.py:42: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

provider = 'Genius', kwargs = {}, lrc = None, @py_assert3 = False, @py_format5 = 'assert False\n{False = isinstance(None, str)\n}'

    def _test_provider(provider: str, **kwargs):
        lrc = syncedlyrics.search(search_term=q, providers=[provider], **kwargs)
        logging.debug(lrc)
>       assert isinstance(lrc, str)
E       assert False
E        +  where False = isinstance(None, str)

tests.py:15: AssertionError
----------------------------------------------------------------- Captured log call -----------------------------------------------------------------
ERROR    syncedlyrics:__init__.py:67 An error occurred while searching for an LRC on Genius
ERROR    syncedlyrics:__init__.py:68 HTTPSConnectionPool(host='genius.com', port=443): Read timed out. (read timeout=10)
============================================================== short test summary info ==============================================================
FAILED tests.py::test_genius - assert False
=========================================================== 1 failed, 7 passed in 20.69s ============================================================
==> ERROR: A failure occurred in check().
    Aborting...
error: failed to build 'python-syncedlyrics-1.0.0-1'
Albert-aka-Albot commented 3 months ago

The error is gone. It worked on the second try