ericmandel/pyds9

Resource exhastion?

Closed this issue · 2 comments

After thousands times creating regions with group tag, and then deleting them, I got the following backtrace:

petr@kubanekp-ntb:~/rts2/python$ ./rts2-shiftautofoc -p ../checks/data/0108.FOCUS.fits
XPA client connect: Cannot assign requested address
Traceback (most recent call last):
File "./rts2-shiftautofoc", line 37, in
sc.run_on_image(f.name, None, True)
File "/home/petr/rts2/python/rts2/shiftstore.py", line 319, in run_on_image
b = self.find_row_objects(x, partial_len)
File "/home/petr/rts2/python/rts2/shiftstore.py", line 248, in find_row_objects
ret = self.test_objects(x, can, i, otherc, partial_len)
File "/home/petr/rts2/python/rts2/shiftstore.py", line 144, in test_objects
'point=box 20 color=yellow tag={can}'
File "/home/petr/rts2/python/rts2/shiftstore.py", line 101, in plot_point
__plot(x[i], y[i], args)
File "/home/petr/rts2/python/rts2/shiftstore.py", line 94, in __plot
'physical; point {0} {1} # {2}'.format(x, y, args)
File "/home/petr/.local/lib/python3.6/site-packages/pyds9.py", line 578, in set
s, blen, 1)
File "/home/petr/.local/lib/python3.6/site-packages/xpa.py", line 173, in xpaset
raise ValueError(errmsg)
ValueError: XPA$ERROR: can't connect to data chan (?:?)

That point probably to resource exhaustion?

That was it. It should be probably noted in the doc that this is legal and will work:

d=pyds9.DS9()
regions=['physical; point 10 20 # color=yellow', 'physical; point 30 40 # color=red']
d.set('regions', '\n'.join(regions))