Bug 1961802 - [abrt] dialect: request(): _exceptions.py:343:map_exceptions:httpx.LocalProtocolError: Missing hostname in URL.
Summary: [abrt] dialect: request(): _exceptions.py:343:map_exceptions:httpx.LocalProto...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dialect
Version: 34
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lyes Saadi
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:f22309c864fee1e23961e375edc...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-18 17:52 UTC by Alistair Harris
Modified: 2021-07-16 01:05 UTC (History)
1 user (show)

Fixed In Version: dialect-1.3.0-3.fc34 dialect-1.3.0-3.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-16 00:59:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (3.40 KB, text/plain)
2021-05-18 17:52 UTC, Alistair Harris
no flags Details
File: cpuinfo (2.41 KB, text/plain)
2021-05-18 17:52 UTC, Alistair Harris
no flags Details
File: environ (2.15 KB, text/plain)
2021-05-18 17:52 UTC, Alistair Harris
no flags Details
File: mountinfo (3.64 KB, text/plain)
2021-05-18 17:52 UTC, Alistair Harris
no flags Details
File: namespaces (172 bytes, text/plain)
2021-05-18 17:52 UTC, Alistair Harris
no flags Details
File: open_fds (893 bytes, text/plain)
2021-05-18 17:53 UTC, Alistair Harris
no flags Details

Description Alistair Harris 2021-05-18 17:52:53 UTC
Version-Release number of selected component:
dialect-1.3.0-1.fc34

