Leo.Kislov at gmail.com
Tue Mar 27 07:05:45 CEST 2007
On Mar 26, 8:10 pm, David Nicolson <davidnicols... at hotmail.com> wrote:
> I wasn't exactly sure where to send this, I don't know if it is a bug
> in Python or not. This is rare, but it has occurred a few times and
> seems to be reproducible for those who experience it.
> Examine this code:
> >>> try:
> >>> shutil.copy("/file.xml","/Volumes/External/file.xml")
> >>> except Exception, err:
> >>> print sys.exc_info()
> >>> print err
> This is the output:
> 'ascii' codec can't decode byte 0xd6 in position 26: ordinal not in
> What could the possible cause of this be?
Show us traceback, without it I doubt anyone can help.
> Shouldn't shutil simply be
> reading and writing the bytes and not character decoding them?
Yes, shutil.copy copies content verbatim.
More information about the Python-list