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 eric.smith
Recipients eric.smith, glittershark, r.david.murray
Date 2012-02-28.09:21:03
SpamBayes Score 3.5204923e-08
Marked as misclassified No
Message-id <1330420864.67.0.296135571982.issue14145@psf.upfronthosting.co.za>
In-reply-to
Content
I can't reproduce this. Can you please post the entire traceback? It would be preferable if you could also show the exact code that's causing the problem, typed from a python command prompt (see my example below).

I can reproduce the error if I pass a list to ps.path.splitext(), which is what I suspect you're doing:

>>> os.path.splitext(['c:\\blah.ext'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/posixpath.py", line 95, in splitext
    return genericpath._splitext(p, sep, altsep, extsep)
  File "/usr/lib/python2.6/genericpath.py", line 91, in _splitext
    sepIndex = p.rfind(sep)
AttributeError: 'list' object has no attribute 'rfind'

And you probably want: os.path.splitext("C:\\blah.ext"), so as to escape the backslash.
History
Date User Action Args
2012-02-28 09:21:04eric.smithsetrecipients: + eric.smith, r.david.murray, glittershark
2012-02-28 09:21:04eric.smithsetmessageid: <1330420864.67.0.296135571982.issue14145@psf.upfronthosting.co.za>
2012-02-28 09:21:04eric.smithlinkissue14145 messages
2012-02-28 09:21:03eric.smithcreate