Skip to content

Overriding stdout in IndentPrint causes crashing #130

Open

Description

@danlm

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.

Activity

  1. petered commented on Jul 17, 2018

    @petered
    Contributor

    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).

  2. danlm commented on Jul 18, 2018

    @danlm
    Author

    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.

  3. petered commented on Jul 18, 2018

    @petered
    Contributor

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

  4. danlm commented on Jul 21, 2018

    @danlm
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions