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

odd crash, apparently unicode-related. #17

Open
mperrin opened this issue Aug 10, 2017 · 10 comments
Open

odd crash, apparently unicode-related. #17

mperrin opened this issue Aug 10, 2017 · 10 comments

Comments

@mperrin
Copy link

mperrin commented Aug 10, 2017

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
Copy link

josePhoenix commented Aug 10, 2017 via email

@mperrin
Copy link
Author

mperrin commented Jan 26, 2018

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

@mperrin
Copy link
Author

mperrin commented Jan 26, 2018

@kjbrooks possible this is the crash you just saw?

@kjbrooks
Copy link

Yes, this is the crash I saw.

@juliengirard
Copy link

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

@kjbrooks
Copy link

kjbrooks commented Aug 13, 2019

@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
Copy link

@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
Copy link

kjbrooks commented Aug 13, 2019

@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
Copy link

juliengirard commented Aug 13, 2019

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
Copy link

PatrickOgle commented Jan 6, 2020

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

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

5 participants