question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoneType on filter get - deleting filter twice

See original GitHub issue

Cater for the case of deleting last filter for an institute / same filter twice?

2020-09-01 14:01:23,660 - scout.server.app - ERROR: Exception on /cust002/F0035385/variants [POST] [in /home/hiseq.clinical/miniconda/envs/prod/lib/python3.6/site-packages/flask/app.py:1892]
Traceback (most recent call last):
 File "/home/hiseq.clinical/miniconda/envs/prod/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
   response = self.full_dispatch_request()
 File "/home/hiseq.clinical/miniconda/envs/prod/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
   rv = self.handle_user_exception(e)
 File "/home/hiseq.clinical/miniconda/envs/prod/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
   reraise(exc_type, exc_value, tb)
 File "/home/hiseq.clinical/miniconda/envs/prod/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
   raise value
 File "/home/hiseq.clinical/miniconda/envs/prod/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
   rv = self.dispatch_request()
 File "/home/hiseq.clinical/miniconda/envs/prod/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
   return self.view_functions[rule.endpoint](**req.view_args)
 File "/home/hiseq.clinical/SERVER/apps/scout/git/scout/scout/server/utils.py", line 23, in decorated_function
   context = func(*args, **kwargs)
 File "/home/hiseq.clinical/SERVER/apps/scout/git/scout/scout/server/blueprints/variants/views.py", line 57, in variants
   store, institute_obj, case_obj, user_obj, category, request.form
 File "/home/hiseq.clinical/SERVER/apps/scout/git/scout/scout/server/blueprints/variants/controllers.py", line 621, in populate_filters_form
   filter_obj = store.delete_filter(filter_id, institute_id, current_user.email)
 File "/home/hiseq.clinical/SERVER/apps/scout/git/scout/scout/adapter/mongo/filter.py", line 122, in delete_filter
   user_id, filter_obj.get("display_name"), institute_id
AttributeError: 'NoneType' object has no attribute 'get'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
northwestwitchcommented, Sep 2, 2020

Naa it’s fine, almost done, but perhaps you might review!

1reaction
northwestwitchcommented, Sep 2, 2020

There is also the situation when in one of the 2 windows you delete a filter and in the other window you load it…

Read more comments on GitHub >

github_iconTop Results From Across the Web

remove None value from a list without removing the 0 value
To get all the items that evaluate to False print filter(lambda item: not item, iterator) # Will print [None, '', 0, None, False, ......
Read more >
Delete filters - Product Documentation | ServiceNow
Filters that are not assigned to a user or group are global. Select the filter to delete. Click Delete and confirm the deletion....
Read more >
Prisma Access Known Issues - Palo Alto Networks
Workaround: This is normal Slack file upload behavior. Be aware that a single file that is uploaded using Slack might appear twice in...
Read more >
Streaming: 'NoneType' object has no attribute 'filter' (similar to ...
Hence the error telling you that None doesn't have a filter or disconnect attribute. Stream.sample doesn't return anything (i.e. returns None ), ...
Read more >
PySpark Drop Rows with NULL or None Values
In this PySpark article, you have learned how to delete/remove/drop rows with NULL values in any, all, sing, multiple columns in Dataframe ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found