Bulk Shift Assignment Failed

Dear All,

Please lookinto below error code and advise.

Traceback with variables (most recent call last):
  File "apps/hrms/hrms/hr/doctype/shift_assignment_tool/shift_assignment_tool.py", line 227, in _bulk_assign
    assignment.create_shifts(self.start_date, self.end_date)
      self = <ShiftAssignmentTool: new-shift-assignment-tool-umvzttkrkk>
      employees = ['1001', '1004', '1005', '1006', '1007', '1008', '1009', '1010', '1011', '1012', '1013']
      success = []
      failure = ['1001', '1004', '1005', '1006', '1007', '1008', '1009', '1010', '1011', '1012']
      count = 10
      savepoint = 'before_assignment'
      doctype = 'Shift Schedule Assignment'
      event = 'completed_bulk_shift_schedule_assignment'
      d = '1013'
      assignment = <ShiftScheduleAssignment: HR-SHSA-25-01-00002>
  File "apps/hrms/hrms/hr/doctype/shift_schedule_assignment/shift_schedule_assignment.py", line 23, in create_shifts
    week_end_day = get_weekday(add_days(start_date, -1))
      self = <ShiftScheduleAssignment: HR-SHSA-25-01-00002>
      start_date = '2025-01-12'
      end_date = None
      shift_schedule = <ShiftSchedule: Weekday_8_4 docstatus=1>
      gap = 0
      date = '2025-01-12'
      individual_assignment_start = None
  File "apps/frappe/frappe/utils/data.py", line 716, in get_weekday
    return weekdays[datetime.weekday()]
      datetime = '2025-01-11'
      weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
builtins.AttributeError: 'str' object has no attribute 'weekday'

I got the same error and don’t know how this happened. It works fine on other sites. Any idea what could be causing this?