[issue16383] Python 3.3 Permission Error with User Library on Windows
Jim Pattee added the comment: You have been in contact with my friends at Mensa. Further information: Just branching into the library causes a problem with permissions when opening files, even if the library just immediately returns. Opening the file in the library, before returning to the calling program, will work. You definitely have a problem somewhere. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16383 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16383] Python 3.3 Permission Error with User Library on Windows
Jim Pattee added the comment: The problem is not file permissions nor the install. I did some further testing. The problem actually occurs with the library calls at lines 23 and 25. I changed these lines to eliminate the library call by just hard coding the file path. Change from: line 23:header_path = libastyle.get_astyle_directory() + /src/astyle.h line 25:beautifier_path = libastyle.get_astyle_directory() + /src/ASBeautifier.cpp Change to: line 23:header_path = C:\\Users\\jimp\\ZPythonPermissionError\\Projects/AStyle/src/astyle.h line 25:beautifier_path = C:\\Users\\jimp\\ZPythonPermissionError\\Projects/AStyle/src/ASBeautifier.cpp When run with the changes the program worked. The problem is apparently with the library call, not the file itself. Then I changed the same instructions to get the file name using the same instructions that the library program used. The library program uses “sys.path[0]” to get the directory containing the executed script. Change to: line 23:header_path = sys.path[0] + /../AStyle/src/astyle.h line 25:beautifier_path = sys.path[0] + /../AStyle/src/ASBeautifier.cpp This also worked. I want to do some more testing this weekend. I will hopefully have more info on Monday. Thanks for your input on this. Apparently this is not a problem on your PC. I have run this on both Windows 7 and Windows 8. I get the same results (a Permission Error) on both. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16383 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16383] Python 3.3 Permission Error with User Library on Windows
New submission from Jim Pattee: Python 3.3 Permission Error with User Library on Windows I have certain scripts that run without error on Python 2.7 and 3.2. With Python 3.3 they get a Permission Error. This does not occur with every script. The difference seems to be that the ones with a problem use a local user library. The ones without a local library are OK. A test case is attached. Do not change the directory names. Double click on the file run_test.bat to run. You may need to change the path to the Python executable on your computer. It runs the script astyle_protected.py which uses the library libastyle.py. It runs OK with Python 2.7 and 3.2. But gets an exception with Python 3.3. -- components: Windows files: Projects.zip messages: 174434 nosy: jimp02 priority: normal severity: normal status: open title: Python 3.3 Permission Error with User Library on Windows type: crash versions: Python 3.3 Added file: http://bugs.python.org/file27827/Projects.zip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16383 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16383] Python 3.3 Permission Error with User Library on Windows
Jim Pattee added the comment: Python 3.3 (64bit) Traceback (most recent call last): File file-py\astyle-protected.py, line 157, in module process_files() File file-py\astyle-protected.py, line 30, in process_files get_header_variables(header_variables, header_path) File file-py\astyle-protected.py, line 121, in get_header_variables file_in = open(header_path, 'r') PermissionError: [Errno 13] Permission denied: 'C:\\Users\\jimp\\ZPythonPermissionError\\Projects/AStyle/src/astyle.h' Press any key to continue . . . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16383 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com