diff --git a/changedetectionio/importer.py b/changedetectionio/importer.py index 6fef1a27..60e494e0 100644 --- a/changedetectionio/importer.py +++ b/changedetectionio/importer.py @@ -194,6 +194,7 @@ class import_xlsx_wachete(Importer): validate_url(data.get('url')) except ValidationError as e: print(">> import URL error", data.get('url'), str(e)) + flash(f"Error processing row number {row_id}, URL value was incorrect, row was skipped.", 'error') # Don't bother processing anything else on this row continue @@ -262,6 +263,7 @@ class import_xlsx_custom(Importer): validate_url(url) except ValidationError as e: print(">> Import URL error", url, str(e)) + flash(f"Error processing row number {row_i}, URL value was incorrect, row was skipped.", 'error') # Don't bother processing anything else on this row url = None break diff --git a/changedetectionio/tests/test_import.py b/changedetectionio/tests/test_import.py index 04e9d086..e8c66726 100644 --- a/changedetectionio/tests/test_import.py +++ b/changedetectionio/tests/test_import.py @@ -152,6 +152,8 @@ def test_import_custom_xlsx(client, live_server): ) assert b'3 imported from custom .xlsx' in res.data + # Because this row was actually just a header with no usable URL, we should get an error + assert b'Error processing row number 1' in res.data res = client.get( url_for("index")