Ahh okay -- that means that the ```row = results.fetchone()``` returned
```None```.  In this case, instead of doing a try/except, do an explicit
test for ```if row is not None:```, and then have an ```else``` that
describes what to do when ```row is None```


On Fri, Mar 7, 2014 at 8:42 AM, teravest <notifications@github.com> wrote:

> In python_code/data_access/qiime_data_access.py:
>
> > +        """
> > +        con = self.getMetadataDatabaseConnection(
> )
> > +        results = con.cursor()
> > +        con.cursor().callproc('get_barcode_details',[barcode, results])
> > +        row = results.fetchone()
> > +        try:
> > +            barcode_details = {
> > +                'create_date' : row[0],
> > +                'status' : row[1],
> > +                'scan_date' : row[2],
> > +                'sample_postmark_date' : row[3],
> > +                'biomass_remaining' : row[4],
> > +                'sequencing_status' : row[5],
> > +                'obsolete' : row[6]
> > +                }
> > +        except TypeError :
>
> So I just commented out this try except and ran it with a barcode that
> doesn't exist
> Here is the error that is thrown.
> File "/git/qiime_web_app/python_code/data_access/qiime_data_access.py",
> line 3046, in getBarcodeDetails
> 'create_date' : row[0],
>
> TypeError: 'NoneType' object is not subscriptable
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/qiime/qiime_web_app/pull/632/files#r10386878>
> .
>