Chia not syncing -- exception list index out of range

I have a sync problem but it is different from most of the sync problems. I opened port but debug.log still gives an error.

2021-05-24T19:13:28.109 harvester harvester_server        : WARNING  Trying to ban localhost for 10, but will not ban
2021-05-24T19:13:28.112 harvester harvester_server        : ERROR    Exception list index out of range, exception Stack: Traceback (most recent call last):
  File "chia\server\", line 394, in start_client
  File "chia\server\", line 113, in perform_handshake
  File "chia\cmds\", line 300, in chia_full_version_str
  File "chia\cmds\", line 252, in chia_version_number
IndexError: list index out of range

This is my error. How can I fix it? I searched a lot of sources but I couldn’t find any result.

An index in Python refers to a position within an ordered list . This error basically means you are trying to access a value at a List index which is out of bounds i.e greater than the last index of the list or less than the least index in the list. So the first element is 0, second is 1, so on. So if there are n elements in a list, the last element is n-1 . If you try to access the empty or None element by pointing available index of the list, then you will get the "List index out of range " error. To solve this error, you should make sure that you’re not trying to access a non-existent item in a list.