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

GetPSF with OpticStudio 20.3.1 #105

Open
mtalapinto opened this issue Jan 26, 2021 · 0 comments
Open

GetPSF with OpticStudio 20.3.1 #105

mtalapinto opened this issue Jan 26, 2021 · 0 comments

Comments

@mtalapinto
Copy link

Hi,

I've been trying to use ln.zGetPSF() and it throws me the following error - from the experience of another issue I read about this I included a line to set the text encoding.

TXT encoding is ASCII; no change required
Traceback (most recent call last):
File "C:/Users/marce/Documents/Ckepi/pyzmx/main.py", line 30, in
getPSF()
File "C:/Users/marce/Documents/Ckepi/pyzmx/main.py", line 24, in getPSF
print(ln.zGetPSF())
File "C:\Users\marce\anaconda3\lib\site-packages\pyzdde\zdde.py", line 7820, in zGetPSF
data_spacing_line = line_list[_getFirstLineOfInterest(line_list, 'Data spacing')]
TypeError: list indices must be integers or slices, not NoneType
Exception ignored in: <function PyZDDE.del at 0x0000027FF167D8B0>
Traceback (most recent call last):
File "C:\Users\marce\anaconda3\lib\site-packages\pyzdde\zdde.py", line 808, in del
TypeError: 'NoneType' object is not callable

Now, if I switch the text encoding to unicode this is what I get

Successfully changed to UNICODE
Traceback (most recent call last):
File "C:/Users/marce/Documents/Ckepi/pyzmx/main.py", line 30, in
getPSF()
File "C:/Users/marce/Documents/Ckepi/pyzmx/main.py", line 24, in getPSF
print(ln.zGetPSF())
File "C:\Users\marce\anaconda3\lib\site-packages\pyzdde\zdde.py", line 7821, in zGetPSF
data_spacing = float(_re.search(r'\d{1,3}.\d{2,6}', data_spacing_line).group())
AttributeError: 'NoneType' object has no attribute 'group'
Exception ignored in: <function PyZDDE.del at 0x0000023E4870D8B0>
Traceback (most recent call last):
File "C:\Users\marce\anaconda3\lib\site-packages\pyzdde\zdde.py", line 808, in del
TypeError: 'NoneType' object is not callable

I am not sure whether is a pyzdde issue, or just how the new versions of OpticStudio encode the text.
Thanks,

with kind regards,

Marcelo

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