[Python-modules-team] Bug#971130: djangorestframework-gis: FTBFS: dh_auto_test: error: pybuild --test -i python{version} -p 3.8 --system=custom "--test-args=cd {build_dir}; {interpreter} tests/manage.py test tests/django_restframework_gis_tests" returned exit code 13

Lucas Nussbaum lucas at debian.org
Sun Sep 27 19:44:41 BST 2020


Source: djangorestframework-gis
Version: 0.14-4
Severity: serious
Justification: FTBFS on amd64
Tags: bullseye sid ftbfs
Usertags: ftbfs-20200926 ftbfs-bullseye

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

Relevant part (hopefully):
> make[1]: Entering directory '/<<PKGBUILDDIR>>'
> dh_auto_test -- --system=custom --test-args="cd {build_dir}; {interpreter} tests/manage.py test tests/django_restframework_gis_tests"
> I: pybuild base:217: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_djangorestframework-gis/build; python3.8 tests/manage.py test tests/django_restframework_gis_tests
> Creating test database for alias 'default'...
> ......................s.s.s..........s......./usr/lib/python3/dist-packages/rest_framework/pagination.py:200: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'django_restframework_gis_tests.models.Location'> QuerySet.
>   paginator = self.django_paginator_class(queryset, page_size)
> ..................E.......
> ======================================================================
> ERROR: test_post_location_list_EWKT (django_restframework_gis_tests.tests.TestRestFrameworkGis)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 82, in _execute
>     return self.cursor.execute(sql)
>   File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 381, in execute
>     return Database.Cursor.execute(self, query)
> sqlite3.OperationalError: no such function: lwgeom_version
> 
> The above exception was the direct cause of the following exception:
> 
> Traceback (most recent call last):
>   File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_djangorestframework-gis/build/tests/django_restframework_gis_tests/tests.py", line 149, in test_post_location_list_EWKT
>     response = self.client.post(self.location_list_url, data)
>   File "/usr/lib/python3/dist-packages/django/test/client.py", line 543, in post
>     response = super().post(path, data=data, content_type=content_type, secure=secure, **extra)
>   File "/usr/lib/python3/dist-packages/django/test/client.py", line 356, in post
>     return self.generic('POST', path, post_data, content_type,
>   File "/usr/lib/python3/dist-packages/django/test/client.py", line 422, in generic
>     return self.request(**r)
>   File "/usr/lib/python3/dist-packages/django/test/client.py", line 503, in request
>     raise exc_value
>   File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 34, in inner
>     response = get_response(request)
>   File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 115, in _get_response
>     response = self.process_exception_by_middleware(e, request)
>   File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 113, in _get_response
>     response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File "/usr/lib/python3/dist-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
>     return view_func(*args, **kwargs)
>   File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 71, in view
>     return self.dispatch(request, *args, **kwargs)
>   File "/usr/lib/python3/dist-packages/rest_framework/views.py", line 505, in dispatch
>     response = self.handle_exception(exc)
>   File "/usr/lib/python3/dist-packages/rest_framework/views.py", line 465, in handle_exception
>     self.raise_uncaught_exception(exc)
>   File "/usr/lib/python3/dist-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
>     raise exc
>   File "/usr/lib/python3/dist-packages/rest_framework/views.py", line 502, in dispatch
>     response = handler(request, *args, **kwargs)
>   File "/usr/lib/python3/dist-packages/rest_framework/generics.py", line 242, in post
>     return self.create(request, *args, **kwargs)
>   File "/usr/lib/python3/dist-packages/rest_framework/mixins.py", line 19, in create
>     self.perform_create(serializer)
>   File "/usr/lib/python3/dist-packages/rest_framework/mixins.py", line 24, in perform_create
>     serializer.save()
>   File "/usr/lib/python3/dist-packages/rest_framework/serializers.py", line 212, in save
>     self.instance = self.create(validated_data)
>   File "/usr/lib/python3/dist-packages/rest_framework/serializers.py", line 948, in create
>     instance = ModelClass._default_manager.create(**validated_data)
>   File "/usr/lib/python3/dist-packages/django/db/models/manager.py", line 82, in manager_method
>     return getattr(self.get_queryset(), name)(*args, **kwargs)
>   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 422, in create
>     obj.save(force_insert=True, using=self.db)
>   File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_djangorestframework-gis/build/tests/django_restframework_gis_tests/models.py", line 37, in save
>     super(BaseModel, self).save(*args, **kwargs)
>   File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 743, in save
>     self.save_base(using=using, force_insert=force_insert,
>   File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 780, in save_base
>     updated = self._save_table(
>   File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 873, in _save_table
>     result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
>   File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 910, in _do_insert
>     return manager._insert([self], fields=fields, return_id=update_pk,
>   File "/usr/lib/python3/dist-packages/django/db/models/manager.py", line 82, in manager_method
>     return getattr(self.get_queryset(), name)(*args, **kwargs)
>   File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 1186, in _insert
>     return query.get_compiler(using=using).execute_sql(return_id)
>   File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1376, in execute_sql
>     for sql, params in self.as_sql():
>   File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1333, in as_sql
>     placeholder_rows, param_rows = self.assemble_as_sql(fields, value_rows)
>   File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1300, in assemble_as_sql
>     placeholder_rows, param_rows = zip(*sql_and_param_pair_rows)
>   File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1296, in <genexpr>
>     sql_and_param_pair_rows = (zip(*row) for row in rows_of_fields_as_sql)
>   File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1290, in <genexpr>
>     (self.field_as_sql(field, v) for field, v in zip(fields, row))
>   File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1226, in field_as_sql
>     sql, params = field.get_placeholder(val, self, self.connection), [val]
>   File "/usr/lib/python3/dist-packages/django/contrib/gis/db/models/fields.py", line 128, in get_placeholder
>     return connection.ops.get_geom_placeholder(self, value, compiler)
>   File "/usr/lib/python3/dist-packages/django/contrib/gis/db/backends/base/operations.py", line 98, in get_geom_placeholder
>     self.spatial_function_name('Transform'),
>   File "/usr/lib/python3/dist-packages/django/contrib/gis/db/backends/base/operations.py", line 118, in spatial_function_name
>     if func_name in self.unsupported_functions:
>   File "/usr/lib/python3/dist-packages/django/utils/functional.py", line 80, in __get__
>     res = instance.__dict__[self.name] = self.func(instance)
>   File "/usr/lib/python3/dist-packages/django/contrib/gis/db/backends/spatialite/operations.py", line 85, in unsupported_functions
>     if not self.lwgeom_version():
>   File "/usr/lib/python3/dist-packages/django/contrib/gis/db/backends/spatialite/operations.py", line 169, in lwgeom_version
>     return self._get_spatialite_func('lwgeom_version()')
>   File "/usr/lib/python3/dist-packages/django/contrib/gis/db/backends/spatialite/operations.py", line 153, in _get_spatialite_func
>     cursor.execute('SELECT %s' % func)
>   File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 67, in execute
>     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
>   File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
>     return executor(sql, params, many, context)
>   File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
>     return self.cursor.execute(sql, params)
>   File "/usr/lib/python3/dist-packages/django/db/utils.py", line 89, in __exit__
>     raise dj_exc_value.with_traceback(traceback) from exc_value
>   File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 82, in _execute
>     return self.cursor.execute(sql)
>   File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 381, in execute
>     return Database.Cursor.execute(self, query)
> django.db.utils.OperationalError: no such function: lwgeom_version
> 
> ----------------------------------------------------------------------
> Ran 71 tests in 0.332s
> 
> FAILED (errors=1, skipped=4)
> Destroying test database for alias 'default'...
> System check identified no issues (0 silenced).
> E: pybuild pybuild:352: test: plugin custom failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8_djangorestframework-gis/build; python3.8 tests/manage.py test tests/django_restframework_gis_tests
> dh_auto_test: error: pybuild --test -i python{version} -p 3.8 --system=custom "--test-args=cd {build_dir}; {interpreter} tests/manage.py test tests/django_restframework_gis_tests" returned exit code 13

The full build log is available from:
   http://qa-logs.debian.net/2020/09/26/djangorestframework-gis_0.14-4_unstable.log

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.



More information about the Python-modules-team mailing list