httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol
Avec une récente mise en ligne sur stylo-dev, on rencontre une erreur nouvelle :
https://export.stylo-dev.huma-num.fr/generique/export/stylo-dev.huma-num.fr/63bdaf6887e6ed0014e242d6/63bdaf6887e6ed0014e242d6/?with_toc=0&with_ascii=0&bibliography_style=chicagomodified&formats=originals&formats=images&formats=html
export-gateway_1 | [2023-01-16 17:51:14,415] ERROR in app: Exception on /generique/export/stylo-dev.huma-num.fr/63bdaf6887e6ed0014e242d6/63bdaf6887e6ed0014e242d6/ [GET]
export-gateway_1 | Traceback (most recent call last):
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
export-gateway_1 | yield
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_transports/default.py", line 218, in handle_request
export-gateway_1 | resp = self._pool.handle_request(req)
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpcore/_sync/connection_pool.py", line 208, in handle_request
export-gateway_1 | raise UnsupportedProtocol(
export-gateway_1 | httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.
export-gateway_1 |
export-gateway_1 | The above exception was the direct cause of the following exception:
export-gateway_1 |
export-gateway_1 | Traceback (most recent call last):
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
export-gateway_1 | response = self.full_dispatch_request()
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
export-gateway_1 | rv = self.handle_user_exception(e)
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
export-gateway_1 | rv = self.dispatch_request()
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
export-gateway_1 | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
export-gateway_1 | File "/usr/stylo-export/styloexport/views.py", line 199, in export
export-gateway_1 | article.fetch_all(force=force_download)
export-gateway_1 | File "/usr/stylo-export/styloexport/article.py", line 264, in fetch_all
export-gateway_1 | self.download_images(force=force)
export-gateway_1 | File "/usr/stylo-export/styloexport/article.py", line 39, in bail_on_errors
export-gateway_1 | return wrapped(*args, **kwargs)
export-gateway_1 | File "/usr/stylo-export/styloexport/article.py", line 196, in download_images
export-gateway_1 | image_path = self._download_image(image, images_path, force)
export-gateway_1 | File "/usr/stylo-export/styloexport/article.py", line 235, in _download_image
export-gateway_1 | response = httpx.get(image["url"])
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_api.py", line 189, in get
export-gateway_1 | return request(
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_api.py", line 100, in request
export-gateway_1 | return client.request(
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_client.py", line 821, in request
export-gateway_1 | return self.send(request, auth=auth, follow_redirects=follow_redirects)
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_client.py", line 908, in send
export-gateway_1 | response = self._send_handling_auth(
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_client.py", line 936, in _send_handling_auth
export-gateway_1 | response = self._send_handling_redirects(
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_client.py", line 973, in _send_handling_redirects
export-gateway_1 | response = self._send_single_request(request)
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_client.py", line 1009, in _send_single_request
export-gateway_1 | response = transport.handle_request(request)
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_transports/default.py", line 218, in handle_request
export-gateway_1 | resp = self._pool.handle_request(req)
export-gateway_1 | File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
export-gateway_1 | self.gen.throw(typ, value, traceback)
export-gateway_1 | File "/usr/stylo-export/venv/lib/python3.9/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
export-gateway_1 | raise mapped_exc(message) from exc
export-gateway_1 | httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.