spacetelescope / jwst_coronagraph_visibility

Visualize approximate pointing constraints for JWST coronagraphs.
https://github.com/spacetelescope/jwst_visibility/blob/master/docs/index.rst
BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

odd crash, apparently unicode-related. #17

Open mperrin opened 7 years ago

mperrin commented 7 years ago

Twice just now I've had the CTVT crash and die for no apparent reason. The crashes occurred once when I was clicking in the window to position the companion at a given roll angle, and once when I clicked on the 'zoom to fit' button.

The error traceback is pretty unhelpful:

> jwst-coronagraph-visibility-gui
Traceback (most recent call last):
  File "/Users/mperrin/software/miniconda3/envs/astroconda/bin/jwst-coronagraph-visibility-gui", line 11, in <module>
    load_entry_point('jwst-coronagraph-visibility==0.3.0', 'gui_scripts', 'jwst-coronagraph-visibility-gui')()
  File "/Users/mperrin/software/miniconda3/envs/astroconda/lib/python3.5/site-packages/jwst_coronagraph_visibility/gui.py", line 1257, in run
    app.start()
  File "/Users/mperrin/software/miniconda3/envs/astroconda/lib/python3.5/site-packages/jwst_coronagraph_visibility/gui.py", line 335, in start
    self.root.mainloop()
  File "/Users/mperrin/software/miniconda3/envs/astroconda/lib/python3.5/tkinter/__init__.py", line 1140, in mainloop
    self.tk.mainloop(n)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

This is on an iMac running Sierra, Python 3.5, tinter 0.3.1, with a pretty standard astroconda setup.

josePhoenix commented 7 years ago

That... should be fixed? Make sure you have the latest versions of everything? The version of Tk bundled with anaconda was incompatible with Python3 due to a lack of support for mouse scroll events which was fixed at some point. I think.

On Wed, Aug 9, 2017 at 10:22 PM -0400, "Marshall Perrin" notifications@github.com<mailto:notifications@github.com> wrote:

Twice just now I've had the CTVT crash and die for no apparent reason. The crashes occurred once when I was clicking in the window to position the companion at a given roll angle, and once when I clicked on the 'zoom to fit' button.

The error traceback is pretty unhelpful:

jwst-coronagraph-visibility-gui Traceback (most recent call last): File "/Users/mperrin/software/miniconda3/envs/astroconda/bin/jwst-coronagraph-visibility-gui", line 11, in load_entry_point('jwst-coronagraph-visibility==0.3.0', 'gui_scripts', 'jwst-coronagraph-visibility-gui')() File "/Users/mperrin/software/miniconda3/envs/astroconda/lib/python3.5/site-packages/jwst_coronagraph_visibility/gui.py", line 1257, in run app.start() File "/Users/mperrin/software/miniconda3/envs/astroconda/lib/python3.5/site-packages/jwst_coronagraph_visibility/gui.py", line 335, in start self.root.mainloop() File "/Users/mperrin/software/miniconda3/envs/astroconda/lib/python3.5/tkinter/init.py", line 1140, in mainloop self.tk.mainloop(n) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

This is on an iMac running Sierra, Python 3.5, tinter 0.3.1, with a pretty standard astroconda setup.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/spacetelescope/jwst_coronagraph_visibility/issues/17, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAKjVoIdxssibxFQd7Z78cpWDZ7x8VViks5sWmlngaJpZM4Oy3Pp.

mperrin commented 6 years ago

@juliengirard is it possible this is the crash you were seeing?

mperrin commented 6 years ago

@kjbrooks possible this is the crash you just saw?

kjbrooks commented 6 years ago

Yes, this is the crash I saw.

juliengirard commented 5 years ago

Since I restarted to use the CVT in 2019, I haven't experienced any crash, have you?

kjbrooks commented 5 years ago

@juliengirard how are you running this? I barely remember doing this and when I tried to run it today, I got an error. It wasn't the same error as the one that Marshall posted above though.

juliengirard commented 5 years ago

@kjbrooks in this case I use the MacOS app https://jwst-docs.stsci.edu/other-tools/target-visibility-tools/jwst-coronagraphic-visibility-tool-help

If you're running macOS and want a double-clickable app:

Download the double-clickable app archive (e.g. jwst_coronagraph_visibility_calculator_macos_v0.1.0.zip) from https://github.com/spacetelescope/jwst_coronagraph_visibility/releases/latest Extract the .zip file to get the .app bundle Double-click the .app bundle

kjbrooks commented 5 years ago

@juliengirard I cannot get the app to work for me. I double click on it but nothing happens. And, if I try running it from the command line with the jwst-coronagraph-visibility-gui command, I get the following error:

