Skip to main content
NetApp Knowledge Base

XCP migration fails with UnicodeEncodeError when filename contains 4 bytes character

Views:
130
Visibility:
Public
Votes:
0
Category:
netapp-xcp
Specialty:
nas
Last Updated:

Applies to

  • XCP
  • ONTAP 9
  • CIFS

Issue

XCP copy / sync operation fails with logging error:

UnicodeEncodeError: 'charmap' codec can't encode characters in position xx-xx: character maps to <undefined>

 

Example

--- Logging error ---
Traceback (most recent call last):
  File "logging\__init__.py", line 1086, in emit
  File "encodings\cp1252.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode characters in position 91-92: character maps to <undefined>
Call stack:
  File "threading.py", line 930, in _bootstrap
  File "threading.py", line 973, in _bootstrap_inner
  File "threading.py", line 910, in run
  File "xcp\xcpLogging.py", line 249, in receive
  File "logging\handlers.py", line 75, in emit
  File "logging\__init__.py", line 1187, in emit
  File "logging\__init__.py", line 1091, in emit
Message: 'failed to copy "Filename🏖️.pdf.txt": (123, \'CreateFile\', \'The filename, directory name, or volume label syntax is incorrect.\')'
Arguments: None
failed to copy "Filename🏖️.pdf.txt": (123, 'CreateFile', 'The filename, directory name, or volume label syntax is incorrect.')

 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.