You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Export entire assessment via Export...>Entire Assessment
Save Zip File
Navigate back to Assessments
Click Import Assessment
Locate and select recently exported assessment
Expected result: Assessment imported successfully
Actual result:
500 error on /asssement/import/entire API call
Inner exception on blueprints/asessment_import.py line 137 in importentire at newTestcase.save()
Inner Inner exception raise ValidationError(message, errors=errors) mongoengine.errors.ValidationError: Validation Error (TestCase:None) (Field is required: ['name'])
Initial observations:
It appears that the code is attempting to save the testCase object to mongo at line 137 before some required fields are set this causes a validation error. This appears to be so that we can set testcaseID to the id returned by mongo to be used in the creation of the path for the testcase files. at line 182. Recommendation either set required fields before calling newTestcase.save() at line 137
[2024-12-09 22:01:17 +0000] [17] [ERROR] Error handling request /assessments/assessment/import/entire Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 135, in handle self.handle_request(listener, req, client, addr) File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 178, in handle_request respiter = self.wsgi(environ, resp.start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2552, in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2532, in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask_security/decorators.py", line 394, in decorated_view return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask_security/decorators.py", line 513, in decorated_view return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/usr/src/app/blueprints/assessment_import.py", line 137, in importentire newTestcase.save() File "/usr/local/lib/python3.11/site-packages/mongoengine/document.py", line 399, in save self.validate(clean=clean) File "/usr/local/lib/python3.11/site-packages/mongoengine/base/document.py", line 438, in validate raise ValidationError(message, errors=errors) mongoengine.errors.ValidationError: ValidationError (TestCase:None) (Field is required: ['name'])
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
Expected result: Assessment imported successfully
Actual result:
500 error on /asssement/import/entire API call
Inner exception on blueprints/asessment_import.py line 137 in importentire at newTestcase.save()
Inner Inner exception raise ValidationError(message, errors=errors) mongoengine.errors.ValidationError: Validation Error (TestCase:None) (Field is required: ['name'])
Initial observations:
It appears that the code is attempting to save the testCase object to mongo at line 137 before some required fields are set this causes a validation error. This appears to be so that we can set testcaseID to the id returned by mongo to be used in the creation of the path for the testcase files. at line 182. Recommendation either set required fields before calling newTestcase.save() at line 137
[2024-12-09 22:01:17 +0000] [17] [ERROR] Error handling request /assessments/assessment/import/entire Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 135, in handle self.handle_request(listener, req, client, addr) File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/sync.py", line 178, in handle_request respiter = self.wsgi(environ, resp.start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2552, in __call__ return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2532, in wsgi_app response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask_security/decorators.py", line 394, in decorated_view return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/flask_security/decorators.py", line 513, in decorated_view return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "/usr/src/app/blueprints/assessment_import.py", line 137, in importentire newTestcase.save() File "/usr/local/lib/python3.11/site-packages/mongoengine/document.py", line 399, in save self.validate(clean=clean) File "/usr/local/lib/python3.11/site-packages/mongoengine/base/document.py", line 438, in validate raise ValidationError(message, errors=errors) mongoengine.errors.ValidationError: ValidationError (TestCase:None) (Field is required: ['name'])
The text was updated successfully, but these errors were encountered: