Fix incorrect argument ordering in error message, which provokes a
printf-related TypeError.
Merge pull request #7707 from rrgomes/devel

Fix incorrect argument ordering in error message