Skip to content
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

base.py - sort_by_attr : '<' not supported between instances of 'float' and 'NoneType' #57

Open
briang1 opened this issue Jul 8, 2019 · 1 comment

Comments

@briang1
Copy link

briang1 commented Jul 8, 2019

  • Python 3
  • Django 1.11.20
  • django-filebrowser-no-grappelli==3.7.8
  • botocore==1.12.183
  • boto3==1.9.183
  • django-storages==1.7.1

I am using django-storages/boto3 with a DigitalOcean space. While attempting to access /admin/filebrowser/browse/ I get the following error at base.py sort_by_attr function:
'<' not supported between instances of 'float' and 'NoneType'

Not sure if this is unique to Digital Ocean spaces but a folder is included in the seq list of objects being sorted at return sorted(seq, key=attrgetter(*attr))

This folder object returns None for the various attributes (date, filesize, etc) causing the error.

Removing the folder object from the seq list seems to have fixed the issue without further consequence.

@smacker
Copy link
Owner

smacker commented Dec 4, 2019

Hi @briang1 !

There is definitely some problem with boto3 as reported in #47
I don't use this feature, so I can't help here. But PRs are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants