Skip to content

Error parsing data in function 'term_info_parse_object' in vfb_queries.py  #24

Description

@jrmartin

For VFB_00101567, we are getting back an error, the issue is related to parsing of the data in vfb_queries.py coming from SOLR. The data coming back from SOLR can’t be parsed in function term_info_parse_object
record[image.index] = int(image.index[0])

Full stack trace error :

[2024-02-08 21:30:41,357] ERROR in app: Exception on /get_term_info [GET]
Traceback (most recent call last):
  File "/home/walrus/code/anaconda2/envs/vfb/lib/python3.11/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/walrus/code/anaconda2/envs/vfb/lib/python3.11/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/walrus/code/anaconda2/envs/vfb/lib/python3.11/site-packages/flask_cors/extension.py", line 165, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
                                                ^^^^^^^^^^^^^^^^^^
  File "/home/walrus/code/anaconda2/envs/vfb/lib/python3.11/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/walrus/code/anaconda2/envs/vfb/lib/python3.11/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/walrus/code/anaconda2/envs/vfb/lib/python3.11/site-packages/flask_cors/decorator.py", line 128, in wrapped_function
    resp = make_response(f(*args, **kwargs))
                         ^^^^^^^^^^^^^^^^^^
  File "/home/walrus/code/metacell/vfb/virtual-fly-brain/applications/virtual-fly-brain/backend/virtual_fly_brain/main__local.py", line 44, in term_info
    term_info_data = vfb.get_term_info(id)
                     ^^^^^^^^^^^^^^^^^^^^^
  File "/home/walrus/code/anaconda2/envs/vfb/lib/python3.11/site-packages/vfbquery/vfb_queries.py", line 552, in get_term_info
    parsed_object = term_info_parse_object(results, short_form)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/walrus/code/anaconda2/envs/vfb/lib/python3.11/site-packages/vfbquery/vfb_queries.py", line 430, in term_info_parse_object
    record[image.index] = int(image.index[0])
    ~~~~~~^^^^^^^^^^^^^
TypeError: unhashable type: 'list'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions