pipparichter / find-a-bug

A flask-based RESTful API for interfacing with a SQL database of microbial genes and annotations.
0 stars 0 forks source link

IndexError when accessing a genome which definitely exists #2

Closed pipparichter closed 5 months ago

pipparichter commented 5 months ago

I removed all source prefixes from the genome IDs, but I am getting the following error when I try accessing a genome ID which I know is in the database.

Traceback (most recent call last):
  File "/home/prichter/find-a-bug/env/lib64/python3.9/site-packages/flask/app.py", line 867, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/prichter/find-a-bug/env/lib64/python3.9/site-packages/flask/app.py", line 852, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/home/prichter/find-a-bug/app/__init__.py", line 79, in handle
    df = pd.DataFrame.from_records(result, columns=result[0]._fields)
IndexError: list index out of range

This is probably more a server-side issue than an API issue, so I'll submit the issue in this repo.