-
Notifications
You must be signed in to change notification settings - Fork 47
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
cherrypy database: where did these new fields come from? #614
Comments
Checking on it now. -- Noah |
Hi Howard, The issue is that you are using an older Database Schema. Try and test this patch and see if it makes your code more backwards compatible, you'll have to restart the cherrypy server after applying the change: diff --git a/server/php/cherrypy/src/webapp/db_pgv3.py b/server/php/cherrypy/src/webapp/db_pgv3.py
index 95cfb9c..16cd433 100644
--- a/server/php/cherrypy/src/webapp/db_pgv3.py
+++ b/server/php/cherrypy/src/webapp/db_pgv3.py
@@ -559,6 +559,9 @@ class DatabaseV3():
def _select_insert(self, table, table_id, stmt_fields, stmt_values):
found_id = -1
+ cursor.execute("SELECT * FROM %s LIMIT 0" % table)
+ all_fields_for_table = [d[0] for d in curs.description]
+
#
# Build the SELECT and INSERT statements
#
@@ -567,6 +570,9 @@ class DatabaseV3():
count = 0
for field in stmt_fields:
+ if field not in all_fields_for_table:
+ self._logger.debug("WARNING: _select_insert field %s not in table %s" % (field, table))
+ continue
insert_stmt = insert_stmt + ", " + field
if count == 0: Thanks --Ricky |
@jjhursey could you patch the server? |
@hppritcha I applied the patch to the CherryPy server. Please give it another try. |
A couple modifications so far:
Now we get the following error message:
The patch emitted these warnings - which were expected
|
okay I think I see what's wrong here. That patch isn't sufficient. We also need to prune the |
Turns out clients can be generating more fields/values than the database/cherrypy server know about owing to separate MTT based projects contributing code. Fixes open-mpi#614 Signed-off-by: Howard Pritchard <howardp@lanl.gov>
Turns out clients can be generating more fields/values than the database/cherrypy server know about owing to separate MTT based projects contributing code. Fixes open-mpi#614 Signed-off-by: Howard Pritchard <howardp@lanl.gov>
Turns out clients can be generating more fields/values than the database/cherrypy server know about owing to separate MTT based projects contributing code. Fixes open-mpi#614 Signed-off-by: Howard Pritchard <howardp@lanl.gov>
We got the cherrypy server running again at AWS and now when I try to submit results I see this HTTP error in the response back from the server
anyone know what this clck_id thing is?
The text was updated successfully, but these errors were encountered: