Before we can try to help, we need more information.
Keep in mind that we can’t see your system and what is going on.
You have to tell us.
Did the scan found any malware?
What version of avast?
What OS?
What was the error?
Any problems before doing the scan? If so which ones?
What other security software do you have installed?