Skip to content
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

Bug - 500 error for /audit/excel/findings-uniform-guidance/: invalid literal for int() #4755

Open
phildominguez-gsa opened this issue Mar 6, 2025 · 0 comments

Comments

@phildominguez-gsa
Copy link
Contributor

phildominguez-gsa commented Mar 6, 2025

Example: https://onenr.io/0MRNMJP8Kwn

Report ID: 2023-06-GSAFAC-0000357365

Problematic line: https://github.com/GSA-TTS/FAC/blob/main/backend/audit/intakelib/checks/check_finding_reference_year.py#L47

"Traceback (most recent call last):\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner\n response = get_response(request)\n ^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response\n response = wrapped_callback(request, *callback_args, **callback_kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/newrelic/hooks/framework_django.py", line 527, in wrapper\n return wrapped(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view\n return self.dispatch(request, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/utils/decorators.py", line 48, in _wrapper\n return bound_method(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/views/decorators/csrf.py", line 65, in _view_wrapper\n return view_func(request, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/app/audit/views/views.py", line 160, in dispatch\n return super(ExcelFileHandlerView, self).dispatch(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/app/audit/mixins.py", line 59, in dispatch\n return super().dispatch(request, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/contrib/auth/mixins.py", line 73, in dispatch\n return super().dispatch(request, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/newrelic/hooks/framework_django.py", line 900, in wrapper\n return wrapped(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/deps/1/python/lib/python3.12/site-packages/django/views/generic/base.py", line 143, in dispatch\n return handler(request, *args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/app/audit/views/views.py", line 201, in post\n audit_data = self._extract_and_validate_data(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/app/audit/views/views.py", line 146, in _extract_and_validate_data\n audit_data = handler_info["extractor"](excel_file.file, auditee_uei=auditee_uei)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/app/audit/intakelib/mapping_audit_findings.py", line 63, in extract_audit_findings\n run_all_audit_finding_checks(xform_ir, is_gsa_migration)\n File "/home/vcap/app/audit/intakelib/checks/runners.py", line 271, in run_all_audit_finding_checks\n run_all_checks(ir, audit_findings_checks, is_data_migration=is_data_migration)\n File "/home/vcap/app/audit/intakelib/checks/runners.py", line 184, in run_all_checks\n res = run_check(fun, ir, is_data_migration, auditee_uei)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/vcap/app/audit/intakelib/checks/runners.py", line 233, in run_check\n return fun(ir)\n ^^^^^^^\n File "/home/vcap/app/audit/intakelib/checks/check_finding_reference_year.py", line 47, in finding_reference_year\n year = int(reference.split("-")[0])\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nValueError: invalid literal for int() with base 10: 'AWARD'"

@github-project-automation github-project-automation bot moved this to Triage in FAC Mar 6, 2025
@phildominguez-gsa phildominguez-gsa changed the title Bug: 500 error for /audit/excel/findings-uniform-guidance/ Bug - 500 error for /audit/excel/findings-uniform-guidance/: invalid literal for int() Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

No branches or pull requests

1 participant