Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"IOError: [Errno 13] Permission denied" for accessing analysis text files outputted by Zemax #55

Open
indranilsinharoy opened this issue Jun 18, 2015 · 0 comments

Comments

@indranilsinharoy
Copy link
Collaborator

It is probably not a bug in PyZDDE as such. Also, this error happens rarely (not always, and very hard to reproduce) when some of the functions such as zGetPOP() request Zemax to export an analysis data as text file, and then the function tries to open the text file (in read mode), but is unable to do so because of file access denial. The error message is as follows (when it happens):

File " ...\PyZDDE\pyzdde\zdde.py", line 7022, in zGetPOP
    line_list = _readLinesFromFile(_openFile(textFileName))
File "C: \...\PyZDDE\pyzdde\zdde.py", line 10657, in _openFi1e
    f = open(fileName, 'r')
IOError: [Errno 13] Permission denied: 'C:\...\popData.txt'

Interestingly, when this error happens, the file outputted by Zemax doesn't show any owner. Instead it shows "Unable to display current owner". In normal cases, the owner of such files is usually the current user.

Also, when I execute icacls popData.txt from the command prompt in the directory containing the file, to display the discretionary access control lists (DACLs) on the file, I get

popData.txt: Access is denied.
Successfully processed 0 files; Failed processing 1 files

This issue could also cause problems (doesn't seem to happen always) to functions like ipzGetTextWindow(), zGetImageSimulation(), zGetMTF(), zGetPSF(), zGetPSFCrossSec(), zGetPOP(), etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant