gurudesh/pytracebugs huggingface dataset:
# Buggy code
def load(self, phrase):
    self.currentPhrase = phrase
    self.phraseText.setPlainText(phrase.phrase)
    self.showInTrayCheckbox.setChecked(phrase.show_in_tray_menu)

    for k, v in model.SEND_MODES.items():
        if v == phrase.sendMode:
            self.sendModeCombo.setCurrentIndex(self.sendModeCombo.findText(k))
            break

    if self.is_new_item():
        self.urlLabel.setEnabled(False)
        self.urlLabel.setText("(Unsaved)")  # TODO: i18n
    else:
        ui_common.set_url_label(self.urlLabel, self.currentPhrase.path)

    # TODO - re-enable me if restoring predictive functionality
    # self.predictCheckbox.setChecked(model.TriggerMode.PREDICTIVE in phrase.modes)

    self.promptCheckbox.setChecked(phrase.prompt)
    self.settingsWidget.load(phrase)


# Traceback (IndexError)
2019-05-21 21:45:48,995 DEBUG - service - Raw key: 's', modifiers: [<Key.CONTROL: '<ctrl>'>], Key: s
2019-05-21 21:45:48,995 DEBUG - root.Qt-GUI.System-tray-notifier - Show tray icon enabled in settings: True
2019-05-21 21:45:48,997 DEBUG - service - Window visible title: 'AutoKey', Window class: 'autokey-qt.autokey-qt'
2019-05-21 21:45:48,997 INFO - root.Qt-GUI.System-tray-notifier - Rebuilding model item actions, adding all items marked for access through the tray icon.
2019-05-21 21:45:48,998 DEBUG - phrase-menu - Sorting phrase menu by usage count
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/autokey/qtui/centralwidget.py", line 402, in on_save
item = self.treeWidget.selectedItems()[0]
IndexError: list index out of range
Fatal Python error: Aborted

# Fixed code
def load(self, phrase: model.Phrase):
    self.current_phrase = phrase
    self.phraseText.setPlainText(phrase.phrase)
    self.showInTrayCheckbox.setChecked(phrase.show_in_tray_menu)

    for k, v in model.SEND_MODES.items():
        if v == phrase.sendMode:
            self.sendModeCombo.setCurrentIndex(self.sendModeCombo.findText(k))
            break

    if self.is_new_item():
        self.urlLabel.setEnabled(False)
        self.urlLabel.setText("(Unsaved)")  # TODO: i18n
    else:
        ui_common.set_url_label(self.urlLabel, self.current_phrase.path)

    # TODO - re-enable me if restoring predictive functionality
    # self.predictCheckbox.setChecked(model.TriggerMode.PREDICTIVE in phrase.modes)

    self.promptCheckbox.setChecked(phrase.prompt)
    self.settingsWidget.load(phrase)
# Buggy code
def save(self):
    self.settingsWidget.save()
    self.currentPhrase.phrase = str(self.phraseText.toPlainText())
    self.currentPhrase.show_in_tray_menu = self.showInTrayCheckbox.isChecked()

    self.currentPhrase.sendMode = model.SEND_MODES[
        str(self.sendModeCombo.currentText())
    ]

    # TODO - re-enable me if restoring predictive functionality
    # if self.predictCheckbox.isChecked():
    #    self.currentPhrase.modes.append(model.TriggerMode.PREDICTIVE)

    self.currentPhrase.prompt = self.promptCheckbox.isChecked()

    self.currentPhrase.persist()
    ui_common.set_url_label(self.urlLabel, self.currentPhrase.path)
    return False


# Traceback (IndexError)
2019-05-21 21:45:48,995 DEBUG - service - Raw key: 's', modifiers: [<Key.CONTROL: '<ctrl>'>], Key: s
2019-05-21 21:45:48,995 DEBUG - root.Qt-GUI.System-tray-notifier - Show tray icon enabled in settings: True
2019-05-21 21:45:48,997 DEBUG - service - Window visible title: 'AutoKey', Window class: 'autokey-qt.autokey-qt'
2019-05-21 21:45:48,997 INFO - root.Qt-GUI.System-tray-notifier - Rebuilding model item actions, adding all items marked for access through the tray icon.
2019-05-21 21:45:48,998 DEBUG - phrase-menu - Sorting phrase menu by usage count
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/autokey/qtui/centralwidget.py", line 402, in on_save
item = self.treeWidget.selectedItems()[0]
IndexError: list index out of range
Fatal Python error: Aborted

# Fixed code
def save(self):
    self.settingsWidget.save()
    self.current_phrase.phrase = str(self.phraseText.toPlainText())
    self.current_phrase.show_in_tray_menu = self.showInTrayCheckbox.isChecked()

    self.current_phrase.sendMode = model.SEND_MODES[
        str(self.sendModeCombo.currentText())
    ]

    # TODO - re-enable me if restoring predictive functionality
    # if self.predictCheckbox.isChecked():
    #    self.currentPhrase.modes.append(model.TriggerMode.PREDICTIVE)

    self.current_phrase.prompt = self.promptCheckbox.isChecked()

    self.current_phrase.persist()
    ui_common.set_url_label(self.urlLabel, self.current_phrase.path)
    return False
# Buggy code
def set_item_title(self, title):
    self.currentPhrase.description = title


# Traceback (IndexError)
2019-05-21 21:45:48,995 DEBUG - service - Raw key: 's', modifiers: [<Key.CONTROL: '<ctrl>'>], Key: s
2019-05-21 21:45:48,995 DEBUG - root.Qt-GUI.System-tray-notifier - Show tray icon enabled in settings: True
2019-05-21 21:45:48,997 DEBUG - service - Window visible title: 'AutoKey', Window class: 'autokey-qt.autokey-qt'
2019-05-21 21:45:48,997 INFO - root.Qt-GUI.System-tray-notifier - Rebuilding model item actions, adding all items marked for access through the tray icon.
2019-05-21 21:45:48,998 DEBUG - phrase-menu - Sorting phrase menu by usage count
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/autokey/qtui/centralwidget.py", line 402, in on_save
item = self.treeWidget.selectedItems()[0]
IndexError: list index out of range
Fatal Python error: Aborted

# Fixed code
def set_item_title(self, title):
    self.current_phrase.description = title
# Buggy code
def rebuild_item_path(self):
    self.currentPhrase.rebuild_path()


# Traceback (IndexError)
2019-05-21 21:45:48,995 DEBUG - service - Raw key: 's', modifiers: [<Key.CONTROL: '<ctrl>'>], Key: s
2019-05-21 21:45:48,995 DEBUG - root.Qt-GUI.System-tray-notifier - Show tray icon enabled in settings: True
2019-05-21 21:45:48,997 DEBUG - service - Window visible title: 'AutoKey', Window class: 'autokey-qt.autokey-qt'
2019-05-21 21:45:48,997 INFO - root.Qt-GUI.System-tray-notifier - Rebuilding model item actions, adding all items marked for access through the tray icon.
2019-05-21 21:45:48,998 DEBUG - phrase-menu - Sorting phrase menu by usage count
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/autokey/qtui/centralwidget.py", line 402, in on_save
item = self.treeWidget.selectedItems()[0]
IndexError: list index out of range
Fatal Python error: Aborted

# Fixed code
def rebuild_item_path(self):
    self.current_phrase.rebuild_path()
# Buggy code
def is_new_item(self):
    return self.currentPhrase.path is None


# Traceback (IndexError)
2019-05-21 21:45:48,995 DEBUG - service - Raw key: 's', modifiers: [<Key.CONTROL: '<ctrl>'>], Key: s
2019-05-21 21:45:48,995 DEBUG - root.Qt-GUI.System-tray-notifier - Show tray icon enabled in settings: True
2019-05-21 21:45:48,997 DEBUG - service - Window visible title: 'AutoKey', Window class: 'autokey-qt.autokey-qt'
2019-05-21 21:45:48,997 INFO - root.Qt-GUI.System-tray-notifier - Rebuilding model item actions, adding all items marked for access through the tray icon.
2019-05-21 21:45:48,998 DEBUG - phrase-menu - Sorting phrase menu by usage count
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/autokey/qtui/centralwidget.py", line 402, in on_save
item = self.treeWidget.selectedItems()[0]
IndexError: list index out of range
Fatal Python error: Aborted

# Fixed code
def is_new_item(self):
    return self.current_phrase.path is None
# Buggy code
def reset(self):
    self.load(self.currentPhrase)


# Traceback (IndexError)
2019-05-21 21:45:48,995 DEBUG - service - Raw key: 's', modifiers: [<Key.CONTROL: '<ctrl>'>], Key: s
2019-05-21 21:45:48,995 DEBUG - root.Qt-GUI.System-tray-notifier - Show tray icon enabled in settings: True
2019-05-21 21:45:48,997 DEBUG - service - Window visible title: 'AutoKey', Window class: 'autokey-qt.autokey-qt'
2019-05-21 21:45:48,997 INFO - root.Qt-GUI.System-tray-notifier - Rebuilding model item actions, adding all items marked for access through the tray icon.
2019-05-21 21:45:48,998 DEBUG - phrase-menu - Sorting phrase menu by usage count
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/autokey/qtui/centralwidget.py", line 402, in on_save
item = self.treeWidget.selectedItems()[0]
IndexError: list index out of range
Fatal Python error: Aborted

# Fixed code
def reset(self):
    self.load(self.current_phrase)
# Buggy code
def on_show_error(self, widget, data=None):
    self.app.show_script_error(self.app.configWindow.ui)
    self.errorItem.hide()
    self.update_visible_status()


# Traceback (AttributeError)
Traceback (most recent call last):
File '~/autokey/gtkui/notifier.py", line 140, in on_show_error
self.app.show_script_error(self.app.configWindow.ui)
AttributeError: 'NoneType' object has no attribute 'ui'

# Fixed code
def on_show_error(self, widget, data=None):
    self.on_show_configure(widget, data)
    self.app.show_script_error(self.app.configWindow.ui)
    self.errorItem.hide()
    self.update_visible_status()
# Buggy code
def create_argv(
    self, pex_path: str, *args: str, always_use_shebang: bool = False
) -> Iterable[str]:
    argv = (
        [self.bootstrap_python]
        if self.bootstrap_python and not always_use_shebang
        else []
    )
    argv.extend((pex_path, *args))
    return argv


# Traceback (pants.engine.internals.scheduler.ExecutionError)
$ ./pants fmt src/python/pants::
Compiling engine v0.0.1 (XXX)
Finished release [optimized + debuginfo] target(s) in 2m 49s
12:11:49 [INFO] initializing pantsd...
12:12:00 [INFO] pantsd initialized.
12:12:08.46 [INFO] Completed: Building black.pex with 2 requirements: black==19.10b0, setuptools
12:12:08 [WARN] /Users/tdyas/TC/pants/src/python/pants/base/exception_sink.py:359: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.getproctitle(),

12:12:08 [ERROR] 1 Exception encountered:

Engine traceback:
in select
in `fmt` goal
in pants.backend.python.lint.python_fmt.format_python_target
in Format with Black
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "XXX/pants/src/python/pants/engine/process.py", line 229, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Run Black on 413 files.' failed with exit code 127.
stdout:

stderr:
env: python3.7: No such file or directory

