Failed

tests.modules.check_comics.test_comicmodule[Nightshift] (from pytest)

Failing for the past 5 builds (Since #793 )
Took 1.2 sec.

Error Message

requests.exceptions.InvalidHeader: Header part ('https://poecatcomix.com/nightshift/iss-8-page-27rde/') from {'Referer': 'https://poecatcomix.com/nightshift/iss-8-page-27rde/'} must be of type str or bytes, not <class 'lxml.etree._ElementUnicodeResult'>

Stacktrace

tests/modules/check_comics.py:57: in test_comicmodule
    _test_comic(str(tmpdir), scraperobj, maxstrips)
tests/modules/check_comics.py:66: in _test_comic
    files.append(_check_strip(outdir, strip,
tests/modules/check_comics.py:99: in _check_strip
    fn, _ = image.save(outdir)
dosagelib/comic.py:97: in save
    self.connect(datetime.utcfromtimestamp(lastchange))
dosagelib/comic.py:65: in connect
    self.urlobj = urlopen(self.url, self.scraper.session,
dosagelib/util.py:247: in urlopen
    req = session.request(method, url, **kwargs)
/tmp/home/.local/lib/python3.10/site-packages/requests/sessions.py:573: in request
    prep = self.prepare_request(req)
/tmp/home/.local/lib/python3.10/site-packages/requests/sessions.py:484: in prepare_request
    p.prepare(
/tmp/home/.local/lib/python3.10/site-packages/requests/models.py:369: in prepare
    self.prepare_headers(headers)
/tmp/home/.local/lib/python3.10/site-packages/requests/models.py:491: in prepare_headers
    check_header_validity(header)
/tmp/home/.local/lib/python3.10/site-packages/requests/utils.py:1037: in check_header_validity
    raise InvalidHeader(
E   requests.exceptions.InvalidHeader: Header part ('https://poecatcomix.com/nightshift/iss-8-page-27rde/') from {'Referer': 'https://poecatcomix.com/nightshift/iss-8-page-27rde/'} must be of type str or bytes, not <class 'lxml.etree._ElementUnicodeResult'>