I had this same error and I tried all suggestions given above, but still could not get rid of the error.
I eventually, got rid of it by doing the following:
Step 1: [ gvm-setup ] (after this I got a recommendation to run ‘gvm-check-setup’)
Step 2: [ gvm-check-setup ]
After performing ‘gvm-check-setup’ I observed there were 2 warnings at the end of the line
i. install nsis
ii. edit /etc/gvm/pwpolicy.conf
Step 3: [ apt install nsis ]
Step 4: [ gvm-setup ]
Step 5: [ gvm-start ]
Step 6: open a browser and run the task.
That was how I got rid of the error and was able to scan.