Issue42970
➜
This issue tracker will soon become read-only and move to GitHub.
For a smoother transition, remember to
log in and link your GitHub username to your profile.
For more information,
see this post about the migration.
Created on 2021-01-19 20:26 by dday52, last changed 2021-01-21 10:33 by ronaldoussoren.
| Messages (5) | |||
|---|---|---|---|
| msg385290 - (view) | Author: Doug Day (dday52) | Date: 2021-01-19 20:26 | |
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. |
|||
| msg385302 - (view) | Author: Doug Day (dday52) | Date: 2021-01-19 22:24 | |
To clarify: either python version generates the same path. On 3.8.2 though an open error results |
|||
| msg385393 - (view) | Author: Ronald Oussoren (ronaldoussoren) * ![]() |
Date: 2021-01-21 08:28 | |
What kind of error do you get? |
|||
| msg385402 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2021-01-21 09:22 | |
Please provide complete script that reproduces the issue. The provided three lines do not open any file and cannot generate such error.
It could help to add the debug prints:
print(f'mySrcFldr = {mySrcFldr!a}')
print(f'srcFldr = {srcFldr!a}')
print(f'f = {f!a}')
|
|||
| msg385404 - (view) | Author: Ronald Oussoren (ronaldoussoren) * ![]() |
Date: 2021-01-21 10:33 | |
This might be a security feature in Big Sur, access to some locations is restricted by default. I'm not sure if that includes ~/Library, it definitely affects access to ~/Documents. I'd expect to see a security pop-up from the system though. I cannot reproduce this with python 3.9.1 on Big Sur on an M1 system. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2021-01-21 10:33:36 | ronaldoussoren | set | messages: + msg385404 |
| 2021-01-21 09:22:45 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg385402 |
| 2021-01-21 08:28:38 | ronaldoussoren | set | nosy:
+ ronaldoussoren messages: + msg385393 |
| 2021-01-19 22:24:32 | dday52 | set | messages: + msg385302 |
| 2021-01-19 20:26:21 | dday52 | create | |
