Error "Error translating file contents ..." in Perforce

When sending perforce (p4v) from my client, I get the following error message:

Error translating the contents of the file next to line 1 Send canceled - correct then use "p4 submit -c 22". Some files cannot be transferred from the client.

I do not know what this means or how to solve the problem.

+4
source share
4 answers

Perforce can be confused regarding file type. Perhaps this is a binary file that Perforce considers text? Right-click the file and select "Change File Type ...". A dialog box opens allowing you to change the file type. Make sure it is installed correctly and send the file again.

+7
source

The real logo is the encoding, setting the encoding in UTF-8 using the menu item "Connection → Select character encoding ..." fixed the problem

+4
source

FWIW, this problem arose only for me, and I could not cancel any files or perform almost any operation. Even deleting files from the workspace and then trying to retrieve them again caused a translation of the file contents error. This problem started for me after the P4V crashed.

To fix this, I simply went to Connection> Select Character Encoding and clicked OK in the dialog box (did not change the encoding to anything else - saved it as it was already), and this fixed it for me.

+4
source

This problem can also occur when the file does not actually exist on the disk. This can play several scenarios.

  • You open the file for 'add' before the file actually exists on disk. This is possible and permitted by Perforce. If you "p4 add" the file before it exists, then try sending the list of changes before actually putting the local file in place, you will get this error.
  • You open the file for "editing", and then by some mechanism, delete the file locally before sending. Again, when sending you will see this error.

Honestly, I'm a little surprised that the error mentioned in the original question was caused by a file type mismatch. I have never seen this happen. In case (1), the file that "p4 add'ed" will be added as the default "text" type if the file does not exist on disk. If the file was to be a binary file, this indicates a type mismatch, but this does not cause a failure to transfer the file from the client. It is a fact that the file does not exist.

Anyway, this is my experience. I decided that I would share cases when I saw this error.

+1
source

Source: https://habr.com/ru/post/1341840/


All Articles