Traceback (most recent call last):
  File "/Users/kbrooks/miniconda2/envs/astroconda3/bin/jwst-coronagraph-visibility-gui", line 11, in <module>
    load_entry_point('jwst-coronagraph-visibility', 'gui_scripts', 'jwst-coronagraph-visibility-gui')()
  File "/Users/kbrooks/miniconda2/envs/astroconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/kbrooks/miniconda2/envs/astroconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
    return ep.load()
  File "/Users/kbrooks/miniconda2/envs/astroconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/Users/kbrooks/miniconda2/envs/astroconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/kbrooks/git_repos/jwst_coronagraph_visibility-0.3.0/jwst_coronagraph_visibility/gui.py", line 29, in <module>
    from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
ImportError: cannot import name 'NavigationToolbar2TkAgg'

I fully recognize that this is probably an issue on my end at this point. If others can get it working, I am happy to have this issue closed and to sit down with you at some point to troubleshoot why it isn't working for me. (I also don't use this tool, really, ever, so I'm not sure if it even matters).

juliengirard commented 5 years ago

It used to work in command line but not anymore...

On python 3.5, I get `(astroconda) polychromatic:pandeia-coronagraphy jgirard$ jwst-coronagraph-visibility-gui & [1] 65368 (astroconda) polychromatic:pandeia-coronagraphy jgirard$ Traceback (most recent call last): File "/Users/jgirard/miniconda3/envs/astroconda/bin/jwst-coronagraph-visibility-gui", line 6, in from pkg_resources import load_entry_point ImportError: No module named 'pkg_resources'

`

On python 2.7, I have issues with Tkinter

(astroconda27) polychromatic:pandeia-coronagraphy jgirard$ jwst-coronagraph-visibility-gui & [1] 67191 (astroconda27) polychromatic:pandeia-coronagraphy jgirard$ Traceback (most recent call last): File "/Users/jgirard/miniconda3/envs/astroconda27/bin/jwst-coronagraph-visibility-gui", line 11, in <module> load_entry_point('jwst-coronagraph-visibility==0.3.0', 'gui_scripts', 'jwst-coronagraph-visibility-gui')() File "/Users/jgirard/miniconda3/envs/astroconda27/lib/python2.7/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/Users/jgirard/miniconda3/envs/astroconda27/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2691, in load_entry_point return ep.load() File "/Users/jgirard/miniconda3/envs/astroconda27/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2322, in load return self.resolve() File "/Users/jgirard/miniconda3/envs/astroconda27/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2328, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/Users/jgirard/miniconda3/envs/astroconda27/lib/python2.7/site-packages/jwst_coronagraph_visibility/gui.py", line 9, in <module> from Tkinter import * ImportError: No module named Tkinter pip install tkinter DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting tkinter ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none) ERROR: No matching distribution found for tkinter [1]+ Exit 1 jwst-coronagraph-visibility-gui

PatrickOgle commented 4 years ago

The CVT gui is still crashing with Unicode errors in python 3.5. This happens sometimes when clicking the plot windows or the magnify tool:

Traceback (most recent call last): File "/Users/pogle/miniconda3/envs/astroconda/bin/jwst-coronagraph-visibility-gui", line 8, in sys.exit(run()) File "/Users/pogle/miniconda3/envs/astroconda/lib/python3.5/site-packages/jwst_coronagraph_visibility/gui.py", line 1273, in run app.start() File "/Users/pogle/miniconda3/envs/astroconda/lib/python3.5/site-packages/jwst_coronagraph_visibility/gui.py", line 339, in start self.root.mainloop() File "/Users/pogle/miniconda3/envs/astroconda/lib/python3.5/tkinter/init.py", line 1131, in mainloop self.tk.mainloop(n) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte (astroconda) bash-3.2$ jwst-coronagraph-visibility-gui Traceback (most recent call last): File "/Users/pogle/miniconda3/envs/astroconda/bin/jwst-coronagraph-visibility-gui", line 8, in sys.exit(run()) File "/Users/pogle/miniconda3/envs/astroconda/lib/python3.5/site-packages/jwst_coronagraph_visibility/gui.py", line 1273, in run app.start() File "/Users/pogle/miniconda3/envs/astroconda/lib/python3.5/site-packages/jwst_coronagraph_visibility/gui.py", line 339, in start self.root.mainloop() File "/Users/pogle/miniconda3/envs/astroconda/lib/python3.5/tkinter/init.py", line 1131, in mainloop self.tk.mainloop(n) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte