New submission from Ben Kummer:

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()

----------
components: Windows
files: python_bug_reproduce.py
messages: 260310
nosy: ben.kummer, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: ntpath.py Error in Windows
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file41928/python_bug_reproduce.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26365>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to