I got the same problem yesterday because of a reinstallation.
I exported data with built-in wp feature.
Backed up mysql tables.
Wiped out the server folder.
Reinstalled another clean wordpress (the version was the same).
Imported back my data with wp feature.
And I lost all my categories and tags (that was not a problem).
After this I got that error when saving pages/articles and trying to upload data.
It simply solved itself by publishing a post with a temp category and a temp tag.
I hope this helps.