[New-bugs-announce] [issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit)

Jason Day report at bugs.python.org
Wed Oct 8 02:27:15 CEST 2008

New submission from Jason Day <jason.day at bluetechllc.com>:

On my system (Windows Server 2008 SP1 - 64-bit, Python 2.5.2 - 32-bit),
simple actions like:
>>> help(help) # Or any function
>>> import tempfile
>>> f = tempfile.mktemp()
result in this (rather confusing) error:
TypeError: _getfullpathname() argument 1 must be (buffer overflow), not str

Apparently, _getfullpathname() chokes on certain paths if they are not
supplied as unicode. Locally, I was able to work around the issue by
changing the call to _getfullpathname in ntpath.abspath to:
                path = str(_getfullpathname(unicode(path)))

components: Windows
messages: 74502
nosy: JDay
severity: normal
status: open
title: ntpath.abspath can fail on Win Server 2008 (64-bit)
type: crash
versions: Python 2.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list