neurodata / ndstore

code for storing neurodata images and image annotations
http://neurodata.io
Apache License 2.0
38 stars 12 forks source link

cannot view datasets as new user #387

Open gkiar opened 7 years ago

gkiar commented 7 years ago

I have a new account on the instance currently living at cloud.neurodata.io/nd/. However, when I try to "View Datasets," (this url) I get an error, copied below. This error is not present when I am logged in as neurodata.

TypeError at /nduser/datasets/
unsupported operand type(s) for |: 'function' and 'QuerySet'
Request Method: GET
Request URL:    http://cloud.neurodata.io/nd/nduser/datasets/
Django Version: 1.10
Exception Type: TypeError
Exception Value:    
unsupported operand type(s) for |: 'function' and 'QuerySet'
Exception Location: ./nduser/views.py in getDatasets, line 247
Python Executable:  /usr/bin/uwsgi-core
Python Version: 2.7.6
Python Path:    
['.',
 '',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/home/neurodata/ndstore/django',
 '/home/neurodata/ndstore',
 '/home/neurodata/ndstore/ingest-client',
 '/home/neurodata/ndstore/django',
 '/home/neurodata/ndstore/ndlib',
 '/home/neurodata/ndstore/spdb',
 '/home/neurodata/ndstore/ndlib',
 '/home/neurodata/ndstore/spdb',
 '/home/neurodata/ndstore/ndlib',
 '/home/neurodata/ndstore/spdb',
 '/home/neurodata/ndstore/ndlib',
 '/home/neurodata/ndstore/spdb',
 '/home/neurodata/ndstore/ndlib',
 '/home/neurodata/ndstore/spdb',
 '/home/neurodata/ndstore/ndlib',
 '/home/neurodata/ndstore/spdb',
 '/home/neurodata/ndstore/ndlib',
 '/home/neurodata/ndstore/spdb',
 '/home/neurodata/ndstore/ndlib',
 '/home/neurodata/ndstore/spdb']
Server time:    Wed, 7 Dec 2016 16:13:19 -0500
kunallillaney commented 7 years ago

@randalburns @Aeusman I think this is happening because you call for all public datasets for a non-root user. The UI excepts that to be a QuerySet and I think this got replaced in the ndprojects change. Do not have an easy long term fix for this, a short-term fix would be to fall back on the old method which fetches the queryset. I will investigate this later.