Message260310
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() |
|
Date |
User |
Action |
Args |
2016-02-15 13:25:05 | ben.kummer | set | recipients:
+ ben.kummer, paul.moore, tim.golden, zach.ware, steve.dower |
2016-02-15 13:25:05 | ben.kummer | set | messageid: <1455542705.33.0.354690816824.issue26365@psf.upfronthosting.co.za> |
2016-02-15 13:25:05 | ben.kummer | link | issue26365 messages |
2016-02-15 13:25:05 | ben.kummer | create | |
|