Bug 2070399

Summary: [abrt] dialect: Translator(): client.py:62:Translator:AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport'
Product: [Fedora] Fedora Reporter: liuzhao <aroma0225>
Component: python-googletransAssignee: Lyes Saadi <dev.fedora-rhbz>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 36CC: dev.fedora-rhbz
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/4a65d597331eb075394cef3ac0ee88fd248b354f
Whiteboard: abrt_hash:babbe0c96e32baeac0335e6c86a2699460022667;VARIANT_ID=workstation;
Fixed In Version: python-googletrans-4.0.0~rc1-7.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-07 04:20:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cpuinfo
none
File: environ
none
File: mountinfo
none
File: namespaces
none
File: open_fds none

Description liuzhao 2022-03-31 04:44:45 UTC
Description of problem:
when i start it, it fault

Version-Release number of selected component:
dialect-1.4.1-2.fc36

Additional info:
reporter:       libreport-2.17.1
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-glib-com.github.gi_lom.dialect-27306.scope
cmdline:        /usr/bin/python3 /usr/bin/dialect
crash_function: Translator
exception_type: AttributeError
executable:     /usr/bin/dialect
interpreter:    python3-3.10.4-1.fc36.x86_64
kernel:         5.17.1-300.fc36.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
client.py:62:Translator:AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport'

Traceback (most recent call last):
  File "/usr/bin/dialect", line 37, in <module>
    from dialect import main
  File "/usr/share/dialect/dialect/main.py", line 19, in <module>
    from dialect.preferences import DialectPreferencesWindow
  File "/usr/share/dialect/dialect/preferences.py", line 13, in <module>
    from dialect.settings import Settings
  File "/usr/share/dialect/dialect/settings.py", line 10, in <module>
    from dialect.translators import (
  File "/usr/share/dialect/dialect/translators/__init__.py", line 8, in <module>
    modclass = importlib.import_module('dialect.translators.' + modname).Translator
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/share/dialect/dialect/translators/gtrans.py", line 5, in <module>
    from googletrans import Translator as GoogleTranslator
  File "/usr/lib/python3.10/site-packages/googletrans/__init__.py", line 6, in <module>
    from googletrans.client import Translator
  File "/usr/lib/python3.10/site-packages/googletrans/client.py", line 30, in <module>
    class Translator:
  File "/usr/lib/python3.10/site-packages/googletrans/client.py", line 62, in Translator
    proxies: typing.Dict[str, httpcore.SyncHTTPTransport] = None,
AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport'

Local variables in innermost frame:
__module__: 'googletrans.client'
__qualname__: 'Translator'
__doc__: "Google Translate ajax API implementation class\n\n    You have to create an instance of Translator to use this API\n\n    :param service_urls: google translate url list. URLs will be used randomly.\n                         For example ``['translate.google.com', 'translate.google.co.kr']``\n                         To preferably use the non webapp api, service url should be translate.googleapis.com\n    :type service_urls: a sequence of strings\n\n    :param user_agent: the User-Agent header to send when making requests.\n    :type user_agent: :class:`str`\n\n    :param proxies: proxies configuration.\n                    Dictionary mapping protocol or protocol and host to the URL of the proxy\n                    For example ``{'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'}``\n    :type proxies: dictionary\n\n    :param timeout: Definition of timeout for httpx library.\n                    Will be used for every request.\n    :type timeout: number or a double of numbers\n    :param proxies: proxies configuration.\n                    Dictionary mapping protocol or protocol and host to the URL of the proxy\n                    For example ``{'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'}``\n    :param raise_exception: if `True` then raise exception if smth will go wrong\n    :param http2: whether to use HTTP2 (default: True)\n    :param use_fallback: use a fallback method\n    :type raise_exception: boolean\n    "

Comment 1 liuzhao 2022-03-31 04:44:49 UTC
Created attachment 1869628 [details]
File: backtrace

Comment 2 liuzhao 2022-03-31 04:44:51 UTC
Created attachment 1869629 [details]
File: cpuinfo

Comment 3 liuzhao 2022-03-31 04:44:53 UTC
Created attachment 1869630 [details]
File: environ

Comment 4 liuzhao 2022-03-31 04:44:56 UTC
Created attachment 1869631 [details]
File: mountinfo

Comment 5 liuzhao 2022-03-31 04:44:57 UTC
Created attachment 1869632 [details]
File: namespaces

Comment 6 liuzhao 2022-03-31 04:45:00 UTC
Created attachment 1869633 [details]
File: open_fds

Comment 7 Lyes Saadi 2022-04-02 02:49:13 UTC
This originates in py-googletrans, httpcore 0.14 has breaking changes which, well, break the library.

Dialect devs seem aware of it: https://github.com/dialect-app/dialect/pull/243

I will try to see if I can fix that myself directly in py-googletrans.

Comment 8 Lyes Saadi 2022-04-03 16:50:33 UTC
Fixed upstream (+ GTK4/libadwaita 🎉)!

I'll push a pre-release version if a new release is still far away.

Comment 9 Lyes Saadi 2022-04-09 09:54:30 UTC
*** Bug 2073626 has been marked as a duplicate of this bug. ***

Comment 10 Fedora Update System 2022-04-09 11:49:16 UTC
FEDORA-2022-e0d5efd592 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e0d5efd592

Comment 11 Fedora Update System 2022-04-10 16:33:13 UTC
FEDORA-2022-e0d5efd592 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-e0d5efd592`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-e0d5efd592

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

Comment 12 Fedora Update System 2022-05-07 04:20:56 UTC
FEDORA-2022-e0d5efd592 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.