Bug 2070399 - [abrt] dialect: Translator(): client.py:62:Translator:AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport'
Summary: [abrt] dialect: Translator(): client.py:62:Translator:AttributeError: module ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-googletrans
Version: 36
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Lyes Saadi
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:babbe0c96e32baeac0335e6c86a...
: 2073626 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-31 04:44 UTC by liuzhao
Modified: 2022-05-07 04:20 UTC (History)
1 user (show)

Fixed In Version: python-googletrans-4.0.0~rc1-7.fc36
Clone Of:
Environment:
Last Closed: 2022-05-07 04:20:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (2.97 KB, text/plain)
2022-03-31 04:44 UTC, liuzhao
no flags Details
File: cpuinfo (2.70 KB, text/plain)
2022-03-31 04:44 UTC, liuzhao
no flags Details
File: environ (1.38 KB, text/plain)
2022-03-31 04:44 UTC, liuzhao
no flags Details
File: mountinfo (3.06 KB, text/plain)
2022-03-31 04:44 UTC, liuzhao
no flags Details
File: namespaces (172 bytes, text/plain)
2022-03-31 04:44 UTC, liuzhao
no flags Details
File: open_fds (1.35 KB, text/plain)
2022-03-31 04:45 UTC, liuzhao
no flags Details

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.


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