diff options
author | Pjotr Prins | 2021-12-01 15:55:50 +0000 |
---|---|---|
committer | Pjotr Prins | 2021-12-01 15:55:50 +0000 |
commit | 4bd10c0c4c2eddeb0e75de4da8fcbec222347fdc (patch) | |
tree | 4ccb55655cf508eb89e1146fef66617196f478fb | |
parent | d9843928fe5140c953078b5238c2ddb8fb12a96c (diff) | |
download | genenetwork2-4bd10c0c4c2eddeb0e75de4da8fcbec222347fdc.tar.gz |
Figure out that we are using the wrong db_webqtl_s!
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | wqflask/wqflask/api/gen_menu.py | 12 |
2 files changed, 20 insertions, 4 deletions
@@ -109,6 +109,18 @@ alias runcmd="time env GN2_PROFILE=~/opt/gn-latest TMPDIR=//tmp SERVER_PORT=5004 Replace some of the env variables as per your use case. +### Troubleshooting + +If the menu does not pop up check your `GN2_BASE_URL`. E.g. + +``` +curl http://gn2-pjotr.genenetwork.org/api/v_pre1/gen_dropdown +``` + +check the logs. If there is ERROR 1054 (42S22): Unknown column +'InbredSet.Family' in 'field list' it may be you are trying the small +database. + ## Documentation User documentation can be found diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py index a699a484..5d239343 100644 --- a/wqflask/wqflask/api/gen_menu.py +++ b/wqflask/wqflask/api/gen_menu.py @@ -1,4 +1,8 @@ from gn3.db.species import get_all_species + +import utility.logger +logger = utility.logger.getLogger(__name__) + def gen_dropdown_json(conn): """Generates and outputs (as json file) the data for the main dropdown menus on the home page @@ -19,16 +23,16 @@ def get_groups(species, conn): with conn.cursor() as cursor: for species_name, _species_full_name in species: groups[species_name] = [] - cursor.execute( - ("SELECT InbredSet.Name, InbredSet.FullName, " + query = ("SELECT InbredSet.Name, InbredSet.FullName, " "IFNULL(InbredSet.Family, 'None') " "FROM InbredSet, Species WHERE Species.Name = '{}' " "AND InbredSet.SpeciesId = Species.Id GROUP by " "InbredSet.Name ORDER BY IFNULL(InbredSet.FamilyOrder, " "InbredSet.FullName) ASC, IFNULL(InbredSet.Family, " "InbredSet.FullName) ASC, InbredSet.FullName ASC, " - "InbredSet.MenuOrderId ASC") - .format(species_name)) + "InbredSet.MenuOrderId ASC").format(species_name) + # logger.debug(query) + cursor.execute(query) results = cursor.fetchall() for result in results: family_name = "Family:" + str(result[2]) |