When you have problems, please try the following.
1. Restart Anki
Please close Anki, then start it again.
If you are unable to close Anki because of an error message, you can either terminate Anki using your task manager, or restart your computer. Anki saves periodically, so you should not lose more than a few minutes of work in most circumstances.
If the problem does not occur again, you can skip the following steps.
2. Check your Anki version
These days, Anki shows its version in the error message. If you're using an old Anki, you can find the version you're using in the Help>About or Anki>About menu.
If the version you're using is not the latest 2.1.x version published on https://apps.ankiweb.net, please close Anki, install the latest version, and then start Anki again to see if the problem has gone away.
If you're using Linux, please make sure you can reproduce the error using the packaged version on the Anki website, as distros often distribute broken versions.
3. Check your database
After restarting Anki, please try the Tools>Check Database menu item to make sure your collection doesn't have any problems.
4. Check add-ons
Please close Anki, then start it again while holding down the shift key, which will disable any add-ons you have installed.
If the problem goes away when add-ons are disabled, you can disable or delete some add-ons and try again, until you discover which add-on is causing the problem.
If the issue turns out to be an add-on, please disable the add-on and report the issue on the add-on's download page.
5. Restart your computer
Sometimes restarting your computer may help.
6. If the problem remains
If you're confirmed you are using the latest Anki version, and are still receiving errors when starting Anki while holding down the shift key, please paste the next error you receive into your support ticket.