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

Overriding stdout in IndentPrint causes crashing #130

Open
danlm opened this issue Jul 16, 2018 · 4 comments
Open

Overriding stdout in IndentPrint causes crashing #130

danlm opened this issue Jul 16, 2018 · 4 comments

Comments

@danlm
Copy link

danlm commented Jul 16, 2018

Cause: When running the ui in Python 3.4, Artemis crashes when I enter "h" (for help) or try to delete a run:

CAUGHT: 'IndentPrint' object has no attribute 'errors' Traceback (most recent call last): File "demo_experiments.py", line 101, in <module> demo_linear_regression.browse(display_format="flat") File "artemis/artemis/experiments/experiments.py", line 328, in browse display_format=display_format, **kwargs) File "artemis/artemis/experiments/ui.py", line 77, in browse_experiments browser.launch(command=command) File "artemis/artemis/experiments/ui.py", line 321, in launch out = func_dict[cmd](*args) File "artemis/artemis/experiments/ui.py", line 497, in help _warn_with_prompt(self.HELP_TEXT, prompt = 'Press Enter to exit help.', use_prompt=not self.close_after) File "artemis/artemis/experiments/ui.py", line 51, in _warn_with_prompt resp = input('({}) >> '.format(prompt)) AttributeError: 'IndentPrint' object has no attribute 'errors'

I found that commenting out line 263 in artemis/general/display.py (overriding sys.stdout) gets rid of the crashes.

@petered
Copy link
Contributor

petered commented Jul 17, 2018

Hmm, I tried running demo_experiments.py on the current master and can't reproduce this error (either by pressing h or deleting a run). I'm in Python 3.6 but I doubt that matters. You're not working within a Jupyter notebook are you? (I guess not by the looks of your message).

@danlm
Copy link
Author

danlm commented Jul 18, 2018

Nope, I am running from .browse(). I think the version may matter: I ran the Artemis v2.0.0 on another system using Python 3.6, and I did not get this error.

@petered
Copy link
Contributor

petered commented Jul 18, 2018

Huh, so maybe it's just a Python 3.4 thing. Anyway, can you see if this: #133 fixes your issue?

@danlm
Copy link
Author

danlm commented Jul 21, 2018

No luck with the issue_fix branch - Artemis still crashes if the line is not commented out.

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

2 participants