Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 'GeneralTrait' object has no attribute 'description_display' when working with collection ("shopping cart") #723

Open
rupertoverall opened this issue Aug 23, 2022 · 3 comments

Comments

@rupertoverall
Copy link

I am hitting the following error when trying to add a trait to a non-default collection or to view the non-default collection from the collections list (http://genenetwork.org/collections/list). The non-default collection includes traits from several different series in the BXD family (phenotypes, hippocampal mRNA expression, liver mRNA expression).
Adding the same traits to the default collection seems to work.


GeneNetwork tux01:gene:2.11-rc2-HEAD-3e1f9f2b6 http://genenetwork.org/collections/view?uc_id=904b5144-5537-4d1f-a64c-adf2bffea68a ( 8:30AM UTC Aug 23, 2022)
Traceback (most recent call last):
File "/usr/local/guix-profiles/gn-latest-20220122/lib/python3.9/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/guix-profiles/gn-latest-20220122/lib/python3.9/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/gn2/production/gene/wqflask/wqflask/collect.py", line 286, in view_collection
return render_template(
File "/usr/local/guix-profiles/gn-latest-20220122/lib/python3.9/site-packages/flask/templating.py", line 147, in render_template
return _render(
File "/usr/local/guix-profiles/gn-latest-20220122/lib/python3.9/site-packages/flask/templating.py", line 128, in _render
rv = template.render(context)
File "/usr/local/guix-profiles/gn-latest-20220122/lib/python3.9/site-packages/jinja2/environment.py", line 1304, in render
self.environment.handle_exception()
File "/usr/local/guix-profiles/gn-latest-20220122/lib/python3.9/site-packages/jinja2/environment.py", line 925, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/home/gn2/production/gene/wqflask/wqflask/templates/collections/view.html", line 1, in top-level template code
{% extends "base.html" %}
File "/home/gn2/production/gene/wqflask/wqflask/templates/base.html", line 150, in top-level template code
{% block content %}
File "/home/gn2/production/gene/wqflask/wqflask/templates/collections/view.html", line 121, in block 'content'
data-trait-info="{{trait_info_str(this_trait)}}">
File "/home/gn2/production/gene/wqflask/wqflask/collect.py", line 230, in trait_info_str
trait.name, trait.dataset.name, __trait_desc(trait), __symbol(trait),
File "/home/gn2/production/gene/wqflask/wqflask/collect.py", line 196, in __trait_desc
return trt.description_display or "N/A"
AttributeError: 'GeneralTrait' object has no attribute 'description_display'

@zsloan
Copy link
Contributor

zsloan commented Aug 23, 2022 via email

@BonfaceKilz
Copy link
Collaborator

BonfaceKilz commented Aug 23, 2022 via email

@rupertoverall
Copy link
Author

rupertoverall commented Aug 23, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants