OBOFoundry / OBOFoundry.github.io

Metadata and website for the Open Bio Ontologies Foundry Ontology Registry
http://obofoundry.org
Other
165 stars 202 forks source link

AttributeError: module 'dash_utils' has no attribute 'load_schema' #1604

Closed XinsongDu closed 3 years ago

XinsongDu commented 3 years ago

When I was running the code (http://www.obofoundry.org/principles/checks/fp_001) to evaluate an ontology, an error popped out:

AttributeError: module 'dash_utils' has no attribute 'load_schema'

I installed dash_utils with pip install, so , maybe the dash_utils in the code is already outdated? How can I resolve this problem?

Thanks in advance!

matentzn commented 3 years ago

If you want to run the code in isolation, you will have to clone https://github.com/OBOFoundry/OBO-Dashboard

and run the code from in there (see https://github.com/OBOFoundry/OBO-Dashboard/tree/master/util)

None of the code is on pypi, so whatever you installed has nothing to do with the dashboard..

What is your use case exactly? Is there anything else I can help with?

cthoyt commented 3 years ago

Sounds like a hacktoberfest challenge. See https://github.com/OBOFoundry/OBO-Dashboard/issues/54

XinsongDu commented 3 years ago

If you want to run the code in isolation, you will have to clone https://github.com/OBOFoundry/OBO-Dashboard

and run the code from in there (see https://github.com/OBOFoundry/OBO-Dashboard/tree/master/util)

None of the code is on pypi, so whatever you installed has nothing to do with the dashboard..

What is your use case exactly? Is there anything else I can help with?

Thank you! I will try this method. I'm using OBO Foundry to evaluate EDAM ontology, which will be a small part of my dissertation. I will keep you posted if there is any further issue.

XinsongDu commented 3 years ago

@matentzn The code (http://www.obofoundry.org/principles/checks/fp_001) still failed running, it reported the same error. I didn't find a function named load_schema under the folder util. The key to resolve this issue is to find where the dash_utils class is, which should contain a function named load_schema. Any help would be greatly appreciated.

matentzn commented 3 years ago

hey @XinsongDu - it is not possible to support you like this; if you want me to look over your code, you can make a pull request and I will look at your work.

However, I would recommend this:

  1. The Dashboard code was never packaged, and its functions never intended to be run in isolation - you can run it from inside ODK though.
  2. Fork https://github.com/OBOFoundry/obo-nor.github.io - this is the OBO New Term Request Dashboard, and simply add EDAM to the dashboard-config.yaml - I can help you setting that up. This allows you to create your own dashboard with EDAM and any other ontologies you like.

dash_utils is not a class, its a file in your path, and most likely, you have set the python path to the wrong directory.

XinsongDu commented 3 years ago

@matentzn Thanks again for the instruction. Would you be available to meet shortly via Zoom? I will be available all day on this Thursday (09/30, US East Time). I want to learn how to use ttps://github.com/OBOFoundry/obo-nor.github.io to evaluate EDAM ontology. The dashboard looks great and I really like the visualization. My email is xinsongdu@ufl.edu.

matentzn commented 3 years ago

I am all booked up with meetings on Thursday, but sent you an invite for Friday - else next week.

matentzn commented 3 years ago

@XinsongDu and I set up a custom Dashboard for EDAM today, so I will close this.