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

Arrow keys crash imexam() #248

Open
vrijmoet opened this issue Jun 2, 2022 · 0 comments
Open

Arrow keys crash imexam() #248

vrijmoet opened this issue Jun 2, 2022 · 0 comments

Comments

@vrijmoet
Copy link

vrijmoet commented Jun 2, 2022

I am running imexam with DS9 on Linux (Rocky8), mostly non-interactively (calling functions through Python scripts). This also happens when I run it on my Mac laptop (Big Sur 11.2.3).

If I load a FITS image and run imexam(), everything works as expected except for the arrow keys, which crash the program with an XPA Exception. Here is the launch sequence from my script:

viewer = imexam.connect('myds9')
time.sleep(3)
viewer.load_fits('20121116.09.073.o.fits')
viewer.scale()
viewer.zoomtofit()
inp = viewer.imexam()

And here is the error I get when I use an arrow key in DS9:

Traceback (most recent call last):
File "/Users/eliothalley/Astronomy/test.py", line 59, in
inp = viewer.imexam()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imexam/connect.py", line 150, in imexam
self._run_imexam()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imexam/connect.py", line 252, in _run_imexam
self.cursor(x=x, y=y)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imexam/connect.py", line 348, in cursor
self.window.cursor(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imexam/ds9_viewer.py", line 931, in cursor
self.set("cursor {0:s} {1:s}".format(str(x), str(y)))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imexam/ds9_viewer.py", line 667, in set
self.xpa.set(param, buf)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/imexam/xpa_wrap.py", line 18, in set
super(XPA, self).set(param.encode('utf-8', 'strict'), buf)
File "wrappers/xpa.pyx", line 177, in imexam.imexamxpa.xpa.set
File "wrappers/xpa.pyx", line 147, in imexam.imexamxpa._set
imexam.imexamxpa.XpaException: b'XPA$ERROR parse error, expecting: integer, found 485.23958 (DS9:myds9 7f000001:54597)\n'

Let me know if any other info would be helpful!

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