ginga
ginga copied to clipboard
Drag and drop doesn't work on qt/example2.py when running Windows
When running qt/example2.py in the ginga folder, dragging and dropping a FITS image doesn't work. I think this is because an aberrant character is inserted into the filename by the drag and drop handler (in between the disk volume C: and the start of the filename proper). When the file is loaded using the "Open File" button the example works correctly. Here is some diagnostic output.
(base) C:\Users\abrah\Temporary\ginga>python ginga/examples/qt/example2_qt.py --loglevel=20 --stderr
2020-04-10 17:05:30,749 | W | ImageView.py:2151 (_scale_to) | Error in scaling: window size undefined
2020-04-10 17:05:30,750 | W | ImageView.py:2151 (_scale_to) | Error in scaling: window size undefined
2020-04-10 17:05:37,917 | E | Callback.py:172 (_do_callbacks) | Error making callback 'drag-drop': File does not appear to be on disk: file:///C:/C%3A/Users/abrah/Desktop/master_83F010612_flat.fits
2020-04-10 17:05:37,917 | E | Callback.py:173 (_do_callbacks) | Traceback:
File "C:\Users\abrah\Anaconda3\lib\site-packages\ginga\misc\Callback.py", line 156, in _do_callbacks
res = method(*cb_args, **cb_kwargs)
File "ginga/examples/qt/example2_qt.py", line 199, in drop_file_cb
self.load_file(fileName)
File "ginga/examples/qt/example2_qt.py", line 182, in load_file
image = load_data(filepath, logger=self.logger)
File "C:\Users\abrah\Anaconda3\lib\site-packages\ginga\util\loader.py", line 67, in load_data
with opener.open_file(filepath) as opn_f:
File "C:\Users\abrah\Anaconda3\lib\site-packages\ginga\util\io_fits.py", line 307, in open_file
info.url))
2020-04-10 17:05:50,196 | I | example2_qt.py:264 (quit) | Attempting to shut down the application...