[New-bugs-announce] [issue42970] File path with blank causes open error in 3.8, not in 3.7

Doug Day report at bugs.python.org
Tue Jan 19 15:26:21 EST 2021


New submission from Doug Day <dgday6 at gmail.com>:

The following code generates a path that works in Pythons 3.7.6 on macOS Big Sur but not in Catalina  with 3.8.2.. 
mySrcFldr="~/Library/Mobile Documents/com~apple~CloudDocs/Utilities/"
srcFldr=os.path.expanduser(mySrcFldr)
f=os.path.join(srcFldr,"mortgage.py")

When python tries to run the code file(montage.py) on 3.8.2, an open error results.
/Library/Developer/CommandLineTools/usr/bin/python3: can't open file '/Users/Doug/Library/Mobile': [Errno 2] No such file or directory
 I tried putting a backslash after 'Mobile'. Does not help.
The complete path is:
'/Users/Doug/Library/Mobile Documents/com~apple~CloudDocs/Utilities/mortgage.py'

While the doc changes show some changes in the os.path module, I see no mention of this issue.

----------
components: Interpreter Core
messages: 385290
nosy: dday52
priority: normal
severity: normal
status: open
title: File path with blank causes open error in 3.8, not in 3.7
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42970>
_______________________________________


More information about the New-bugs-announce mailing list