raft-tech / TANF-app

Repo for development of a new TANF Data Reporting System
Other
16 stars 3 forks source link

Bug: file stuck in pending state when DOB or SSN field is space-filled #3059

Open ADPennington opened 5 days ago

ADPennington commented 5 days ago

Thank you for taking the time to let us know about the issue you found. The basic rule for bug reporting is that something isn't working the way one would expect it to work. Please provide us with the information requested below and we will look at it as soon as we are able.

Description

File with space-filled DOB in the TANF T2 record was uploaded and submitted and file status = pending.

Action Taken

What I expected to see

What I did see

file stuck in pending state: Screenshot 2024-07-02 122823

logs:

12:22:48.331: [APP/PROC/WEB.0] 2024-07-02 16:22:48,330 DEBUG util.py::generate_t2_t3_t5_hashes:L277 :  Partial Hash Field Values: T2 202310 11111116935 2 None 999999999
12:22:48.338: [APP/PROC/WEB.0] [2024-07-02 16:22:48,337: ERROR/ForkPoolWorker-1] Task tdpservice.scheduling.parser_task.parse[89ac3089-77cf-4ab1-849c-89b6e7bd79e3] raised unexpected: TypeError('can only concatenate str (not "NoneType") to str')
12:22:48.338: [APP/PROC/WEB.0] Traceback (most recent call last):
12:22:48.338: [APP/PROC/WEB.0] File "/home/vcap/deps/1/python/lib/python3.10/site-packages/celery/app/trace.py", line 451, in trace_task
12:22:48.338: [APP/PROC/WEB.0] R = retval = fun(*args, **kwargs)
12:22:48.338: [APP/PROC/WEB.0] File "/home/vcap/deps/1/python/lib/python3.10/site-packages/celery/app/trace.py", line 734, in __protected_call__
12:22:48.338: [APP/PROC/WEB.0] return self.run(*args, **kwargs)
12:22:48.338: [APP/PROC/WEB.0] File "/home/vcap/app/tdpservice/scheduling/parser_task.py", line 28, in parse
12:22:48.338: [APP/PROC/WEB.0] errors = parse_datafile(data_file, dfs)
12:22:48.338: [APP/PROC/WEB.0] File "/home/vcap/app/tdpservice/parsers/parse.py", line 100, in parse_datafile
12:22:48.338: [APP/PROC/WEB.0] line_errors = parse_datafile_lines(datafile, dfs, program_type, section, is_encrypted, case_consistency_validator)
12:22:48.338: [APP/PROC/WEB.0] File "/home/vcap/app/tdpservice/parsers/parse.py", line 397, in parse_datafile_lines
12:22:48.338: [APP/PROC/WEB.0] should_remove, case_hash_to_remove, case_hash = case_consistency_validator.add_record(record,
12:22:48.338: [APP/PROC/WEB.0] File "/home/vcap/app/tdpservice/parsers/case_consistency_validator.py", line 126, in add_record
12:22:48.338: [APP/PROC/WEB.0] self.duplicate_manager.add_record(record, latest_case_hash, schema, line, line_number)
12:22:48.338: [APP/PROC/WEB.0] File "/home/vcap/app/tdpservice/parsers/duplicate_manager.py", line 188, in add_record
12:22:48.338: [APP/PROC/WEB.0] self.case_duplicate_detectors[case_hash].add_case_member(record, schema, line, line_number)
12:22:48.338: [APP/PROC/WEB.0] File "/home/vcap/app/tdpservice/parsers/duplicate_manager.py", line 138, in add_case_member
12:22:48.338: [APP/PROC/WEB.0] line_hash, partial_hash = schema.generate_hashes_func(line, record)
12:22:48.338: [APP/PROC/WEB.0] File "/home/vcap/app/tdpservice/parsers/util.py", line 279, in generate_t2_t3_t5_hashes
12:22:48.338: [APP/PROC/WEB.0] return hash(line), hash(record.RecordType + str(record.RPT_MONTH_YEAR) + record.CASE_NUMBER +
12:22:48.338: [APP/PROC/WEB.0] TypeError: can only concatenate str (not "NoneType") to str

Other Helpful Information