Additional info:
reporter:       libreport-2.14.0
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/dbus-:1.2-com.github.gi_lom.dialect.SearchProvider
cmdline:        /usr/bin/python3 /usr/share/dialect/search_provider
crash_function: request
exception_type: httpcore.LocalProtocolError
executable:     /usr/share/dialect/search_provider
interpreter:    python3-3.9.5-1.fc34.x86_64
kernel:         5.11.20-300.fc34.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
_exceptions.py:343:map_exceptions:httpx.LocalProtocolError: Missing hostname in URL.

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/httpx/_exceptions.py", line 326, in map_exceptions
    yield
  File "/usr/lib/python3.9/site-packages/httpx/_client.py", line 861, in _send_single_request
    (status_code, headers, stream, ext) = transport.request(
  File "/usr/lib/python3.9/site-packages/httpcore/_sync/connection_pool.py", line 193, in request
    raise LocalProtocolError("Missing hostname in URL.")
httpcore.LocalProtocolError: Missing hostname in URL.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/share/dialect/search_provider", line 208, in <module>
    TranslateService()
  File "/usr/share/dialect/search_provider", line 43, in __init__
    self.translator = self._get_translator()
  File "/usr/share/dialect/search_provider", line 193, in _get_translator
    translator = TRANSLATORS[backend](
  File "/usr/share/dialect/dialect/translators/libretrans.py", line 29, in __init__
    r = self.client.get(self.lang_url)
  File "/usr/lib/python3.9/site-packages/httpx/_client.py", line 907, in get
    return self.request(
  File "/usr/lib/python3.9/site-packages/httpx/_client.py", line 733, in request
    return self.send(
  File "/usr/lib/python3.9/site-packages/httpx/_client.py", line 767, in send
    response = self._send_handling_auth(
  File "/usr/lib/python3.9/site-packages/httpx/_client.py", line 805, in _send_handling_auth
    response = self._send_handling_redirects(
  File "/usr/lib/python3.9/site-packages/httpx/_client.py", line 837, in _send_handling_redirects
    response = self._send_single_request(request, timeout)
  File "/usr/lib/python3.9/site-packages/httpx/_client.py", line 861, in _send_single_request
    (status_code, headers, stream, ext) = transport.request(
  File "/usr/lib64/python3.9/contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python3.9/site-packages/httpx/_exceptions.py", line 343, in map_exceptions
    raise mapped_exc(message, **kwargs) from exc  # type: ignore
httpx.LocalProtocolError: Missing hostname in URL.

Local variables in innermost frame:
mapping: {<class 'httpcore.TimeoutException'>: <class 'httpx.TimeoutException'>, <class 'httpcore.ConnectTimeout'>: <class 'httpx.ConnectTimeout'>, <class 'httpcore.ReadTimeout'>: <class 'httpx.ReadTimeout'>, <class 'httpcore.WriteTimeout'>: <class 'httpx.WriteTimeout'>, <class 'httpcore.PoolTimeout'>: <class 'httpx.PoolTimeout'>, <class 'httpcore.NetworkError'>: <class 'httpx.NetworkError'>, <class 'httpcore.ConnectError'>: <class 'httpx.ConnectError'>, <class 'httpcore.ReadError'>: <class 'httpx.ReadError'>, <class 'httpcore.WriteError'>: <class 'httpx.WriteError'>, <class 'httpcore.CloseError'>: <class 'httpx.CloseError'>, <class 'httpcore.ProxyError'>: <class 'httpx.ProxyError'>, <class 'httpcore.UnsupportedProtocol'>: <class 'httpx.UnsupportedProtocol'>, <class 'httpcore.ProtocolError'>: <class 'httpx.ProtocolError'>, <class 'httpcore.LocalProtocolError'>: <class 'httpx.LocalProtocolError'>, <class 'httpcore.RemoteProtocolError'>: <class 'httpx.RemoteProtocolError'>}
kwargs: {'request': <Request('GET', 'https:languages')>}
mapped_exc: <class 'httpx.LocalProtocolError'>
from_exc: <class 'httpcore.RemoteProtocolError'>
to_exc: <class 'httpx.RemoteProtocolError'>
message: 'Missing hostname in URL.'

Comment 1 Alistair Harris 2021-05-18 17:52:56 UTC
Created attachment 1784540 [details]
File: backtrace

Comment 2 Alistair Harris 2021-05-18 17:52:57 UTC
Created attachment 1784541 [details]
File: cpuinfo

Comment 3 Alistair Harris 2021-05-18 17:52:57 UTC
Created attachment 1784542 [details]
File: environ

Comment 4 Alistair Harris 2021-05-18 17:52:58 UTC
Created attachment 1784543 [details]
File: mountinfo

Comment 5 Alistair Harris 2021-05-18 17:52:59 UTC
Created attachment 1784544 [details]
File: namespaces

Comment 6 Alistair Harris 2021-05-18 17:53:00 UTC
Created attachment 1784545 [details]
File: open_fds

Comment 7 Lyes Saadi 2021-07-05 17:52:13 UTC
Hello :)!

Sorry for the (very) late answer, but I was a bit overwhelmed recently. I'm now back and ready to treat this issue.

Do you remember what was the libretranslate instance URL? Does it have any weird unicode glyph in it?

Comment 8 Lyes Saadi 2021-07-07 00:39:18 UTC
Hello :D!

I have finally understood this issue! Indeed, when the libretranslate backend is chosen and is using the default instance, a key in dconf where is contained the instance URL isn't created, and the search provider thus fails to get the URL of the instance! And it fails at each start of the session!

I am reporting this to the developers and will discuss with them a fix!

Thank you very much for this bug report :D!

Comment 9 Fedora Update System 2021-07-07 14:15:58 UTC
FEDORA-2021-c54b73dfb1 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-c54b73dfb1

Comment 10 Fedora Update System 2021-07-07 14:26:02 UTC
FEDORA-2021-38ecb2c2be has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-38ecb2c2be

Comment 11 Fedora Update System 2021-07-08 01:16:21 UTC
FEDORA-2021-c54b73dfb1 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-c54b73dfb1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-c54b73dfb1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2021-07-08 01:40:35 UTC
FEDORA-2021-38ecb2c2be has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-38ecb2c2be`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-38ecb2c2be

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2021-07-16 00:59:21 UTC
FEDORA-2021-c54b73dfb1 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2021-07-16 01:05:33 UTC
FEDORA-2021-38ecb2c2be has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.