Traceback (most recent call last):
File "XXX/pants/src/python/pants/bin/local_pants_runner.py", line 255, in run
engine_result = self._run_v2()
File "XXX/pants/src/python/pants/bin/local_pants_runner.py", line 166, in _run_v2
return self._maybe_run_v2_body(goals, poll=False)
File "XXX/pants/src/python/pants/bin/local_pants_runner.py", line 183, in _maybe_run_v2_body
return self.graph_session.run_goal_rules(
File "XXX/pants/src/python/pants/init/engine_initializer.py", line 117, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "XXX/pants/src/python/pants/engine/internals/scheduler.py", line 552, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "XXX/pants/src/python/pants/engine/internals/scheduler.py", line 511, in _raise_on_error
raise ExecutionError(
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:

Engine traceback:
in select
in `fmt` goal
in pants.backend.python.lint.python_fmt.format_python_target
in Format with Black
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "XXX/pants/src/python/pants/engine/process.py", line 229, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Run Black on 413 files.' failed with exit code 127.
stdout:

stderr:
env: python3.7: No such file or directory

# Fixed code
def create_argv(
    self, pex_path: str, *args: str, python: Optional[PythonExecutable] = None
) -> Iterable[str]:
    python = python or self.bootstrap_python
    argv = [python.path] if python else []
    argv.extend((pex_path, *args))
    return argv
# Buggy code
def first_python_binary() -> Optional[str]:
    for binary_paths in all_python_binary_paths:
        if binary_paths.first_path:
            return binary_paths.first_path.path
    return None


# Traceback (pants.engine.internals.scheduler.ExecutionError)
$ ./pants fmt src/python/pants::
Compiling engine v0.0.1 (XXX)
Finished release [optimized + debuginfo] target(s) in 2m 49s
12:11:49 [INFO] initializing pantsd...
12:12:00 [INFO] pantsd initialized.
12:12:08.46 [INFO] Completed: Building black.pex with 2 requirements: black==19.10b0, setuptools
12:12:08 [WARN] /Users/tdyas/TC/pants/src/python/pants/base/exception_sink.py:359: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.getproctitle(),

12:12:08 [ERROR] 1 Exception encountered:

Engine traceback:
in select
in `fmt` goal
in pants.backend.python.lint.python_fmt.format_python_target
in Format with Black
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "XXX/pants/src/python/pants/engine/process.py", line 229, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Run Black on 413 files.' failed with exit code 127.
stdout:

stderr:
env: python3.7: No such file or directory

Traceback (most recent call last):
File "XXX/pants/src/python/pants/bin/local_pants_runner.py", line 255, in run
engine_result = self._run_v2()
File "XXX/pants/src/python/pants/bin/local_pants_runner.py", line 166, in _run_v2
return self._maybe_run_v2_body(goals, poll=False)
File "XXX/pants/src/python/pants/bin/local_pants_runner.py", line 183, in _maybe_run_v2_body
return self.graph_session.run_goal_rules(
File "XXX/pants/src/python/pants/init/engine_initializer.py", line 117, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "XXX/pants/src/python/pants/engine/internals/scheduler.py", line 552, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "XXX/pants/src/python/pants/engine/internals/scheduler.py", line 511, in _raise_on_error
raise ExecutionError(
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:

Engine traceback:
in select
in `fmt` goal
in pants.backend.python.lint.python_fmt.format_python_target
in Format with Black
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "XXX/pants/src/python/pants/engine/process.py", line 229, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Run Black on 413 files.' failed with exit code 127.
stdout:

stderr:
env: python3.7: No such file or directory

# Fixed code
def first_python_binary() -> Optional[PythonExecutable]:
    for binary_paths in all_python_binary_paths:
        if binary_paths.first_path:
            return PythonExecutable(
                path=binary_paths.first_path.path,
                fingerprint=binary_paths.first_path.fingerprint,
            )
    return None
# Buggy code
def __init__(
    self,
    *,
    search_path: Iterable[str],
    binary_name: str,
    test_args: Optional[Iterable[str]] = None,
) -> None:
    self.search_path = tuple(OrderedSet(search_path))
    self.binary_name = binary_name
    self.test_args = tuple(test_args or ())


# Traceback (pants.engine.internals.scheduler.ExecutionError)
$ ./pants fmt src/python/pants::
Compiling engine v0.0.1 (XXX)
Finished release [optimized + debuginfo] target(s) in 2m 49s
12:11:49 [INFO] initializing pantsd...
12:12:00 [INFO] pantsd initialized.
12:12:08.46 [INFO] Completed: Building black.pex with 2 requirements: black==19.10b0, setuptools
12:12:08 [WARN] /Users/tdyas/TC/pants/src/python/pants/base/exception_sink.py:359: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.getproctitle(),

12:12:08 [ERROR] 1 Exception encountered:

Engine traceback:
in select
in `fmt` goal
in pants.backend.python.lint.python_fmt.format_python_target
in Format with Black
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "XXX/pants/src/python/pants/engine/process.py", line 229, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Run Black on 413 files.' failed with exit code 127.
stdout:

stderr:
env: python3.7: No such file or directory

Traceback (most recent call last):
File "XXX/pants/src/python/pants/bin/local_pants_runner.py", line 255, in run
engine_result = self._run_v2()
File "XXX/pants/src/python/pants/bin/local_pants_runner.py", line 166, in _run_v2
return self._maybe_run_v2_body(goals, poll=False)
File "XXX/pants/src/python/pants/bin/local_pants_runner.py", line 183, in _maybe_run_v2_body
return self.graph_session.run_goal_rules(
File "XXX/pants/src/python/pants/init/engine_initializer.py", line 117, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "XXX/pants/src/python/pants/engine/internals/scheduler.py", line 552, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "XXX/pants/src/python/pants/engine/internals/scheduler.py", line 511, in _raise_on_error
raise ExecutionError(
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:

Engine traceback:
in select
in `fmt` goal
in pants.backend.python.lint.python_fmt.format_python_target
in Format with Black
in pants.engine.process.fallible_to_exec_result_or_raise
Traceback (most recent call last):
File "XXX/pants/src/python/pants/engine/process.py", line 229, in fallible_to_exec_result_or_raise
raise ProcessExecutionFailure(
pants.engine.process.ProcessExecutionFailure: Process 'Run Black on 413 files.' failed with exit code 127.
stdout:

stderr:
env: python3.7: No such file or directory

# Fixed code
def __init__(
    self,
    *,
    search_path: Iterable[str],
    binary_name: str,
    test: Optional[BinaryPathTest] = None,
) -> None:
    self.search_path = tuple(OrderedSet(search_path))
    self.binary_name = binary_name
    self.test = test
# Buggy code
def garbage_collect_store(self):
    self._native.lib.garbage_collect_store(self._scheduler)


# Traceback (pants.engine.internals.scheduler.ExecutionError)
18:08:49.83 [WARN] <unknown>:882: DeprecationWarning: invalid escape sequence \d
18:08:52.21 [WARN] Completed: Find PEX Python - No bootstrap Python executable could be found from the option `interpreter_search_paths` in the `[python-setup]` scope. Will attempt to run PEXes directly.
18:08:53.11 [WARN] /data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:359: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.getproctitle(),

18:08:53.11 [ERROR] 1 Exception encountered:

Engine traceback:
in select
in `binary` goal
in pants.backend.python.rules.create_python_binary.create_python_binary
in pants.backend.python.rules.pex.two_step_create_pex
in pants.backend.python.rules.pex.create_pex
Traceback (no traceback):
<pants native internals>
Exception: String("Digest Digest(Fingerprint<97adba2ad1bfef3ba1b37d6b119e15498ed2a60392241b5ea7c28c602826dd6c>, 97) did not exist in the Store.")
Traceback (most recent call last):
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 255, in run
engine_result = self._run_v2()
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 166, in _run_v2
return self._maybe_run_v2_body(goals, poll=False)
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 183, in _maybe_run_v2_body
return self.graph_session.run_goal_rules(
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/init/engine_initializer.py", line 130, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 561, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 520, in _raise_on_error
raise ExecutionError(
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:

Engine traceback:
in select
in `binary` goal
in pants.backend.python.rules.create_python_binary.create_python_binary
in pants.backend.python.rules.pex.two_step_create_pex
in pants.backend.python.rules.pex.create_pex
Traceback (no traceback):
<pants native internals>
Exception: String("Digest Digest(Fingerprint<97adba2ad1bfef3ba1b37d6b119e15498ed2a60392241b5ea7c28c602826dd6c>, 97) did not exist in the Store.")

# Fixed code
def garbage_collect_store(self, target_size_bytes: int) -> None:
    self._native.lib.garbage_collect_store(self._scheduler, target_size_bytes)
# Buggy code
def garbage_collect_store(self):
    self._scheduler.garbage_collect_store()


# Traceback (pants.engine.internals.scheduler.ExecutionError)
18:08:49.83 [WARN] <unknown>:882: DeprecationWarning: invalid escape sequence \d
18:08:52.21 [WARN] Completed: Find PEX Python - No bootstrap Python executable could be found from the option `interpreter_search_paths` in the `[python-setup]` scope. Will attempt to run PEXes directly.
18:08:53.11 [WARN] /data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/base/exception_sink.py:359: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
process_title=setproctitle.getproctitle(),

18:08:53.11 [ERROR] 1 Exception encountered:

Engine traceback:
in select
in `binary` goal
in pants.backend.python.rules.create_python_binary.create_python_binary
in pants.backend.python.rules.pex.two_step_create_pex
in pants.backend.python.rules.pex.create_pex
Traceback (no traceback):
<pants native internals>
Exception: String("Digest Digest(Fingerprint<97adba2ad1bfef3ba1b37d6b119e15498ed2a60392241b5ea7c28c602826dd6c>, 97) did not exist in the Store.")
Traceback (most recent call last):
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 255, in run
engine_result = self._run_v2()
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 166, in _run_v2
return self._maybe_run_v2_body(goals, poll=False)
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/bin/local_pants_runner.py", line 183, in _maybe_run_v2_body
return self.graph_session.run_goal_rules(
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/init/engine_initializer.py", line 130, in run_goal_rules
exit_code = self.scheduler_session.run_goal_rule(
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 561, in run_goal_rule
self._raise_on_error([t for _, t in throws])
File "/data/home/asher/.cache/pants/setup/bootstrap-Linux-x86_64/2.0.0a1_py38/lib/python3.8/site-packages/pants/engine/internals/scheduler.py", line 520, in _raise_on_error
raise ExecutionError(
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:

Engine traceback:
in select
in `binary` goal
in pants.backend.python.rules.create_python_binary.create_python_binary
in pants.backend.python.rules.pex.two_step_create_pex
in pants.backend.python.rules.pex.create_pex
Traceback (no traceback):
<pants native internals>
Exception: String("Digest Digest(Fingerprint<97adba2ad1bfef3ba1b37d6b119e15498ed2a60392241b5ea7c28c602826dd6c>, 97) did not exist in the Store.")

# Fixed code
def garbage_collect_store(self, target_size_bytes: int) -> None:
    self._scheduler.garbage_collect_store(target_size_bytes)
# Buggy code
def _setup_interpreter(self, interpreter, cache_target_path):
    with safe_concurrent_creation(cache_target_path) as safe_path:
        os.mkdir(
            safe_path
        )  # Parent will already have been created by safe_concurrent_creation.
        os.symlink(interpreter.binary, os.path.join(safe_path, "python"))
        return self._resolve(interpreter, safe_path)


# Traceback (OSError)
os.path.exists(os.readlink('python'))
False
subprocess.Popen(['./python', 'blah'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/opt/twitter_mde/package/python2.7/current/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/opt/twitter_mde/package/python2.7/current/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

# Fixed code
def _setup_interpreter(self, interpreter, identity_str):
    cache_target_path = os.path.join(self._cache_dir, identity_str)
    with safe_concurrent_creation(cache_target_path) as safe_path:
        os.mkdir(
            safe_path
        )  # Parent will already have been created by safe_concurrent_creation.
        os.symlink(interpreter.binary, os.path.join(safe_path, "python"))
        return self._resolve(interpreter, safe_path)
# Buggy code
def _setup_cached(self, filters=()):
    """Find all currently-cached interpreters."""
    for interpreter_dir in os.listdir(self._cache_dir):
        path = os.path.join(self._cache_dir, interpreter_dir)
        if os.path.isdir(path):
            pi = self._interpreter_from_path(path, filters=filters)
            if pi:
                logger.debug(
                    "Detected interpreter {}: {}".format(pi.binary, str(pi.identity))
                )
                yield pi


# Traceback (OSError)
os.path.exists(os.readlink('python'))
False
subprocess.Popen(['./python', 'blah'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/opt/twitter_mde/package/python2.7/current/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/opt/twitter_mde/package/python2.7/current/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

# Fixed code
def _setup_cached(self, filters=()):
    """Find all currently-cached interpreters."""
    for interpreter_dir in os.listdir(self._cache_dir):
        pi = self._interpreter_from_relpath(interpreter_dir, filters=filters)
        if pi:
            logger.debug(
                "Detected interpreter {}: {}".format(pi.binary, str(pi.identity))
            )
            yield pi
# Buggy code
def _setup_paths(self, paths, filters=()):
    """Find interpreters under paths, and cache them."""
    for interpreter in self._matching(PythonInterpreter.all(paths), filters=filters):
        identity_str = str(interpreter.identity)
        cache_path = os.path.join(self._cache_dir, identity_str)
        pi = self._interpreter_from_path(cache_path, filters=filters)
        if pi is None:
            self._setup_interpreter(interpreter, cache_path)
            pi = self._interpreter_from_path(cache_path, filters=filters)
        if pi:
            yield pi


# Traceback (OSError)
os.path.exists(os.readlink('python'))
False
subprocess.Popen(['./python', 'blah'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/opt/twitter_mde/package/python2.7/current/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/opt/twitter_mde/package/python2.7/current/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

# Fixed code
def _setup_paths(self, paths, filters=()):
    """Find interpreters under paths, and cache them."""
    for interpreter in self._matching(PythonInterpreter.all(paths), filters=filters):
        identity_str = str(interpreter.identity)
        pi = self._interpreter_from_relpath(identity_str, filters=filters)
        if pi is None:
            self._setup_interpreter(interpreter, identity_str)
            pi = self._interpreter_from_relpath(identity_str, filters=filters)
        if pi:
            yield pi
# Buggy code
def __init__(self, logger, log_level, logger_stream):
    """
    :param logging.Logger logger: The logger instance to emit writes to.
    :param int log_level: The log level to use for the given logger.
    :param file logger_stream: The underlying file object the logger is writing to, for
                               determining the fileno to support faulthandler logging.
    """
    self._logger = logger
    self._log_level = log_level
    self._stream = logger_stream


# Traceback (ValueError)
F0117 15:10:04.500231 12664 process_manager.py:463] Traceback (most recent call last):
File "/Users/redacted/.pex/install/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl.ac6c80da047e6ed09228262b774906b65ebf6918/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl/pants/pantsd/process_manager.py", line 461, in daemonize
self.post_fork_child(**post_fork_child_opts or {})
File "/Users/redacted/.pex/install/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl.ac6c80da047e6ed09228262b774906b65ebf6918/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl/pants/bin/daemon_pants_runner.py", line 172, in post_fork_child
self._exiter.set_except_hook(sys.stderr)
File "/Users/redacted/.pex/install/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl.ac6c80da047e6ed09228262b774906b65ebf6918/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl/pants/base/exiter.py", line 123, in set_except_hook
self._setup_faulthandler(trace_stream or sys.stderr)
File "/Users/redacted/.pex/install/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl.ac6c80da047e6ed09228262b774906b65ebf6918/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl/pants/base/exiter.py", line 117, in _setup_faulthandler
faulthandler.enable(trace_stream)
File "/Users/redacted/.pex/install/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl.ac6c80da047e6ed09228262b774906b65ebf6918/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl/pants/pantsd/pants_daemon.py", line 61, in fileno
return self._stream.fileno()
ValueError: I/O operation on closed file

# Fixed code
def __init__(self, logger, log_level, handler):
    """
    :param logging.Logger logger: The logger instance to emit writes to.
    :param int log_level: The log level to use for the given logger.
    :param Handler handler: The underlying log handler, for determining the fileno
                            to support faulthandler logging.
    """
    self._logger = logger
    self._log_level = log_level
    self._handler = handler
# Buggy code
def fileno(self):
    return self._stream.fileno()


# Traceback (ValueError)
F0117 15:10:04.500231 12664 process_manager.py:463] Traceback (most recent call last):
File "/Users/redacted/.pex/install/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl.ac6c80da047e6ed09228262b774906b65ebf6918/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl/pants/pantsd/process_manager.py", line 461, in daemonize
self.post_fork_child(**post_fork_child_opts or {})
File "/Users/redacted/.pex/install/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl.ac6c80da047e6ed09228262b774906b65ebf6918/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl/pants/bin/daemon_pants_runner.py", line 172, in post_fork_child
self._exiter.set_except_hook(sys.stderr)
File "/Users/redacted/.pex/install/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl.ac6c80da047e6ed09228262b774906b65ebf6918/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl/pants/base/exiter.py", line 123, in set_except_hook
self._setup_faulthandler(trace_stream or sys.stderr)
File "/Users/redacted/.pex/install/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl.ac6c80da047e6ed09228262b774906b65ebf6918/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl/pants/base/exiter.py", line 117, in _setup_faulthandler
faulthandler.enable(trace_stream)
File "/Users/redacted/.pex/install/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl.ac6c80da047e6ed09228262b774906b65ebf6918/pantsbuild.pants-1.4.0.dev20+3346017507-cp27-none-macosx_10_8_x86_64.whl/pants/pantsd/pants_daemon.py", line 61, in fileno
return self._stream.fileno()
ValueError: I/O operation on closed file

# Fixed code
def fileno(self):
    return self._handler.stream.fileno()
# Buggy code
def create_graph(self, spec_roots):
    """Construct and return a BuildGraph given a set of input specs."""
    graph = self.legacy_graph_cls(self.scheduler, self.engine, self.symbol_table_cls)
    for _ in graph.inject_specs_closure(
        spec_roots
    ):  # Ensure the entire generator is unrolled.
        pass
    logger.debug("engine cache stats: %s", self.engine.cache_stats())
    logger.debug("build_graph is: %s", graph)
    return graph


# Traceback (AttributeError)
W0602 21:35:21.260252 22326 pailgun_service.py:69] encountered exception during SchedulerService.get_build_graph():
Traceback (most recent call last):
File "/home/travis/build/pantsbuild/pants/src/python/pants/pantsd/service/pailgun_service.py", line 65, in runner_factory
build_graph = self._scheduler_service.get_build_graph(spec_roots)
File "/home/travis/build/pantsbuild/pants/src/python/pants/pantsd/service/scheduler_service.py", line 84, in get_build_graph
return self._graph_helper.create_graph(spec_roots)
File "/home/travis/build/pantsbuild/pants/src/python/pants/bin/engine_initializer.py", line 64, in create_graph
for _ in graph.inject_specs_closure(spec_roots):  # Ensure the entire generator is unrolled.
File "/home/travis/build/pantsbuild/pants/src/python/pants/engine/legacy/graph.py", line 169, in inject_specs_closure
for address in self._inject(specs):
File "/home/travis/build/pantsbuild/pants/src/python/pants/engine/legacy/graph.py", line 185, in _inject
entries = maybe_list(state.value, expected_type=LegacyTarget)
AttributeError: 'NoneType' object has no attribute 'value'

# Fixed code
def create_graph(self, spec_roots):
    """Construct and return a BuildGraph given a set of input specs."""
    graph = self.legacy_graph_cls(self.scheduler, self.engine, self.symbol_table_cls)
    with self.scheduler.locked():
        for _ in graph.inject_specs_closure(
            spec_roots
        ):  # Ensure the entire generator is unrolled.
            pass
    logger.debug("engine cache stats: %s", self.engine.cache_stats())
    logger.debug("build_graph is: %s", graph)
    return graph
# Buggy code
def eventstream(f):
    def new_func(*args, **kwargs):
        def generate():
            for event in chain(f(*args, **kwargs), (None,)):
                yield "data: %s\n\n" % json.dumps(event)

        return Response(
            generate(), mimetype="text/event-stream", direct_passthrough=True
        )

    return update_wrapper(new_func, f)


# Traceback (AssertionError)
Started build
Error on request:
Traceback (most recent call last):
File "/private/tmp/test/lib/python3.6/site-packages/werkzeug/serving.py", line 270, in run_wsgi
execute(self.server.app)
File "/private/tmp/test/lib/python3.6/site-packages/werkzeug/serving.py", line 261, in execute
write(data)
File "/private/tmp/test/lib/python3.6/site-packages/werkzeug/serving.py", line 241, in write
assert isinstance(data, bytes), 'applications must write bytes'
AssertionError: applications must write bytes
Finished build in 0.02 sec

# Fixed code
def eventstream(f):
    def new_func(*args, **kwargs):
        def generate():
            for event in chain(f(*args, **kwargs), (None,)):
                yield ("data: %s\n\n" % json.dumps(event)).encode()

        return Response(
            generate(), mimetype="text/event-stream", direct_passthrough=True
        )

    return update_wrapper(new_func, f)
# Buggy code
def new_func(*args, **kwargs):
    def generate():
        for event in chain(f(*args, **kwargs), (None,)):
            yield "data: %s\n\n" % json.dumps(event)

    return Response(generate(), mimetype="text/event-stream", direct_passthrough=True)


# Traceback (AssertionError)
Started build
Error on request:
Traceback (most recent call last):
File "/private/tmp/test/lib/python3.6/site-packages/werkzeug/serving.py", line 270, in run_wsgi
execute(self.server.app)
File "/private/tmp/test/lib/python3.6/site-packages/werkzeug/serving.py", line 261, in execute
write(data)
File "/private/tmp/test/lib/python3.6/site-packages/werkzeug/serving.py", line 241, in write
assert isinstance(data, bytes), 'applications must write bytes'
AssertionError: applications must write bytes
Finished build in 0.02 sec

# Fixed code
def new_func(*args, **kwargs):
    def generate():
        for event in chain(f(*args, **kwargs), (None,)):
            yield ("data: %s\n\n" % json.dumps(event)).encode()

    return Response(generate(), mimetype="text/event-stream", direct_passthrough=True)
# Buggy code
def generate():
    for event in chain(f(*args, **kwargs), (None,)):
        yield "data: %s\n\n" % json.dumps(event)


# Traceback (AssertionError)
Started build
Error on request:
Traceback (most recent call last):
File "/private/tmp/test/lib/python3.6/site-packages/werkzeug/serving.py", line 270, in run_wsgi
execute(self.server.app)
File "/private/tmp/test/lib/python3.6/site-packages/werkzeug/serving.py", line 261, in execute
write(data)
File "/private/tmp/test/lib/python3.6/site-packages/werkzeug/serving.py", line 241, in write
assert isinstance(data, bytes), 'applications must write bytes'
AssertionError: applications must write bytes
Finished build in 0.02 sec

# Fixed code
def generate():
    for event in chain(f(*args, **kwargs), (None,)):
        yield ("data: %s\n\n" % json.dumps(event)).encode()
# Buggy code
def flush_nicks(self):
    """Any message channel which is not
    active must wipe any state information on peers
    connected for that message channel. If a peer is
    available on another chan, switch the active_channel
    for that nick to (an)(the) other, to make failure
    to communicate as unlikely as possible.
    """
    for mc in self.unavailable_channels():
        self.nicks_seen[mc] = set()
        ac = self.active_channels
        for peer in [x for x in ac if ac[x] == mc]:
            for mc2 in self.available_channels():
                if peer in self.nicks_seen[mc2]:
                    log.debug(
                        "Dynamically switching: " + peer + " to: " + str(mc2.serverport)
                    )
                    self.active_channels[peer] = mc2
                    break
        # Remove all entries for the newly unavailable channel
        self.active_channels = dict([(a, ac[a]) for a in ac if ac[a] != mc])


# Traceback (exceptions.Exception)
Unhandled Error
Traceback (most recent call last):
File "/lib/python2.7/site-packages/twisted/protocols/amp.py", line 1043, in _commandReceived
deferred = self.dispatchCommand(box)
File "/lib/python2.7/site-packages/twisted/protocols/amp.py", line 1101, in dispatchCommand
return maybeDeferred(responder, box)
File "/lib/python2.7/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
result = f(*args, **kw)
File "/lib/python2.7/site-packages/twisted/protocols/amp.py", line 1188, in doit
return maybeDeferred(aCallable, **kw).addCallback(
--- <exception caught here> ---
File "/lib/python2.7/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
result = f(*args, **kw)
File "/lib/python2.7/site-packages/jmdaemon/daemon_protocol.py", line 202, in on_JM_MSGSIGNATURE
self.mcc.privmsg(nick, cmd, msg_to_return, mc=hostid)
File "/lib/python2.7/site-packages/jmdaemon/message_channel.py", line 257, in privmsg
"Tried to privmsg on an unavailable message channel.")
exceptions.Exception: Tried to privmsg on an unavailable message channel.

# Fixed code
def flush_nicks(self):
    """Any message channel which is not
    active must wipe any state information on peers
    connected for that message channel. If a peer is
    available on another chan, switch the active_channel
    for that nick to (an)(the) other, to make failure
    to communicate as unlikely as possible.
    """
    for mc in self.unavailable_channels():
        self.nicks_seen[mc] = set()
        ac = self.active_channels
        for peer in [x for x in ac if ac[x] == mc]:
            for mc2 in self.available_channels():
                if peer in self.nicks_seen[mc2]:
                    log.debug(
                        "Dynamically switching: " + peer + " to: " + str(mc2.hostid)
                    )
                    self.active_channels[peer] = mc2
                    break
        # Remove all entries for the newly unavailable channel
        self.active_channels = dict([(a, ac[a]) for a in ac if ac[a] != mc])
# Buggy code
def on_disconnect_trigger(self, mc):
    """Mark the specified message channel as
    disconnected. Track loss of private connections
    to individual nicks. If no message channels are
    now connected, fire on_disconnect to calling code.
    """
    self.mc_status[mc] = 2
    self.flush_nicks()
    log.debug(
        "On disconnect fired, nicks_seen is now: "
        + str(self.nicks_seen)
        + " "
        + mc.hostid
    )
    if not any([x == 1 for x in self.mc_status.values()]):
        if self.on_disconnect:
            self.on_disconnect()


# Traceback (exceptions.Exception)
Unhandled Error
Traceback (most recent call last):
File "/lib/python2.7/site-packages/twisted/protocols/amp.py", line 1043, in _commandReceived
deferred = self.dispatchCommand(box)
File "/lib/python2.7/site-packages/twisted/protocols/amp.py", line 1101, in dispatchCommand
return maybeDeferred(responder, box)
File "/lib/python2.7/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
result = f(*args, **kw)
File "/lib/python2.7/site-packages/twisted/protocols/amp.py", line 1188, in doit
return maybeDeferred(aCallable, **kw).addCallback(
--- <exception caught here> ---
File "/lib/python2.7/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
result = f(*args, **kw)
File "/lib/python2.7/site-packages/jmdaemon/daemon_protocol.py", line 202, in on_JM_MSGSIGNATURE
self.mcc.privmsg(nick, cmd, msg_to_return, mc=hostid)
File "/lib/python2.7/site-packages/jmdaemon/message_channel.py", line 257, in privmsg
"Tried to privmsg on an unavailable message channel.")
exceptions.Exception: Tried to privmsg on an unavailable message channel.

# Fixed code
def on_disconnect_trigger(self, mc):
    """Mark the specified message channel as
    disconnected. Track loss of private connections
    to individual nicks. If no message channels are
    now connected, fire on_disconnect to calling code.
    """
    self.mc_status[mc] = 2
    self.flush_nicks()
    # construct a readable nicks seen:
    readablens = dict([(k.hostid, self.nicks_seen[k]) for k in self.nicks_seen])
    log.debug(
        "On disconnect fired, nicks_seen is now: " + str(readablens) + " " + mc.hostid
    )
    if not any([x == 1 for x in self.mc_status.values()]):
        if self.on_disconnect:
            self.on_disconnect()
# Buggy code
def add_ignored_makers(self, makers):
    """Makers should be added to this list when they have refused to
    complete the protocol honestly, and should remain in this set
    for the duration of the Taker run (so, the whole schedule).
    """
    self.ignored_makers.extend(makers)


# Traceback (exceptions.AttributeError)
2018-07-21 00:03:59,900 [MainThread  ] [INFO ]  Makers didnt respond: [u'J57XBPc4Ub5b3xxO', u'J54nByhefebjZFkB']
2018-07-21 00:21:32,779 [MainThread  ] [INFO ]  STALL MONITOR:
2018-07-21 00:21:32,779 [MainThread  ] [INFO ]  Stall detected. Regenerating transactions and retrying.
Unhandled Error
Traceback (most recent call last):
File "sendpayment.py", line 233, in main
clientfactory, daemon=daemon)
File "/home/alex/Documents/joinmarket-dev/test_ranr-under-max/joinmarket-clientserver/jmvenv/local/lib/python2.7/site-packages/jmclient/client_protocol.py", line 495, in start_reactor
reactor.run(installSignalHandlers=ish)
File "/home/alex/Documents/joinmarket-dev/test_ranr-under-max/joinmarket-clientserver/jmvenv/local/lib/python2.7/site-packages/twisted/internet/base.py", line 1199, in run
self.mainLoop()
File "/home/alex/Documents/joinmarket-dev/test_ranr-under-max/joinmarket-clientserver/jmvenv/local/lib/python2.7/site-packages/twisted/internet/base.py", line 1208, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/alex/Documents/joinmarket-dev/test_ranr-under-max/joinmarket-clientserver/jmvenv/local/lib/python2.7/site-packages/twisted/internet/base.py", line 828, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/alex/Documents/joinmarket-dev/test_ranr-under-max/joinmarket-clientserver/jmvenv/local/lib/python2.7/site-packages/jmclient/client_protocol.py", line 346, in stallMonitor
self.client.on_finished_callback(False, True, 0.0)
File "sendpayment.py", line 189, in taker_finished
"makers didn't respond: ", taker.nonrespondants,
exceptions.AttributeError: 'Taker' object has no attribute 'nonrespondants'

# Fixed code
def add_ignored_makers(self, makers):
    """Makers should be added to this list when they have refused to
    complete the protocol honestly, and should remain in this set
    for the duration of the Taker run (so, the whole schedule).
    """
    self.ignored_makers.extend(makers)
    self.ignored_makers = list(set(self.ignored_makers))
# Buggy code
def add_honest_makers(self, makers):
    """A maker who has shown willigness to complete the protocol
    by returning a valid signature for a coinjoin can be added to
    this list, the taker can optionally choose to only source
    offers from thus-defined "honest" makers.
    """
    self.honest_makers.extend(makers)


# Traceback (exceptions.AttributeError)
2018-07-21 00:03:59,900 [MainThread  ] [INFO ]  Makers didnt respond: [u'J57XBPc4Ub5b3xxO', u'J54nByhefebjZFkB']
2018-07-21 00:21:32,779 [MainThread  ] [INFO ]  STALL MONITOR:
2018-07-21 00:21:32,779 [MainThread  ] [INFO ]  Stall detected. Regenerating transactions and retrying.
Unhandled Error
Traceback (most recent call last):
File "sendpayment.py", line 233, in main
clientfactory, daemon=daemon)
File "/home/alex/Documents/joinmarket-dev/test_ranr-under-max/joinmarket-clientserver/jmvenv/local/lib/python2.7/site-packages/jmclient/client_protocol.py", line 495, in start_reactor
reactor.run(installSignalHandlers=ish)
File "/home/alex/Documents/joinmarket-dev/test_ranr-under-max/joinmarket-clientserver/jmvenv/local/lib/python2.7/site-packages/twisted/internet/base.py", line 1199, in run
self.mainLoop()
File "/home/alex/Documents/joinmarket-dev/test_ranr-under-max/joinmarket-clientserver/jmvenv/local/lib/python2.7/site-packages/twisted/internet/base.py", line 1208, in mainLoop
self.runUntilCurrent()
--- <exception caught here> ---
File "/home/alex/Documents/joinmarket-dev/test_ranr-under-max/joinmarket-clientserver/jmvenv/local/lib/python2.7/site-packages/twisted/internet/base.py", line 828, in runUntilCurrent
call.func(*call.args, **call.kw)
File "/home/alex/Documents/joinmarket-dev/test_ranr-under-max/joinmarket-clientserver/jmvenv/local/lib/python2.7/site-packages/jmclient/client_protocol.py", line 346, in stallMonitor
self.client.on_finished_callback(False, True, 0.0)
File "sendpayment.py", line 189, in taker_finished
"makers didn't respond: ", taker.nonrespondants,
exceptions.AttributeError: 'Taker' object has no attribute 'nonrespondants'

# Fixed code
def add_honest_makers(self, makers):
    """A maker who has shown willigness to complete the protocol
    by returning a valid signature for a coinjoin can be added to
    this list, the taker can optionally choose to only source
    offers from thus-defined "honest" makers.
    """
    self.honest_makers.extend(makers)
    self.honest_makers = list(set(self.honest_makers))