django-rest-framework-gis icon indicating copy to clipboard operation
django-rest-framework-gis copied to clipboard

[fix] Attribute error when trying to get bounding box from a method field value

Open hemache opened this issue 5 years ago • 14 comments

fixes https://github.com/openwisp/django-rest-framework-gis/issues/247

hemache avatar Nov 05 '20 16:11 hemache

Hey @hemache, Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: f72e69c0-1f9e-11eb-bd2e-17a8c440c3de

TravisBuddy avatar Nov 05 '20 19:11 TravisBuddy

Hey @hemache, Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: 84aa81b0-1fc4-11eb-9dab-419bf2960c30

TravisBuddy avatar Nov 06 '20 00:11 TravisBuddy

Hey @hemache, Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: c2b92120-1fe0-11eb-9dab-419bf2960c30

TravisBuddy avatar Nov 06 '20 03:11 TravisBuddy

@nemesisdesign any idea why the CI fails because it tries to access PostgreSQL?

hemache avatar Nov 06 '20 10:11 hemache

@nemesisdesign any idea why the CI fails because it tries to access PostgreSQL?

@hemache Could you please try to change to dist: bionic in .travis.yml? It might help!

atb00ker avatar Nov 08 '20 10:11 atb00ker

Hey @hemache, Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: e2c65be0-21c0-11eb-a04c-b76cbd6ddda3

TravisBuddy avatar Nov 08 '20 12:11 TravisBuddy

Well, that didn't exactly help.

On inspection, I see:

Ver Cluster Port Status Owner    Data directory              Log file

12  main    5433 down   postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log

Perhaps cat /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log would help. It should be a postgresql version problem, changing and experimenting with some other versions could help.

atb00ker avatar Nov 08 '20 13:11 atb00ker

fixed PostgreSQL issue.

but now I'm getting this error (e.g. https://travis-ci.com/github/openwisp/django-rest-framework-gis/jobs/433971220)

free(): invalid pointer
ERROR: InvocationError for command /home/travis/build/openwisp/django-rest-framework-gis/.tox/travis/bin/coverage run --source=rest_framework_gis ./tests/manage.py test tests/django_restframework_gis_tests (exited with code -6 (SIGABRT)) (exited with code -6)
___________________________________ summary ____________________________________
ERROR:   travis: commands failed
The command "tox -e travis" exited with 1.

though, I can't reproduce this in my local dev env

coverage run --source=rest_framework_gis ./tests/manage.py test tests/django_restframework_gis_tests
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
............................s.........
GeoJSON rendering of 10000 objects completed in 6.299168238998391
.....s......./home/hemache/.local/share/virtualenvs/django-rest-framework-gis-EHv3zJno/lib/python3.8/site-packages/djangorestframework-3.12.1-py3.8.egg/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)
............................
----------------------------------------------------------------------
Ran 79 tests in 63.766s

OK (skipped=2)
Destroying test database for alias 'default'...

any ideas?

hemache avatar Nov 11 '20 20:11 hemache

@hemache did you already try using bionic as distro? Sometimes changing distro fixes these inexplicable issues.

nemesifier avatar Nov 11 '20 21:11 nemesifier

@nemesisdesign yep, I tried that before

The following packages have unmet dependencies:
 gdal-bin : Depends: python3-gdal (= 3.0.4+dfsg-1~bionic0) but it is not going to be installed
            Depends: libgdal26 (>= 3.0.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The command "sudo apt-get install binutils libproj-dev gdal-bin -y" failed and exited with 100 during .

https://travis-ci.com/github/openwisp/django-rest-framework-gis/jobs/434284716

can we please merge this anyway and fix CI issues later? (tests are passing btw)

hemache avatar Nov 12 '20 09:11 hemache

@nemesisdesign any update on this, please? we're still using the patched version from my forked Github repo, I hope we can switch back to the official version in PyPi

hemache avatar Dec 01 '20 15:12 hemache

do you think this is ready to be merged?

hemache avatar Dec 08 '20 11:12 hemache

this need rebase

auvipy avatar Dec 09 '20 05:12 auvipy

Not ready to merge: https://github.com/openwisp/django-rest-framework-gis/pull/246#discussion_r563163532

nemesifier avatar Jan 23 '21 15:01 nemesifier