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
If you try to import a CSV with a record that has an empty "format" property (null value), the resolver will break and return an opaque "Something went terribly wrong!" error message instead of a verbose message telling me what went wrong and why.
This makes it impossible for a data publisher to debug the CSV import file and correct the offending rows.
I could debug this by logging in via SSH into the server, opening up application.log and finding this error:
[ERROR] 2015-08-04 15:38:31,853 -- Incorrect data format
Traceback (most recent call last):
File "/home/resolver/resolver/venv/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/resolver/resolver/venv/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/resolver/resolver/venv/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/resolver/resolver/venv/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/resolver/resolver/venv/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/resolver/resolver/resolver/controllers/user.py", line 18, in inner
return func(*args, **kwargs)
File "/home/resolver/resolver/resolver/controllers/csv.py", line 95, in admin_csv_import
notes=record[6])
File "<string>", line 4, in __init__
File "/home/resolver/resolver/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/state.py", line 260, in _initialize_instance
return manager.original_init(*mixed[1:], **kwargs)
File "/home/resolver/resolver/resolver/model/data.py", line 27, in __init__
raise Exception("Incorrect data format")
Exception: Incorrect data format
How to reproduce
Create an import file with 1 entry
Leave the format property of the record empty (no html, json, etc.)
Notice how the import process breaks.
Cause:
The Data class in data.py does raise an exception with a message "Incorrect data format" (line 27), but the error is not reflected in the UI.
The exception also breaks the import process meaning that only a partial import is executed.
Resolution:
Skip/Ignore the offending row and let the importer finish the rest of the import instead of breaking all together
Add rows where required fields are empty or with offending data types to a (downloadable) error log that is presented to the data publisher via the UI after the import ends.
The text was updated successfully, but these errors were encountered:
Problem:
If you try to import a CSV with a record that has an empty "format" property (null value), the resolver will break and return an opaque "Something went terribly wrong!" error message instead of a verbose message telling me what went wrong and why.
This makes it impossible for a data publisher to debug the CSV import file and correct the offending rows.
I could debug this by logging in via SSH into the server, opening up application.log and finding this error:
How to reproduce
Cause:
The Data class in data.py does raise an exception with a message "Incorrect data format" (line 27), but the error is not reflected in the UI.
The exception also breaks the import process meaning that only a partial import is executed.
Resolution:
The text was updated successfully, but these errors were encountered: