I was having the same issue and nothing here would fix it. I tried importing the project into a new file and that fixed it but I noticed something. IF YOUR FILE NAME HAS A CHARACTER IN IT THEN IT WILL ALWAYS GET THE ERROR FOR RENDERING OR EXPORT. This saved me maybe it will save you too.