On importing a private key, an error occurs if the wallet is locked. The wallet does not specify what to do if this is attempted, but just displays an error number - implying perhaps that the private key was incorrect; so some users will need clearer instructions on this. To fix the problem, just unlock wallet before importing keys.