New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One test failure on OpenSUSE #233
Comments
Interesting. Which version of Python? Any way you could print the contents of |
It occurs on Python 2.7 and Python 3.8 All of the dependencies can be seen at https://build.opensuse.org/package/live_build_log/home:jayvdb:branches:devel:languages:python:misc/python-django-rosetta/openSUSE_Tumbleweed/x86_64 And the .spec https://build.opensuse.org/package/show/home:jayvdb:branches:devel:languages:python:misc/python-django-rosetta I'll try to print out |
|
Hmm, could you please also print Clearly the failing assertion
...should be True if Which version of |
Scratch that, |
I just pushed and published 0.9.4 which officially supports and tests against Python 3.8, and which might or might not address this issue. |
Perfect. Thanks. |
Hoo hum. It worked on my local build, but failed on the online build workers. I havent encountered that before! |
Okay, can't reproduce this either locally or in CI, will need more info. |
It was accepted to the openSUSE "python" collection with my little hack to disable the test: I've branched that, commented out my I'll keep digging around it. |
I re-tested, and this is still failing on v0.9.6. |
Retested, and still failing on v0.9.8 . I get a better backtrace now [ 146s] ERROR: test_47_azure_ajax_translation (rosetta.tests.tests.RosettaTestCase)
[ 146s] ----------------------------------------------------------------------
[ 146s] Traceback (most recent call last):
[ 146s] File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 175, in _new_conn
[ 146s] (self._dns_host, self.port), self.timeout, **extra_kw
[ 146s] File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection
[ 146s] for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
[ 146s] File "/usr/lib64/python3.6/socket.py", line 745, in getaddrinfo
[ 146s] for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
[ 146s] socket.gaierror: [Errno -3] Temporary failure in name resolution
[ 146s]
[ 146s] During handling of the above exception, another exception occurred:
[ 146s]
[ 146s] Traceback (most recent call last):
[ 146s] File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen
[ 146s] chunked=chunked,
[ 146s] File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 382, in _make_request
[ 146s] self._validate_conn(conn)
[ 146s] File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
[ 146s] conn.connect()
[ 146s] File "/usr/lib/python3.6/site-packages/vcr/stubs/__init__.py", line 286, in connect
[ 146s] return self.real_connection.connect(*args, **kwargs)
[ 146s] File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 358, in connect
[ 146s] conn = self._new_conn()
[ 146s] File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 187, in _new_conn
[ 146s] self, "Failed to establish a new connection: %s" % e
[ 146s] urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f12c19ccc50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
[ 146s]
[ 146s] During handling of the above exception, another exception occurred:
[ 146s]
[ 146s] Traceback (most recent call last):
[ 146s] File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
[ 146s] timeout=timeout
[ 146s] File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 756, in urlopen
[ 146s] method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
[ 146s] File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 574, in increment
[ 146s] raise MaxRetryError(_pool, url, error or ResponseError(cause))
[ 146s] urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.cognitive.microsofttranslator.com', port=443): Max retries exceeded with url: /translate?api-version=3.0&from=en&to=fr (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f12c19ccc50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
[ 146s]
[ 146s] During handling of the above exception, another exception occurred:
[ 146s]
[ 146s] Traceback (most recent call last):
[ 146s] File "/usr/lib/python3.6/site-packages/vcr/cassette.py", line 100, in __call__
[ 146s] return type(self)(self.cls, args_getter)._execute_function(function, args, kwargs)
[ 146s] File "/usr/lib/python3.6/site-packages/vcr/cassette.py", line 114, in _execute_function
[ 146s] return self._handle_function(fn=handle_function)
[ 146s] File "/usr/lib/python3.6/site-packages/vcr/cassette.py", line 138, in _handle_function
[ 146s] return fn(cassette)
[ 146s] File "/usr/lib/python3.6/site-packages/vcr/cassette.py", line 107, in handle_function
[ 146s] return function(*args, **kwargs)
[ 146s] File "/usr/lib/python3.6/site-packages/django/test/utils.py", line 387, in inner
[ 146s] return func(*args, **kwargs)
[ 146s] File "/home/abuild/rpmbuild/BUILD/django-rosetta-0.9.8/rosetta/tests/tests.py", line 983, in test_47_azure_ajax_translation
[ 146s] reverse('rosetta.translate_text') + '?from=en&to=fr&text=hello%20world'
[ 146s] File "/usr/lib/python3.6/site-packages/django/test/client.py", line 742, in get
[ 146s] response = super().get(path, data=data, secure=secure, **extra)
[ 146s] File "/usr/lib/python3.6/site-packages/django/test/client.py", line 398, in get
[ 146s] **extra,
[ 146s] File "/usr/lib/python3.6/site-packages/django/test/client.py", line 473, in generic
[ 146s] return self.request(**r)
[ 146s] File "/usr/lib/python3.6/site-packages/django/test/client.py", line 719, in request
[ 146s] self.check_exception(response)
[ 146s] File "/usr/lib/python3.6/site-packages/django/test/client.py", line 580, in check_exception
[ 146s] raise exc_value
[ 146s] File "/usr/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
[ 146s] response = get_response(request)
[ 146s] File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 181, in _get_response
[ 146s] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[ 146s] File "/usr/lib/python3.6/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
[ 146s] return view_func(request, *args, **kwargs)
[ 146s] File "/home/abuild/rpmbuild/BUILD/django-rosetta-0.9.8/rosetta/views.py", line 698, in translate_text
[ 146s] translated_text = translate(text, language_from, language_to)
[ 146s] File "/home/abuild/rpmbuild/BUILD/django-rosetta-0.9.8/rosetta/translate_utils.py", line 21, in translate
[ 146s] return translate_by_azure(text, from_language, to_language, AZURE_CLIENT_SECRET)
[ 146s] File "/home/abuild/rpmbuild/BUILD/django-rosetta-0.9.8/rosetta/translate_utils.py", line 64, in translate_by_azure
[ 146s] data=json.dumps(request_data),
[ 146s] File "/usr/lib/python3.6/site-packages/requests/api.py", line 117, in post
[ 146s] return request('post', url, data=data, json=json, **kwargs)
[ 146s] File "/usr/lib/python3.6/site-packages/requests/api.py", line 61, in request
[ 146s] return session.request(method=method, url=url, **kwargs)
[ 146s] File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 542, in request
[ 146s] resp = self.send(prep, **send_kwargs)
[ 146s] File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 655, in send
[ 146s] r = adapter.send(request, **kwargs)
[ 146s] File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
[ 146s] raise ConnectionError(e, request=request)
[ 146s] requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.cognitive.microsofttranslator.com', port=443): Max retries exceeded with url: /translate?api-version=3.0&from=en&to=fr (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f12c19ccc50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)) |
Okay, interesting: a DNS lookup on I can reproduce the error if I turn off networking on my machine. Does the test environment have internet access? |
These VMs have no network at all. |
Can you please test a run on the latest HEAD? It seems to be fixed by ff6d3ff |
Not easy to get git versions onto boxes that dont have internet ;-) In any case, it is a very low priority. I'll ping here if it isnt fixed in the next release. |
Thanks. I'm pretty confident it should pass now. |
Ya, likewise. Much appreciated. We got there in the end. |
The text was updated successfully, but these errors were encountered: