This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hniksic
Recipients docs@python, hniksic
Date 2016-01-25.16:24:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453739088.32.0.119323532622.issue26198@psf.upfronthosting.co.za>
In-reply-to
Content
The problem can be encountered and easily reproduced by calling os.path functions, such as os.path.abspath, with a sufficiently large string on Windows:

>>> os.path.abspath("a" * 1024)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "P:\...\lib\ntpath.py", line 471, in abspath
TypeError: must be (buffer overflow), not str

The error message is somewhat confusing, making it look like the "must be" and "not" arguments are swapped. Ideally, the message could be along the lines of "must be a string of no more than X characters".
History
Date User Action Args
2016-01-25 16:24:48hniksicsetrecipients: + hniksic, docs@python
2016-01-25 16:24:48hniksicsetmessageid: <1453739088.32.0.119323532622.issue26198@psf.upfronthosting.co.za>
2016-01-25 16:24:48hniksiclinkissue26198 messages
2016-01-25 16:24:47hniksiccreate