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 ben.kummer
Recipients ben.kummer, paul.moore, steve.dower, tim.golden, zach.ware
Date 2016-02-15.13:25:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455542705.33.0.354690816824.issue26365@psf.upfronthosting.co.za>
In-reply-to
Content
ntpath.py throws an error in Python2.7.11 Windows

Code snippet:
product_dir ="/zope/eggs43"
my_tuple= os.path.split(product_dir)[:-1]
roduct_prefix = os.path.join(my_tuple )

The same code works in python 2.7.11 under Linux

Traceback:
C:\zope\selenium_test>c:\Python27\python.exe python_bug_reproduce.py
Traceback (most recent call last):
  File "python_bug_reproduce.py", line 10, in <module>
    main()
  File "python_bug_reproduce.py", line 7, in main
    product_prefix = os.path.join(my_tuple )
  File "c:\Python27\lib\ntpath.py", line 90, in join
    return result_drive + result_path
TypeError: cannot concatenate 'str' and 'tuple' objects


code to reproduce:

#!/usr/bin/python
import os

def main():
    product_dir ="/zope/eggs43"
    my_tuple= os.path.split(product_dir)[:-1]
    product_prefix = os.path.join(my_tuple )
    
if __name__ == "__main__":
    main()
History
Date User Action Args
2016-02-15 13:25:05ben.kummersetrecipients: + ben.kummer, paul.moore, tim.golden, zach.ware, steve.dower
2016-02-15 13:25:05ben.kummersetmessageid: <1455542705.33.0.354690816824.issue26365@psf.upfronthosting.co.za>
2016-02-15 13:25:05ben.kummerlinkissue26365 messages
2016-02-15 13:25:05ben.kummercreate