This error occurs when the ledger name has a special character in it eg. \ / : ; ? ' < > | ' . Once the special character is removed, the file will then link correctly. For example:
McNeils (correct)
McNeil's (incorrect).
Follow the steps to remove the special character:
Open the ledger in XPA.
File > Save as
Remove the special character from the file name.
Save.
Reattempt linking the file (with new name) in Client console.
This will link successfully.
