after_merge stringlengths 28 79.6k | before_merge stringlengths 20 79.6k | url stringlengths 38 71 | full_traceback stringlengths 43 922k | traceback_type stringclasses 555
values |
|---|---|---|---|---|
def _atime_expr(self):
"""If max_items is set, return an expression to limit the query."""
max_items = config.get("completion", "web-history-max-items")
# HistoryCategory should not be added to the completion in that case.
assert max_items != 0
if max_items < 0:
return ""
min_atime = (... | def _atime_expr(self):
"""If max_items is set, return an expression to limit the query."""
max_items = config.get("completion", "web-history-max-items")
# HistoryCategory should not be added to the completion in that case.
assert max_items != 0
if max_items < 0:
return ""
min_atime = (... | https://github.com/qutebrowser/qutebrowser/issues/2849 | 12:21:36 DEBUG sql sql:__init__:80 Preparing SQL query: "SELECT min(last_atime) FROM (SELECT last_atime FROM CompletionHistory ORDER BY last_atime DESC LIMIT :limit)"
12:21:36 DEBUG sql sql:run:99 Running SQL query: "SELECT min(last_atime) FROM (SELECT last_atime FROM CompletionHistory ORDER BY last... | qutebrowser.misc.sql.SqlException |
def set_pattern(self, pattern):
"""Set the pattern on the underlying model."""
if not self.model():
return
self.pattern = pattern
with debug.log_time(log.completion, "Set pattern {}".format(pattern)):
self.model().set_pattern(pattern)
self.selectionModel().clear()
self._m... | def set_pattern(self, pattern):
"""Set the pattern on the underlying model."""
if not self.model():
return
self.pattern = pattern
with debug.log_time(log.completion, "Set pattern {}".format(pattern)):
self.model().set_pattern(pattern)
self._maybe_update_geometry()
self._m... | https://github.com/qutebrowser/qutebrowser/issues/2843 | 19:03:56 DEBUG commands command:run:524 Calling qutebrowser.completion.completionwidget.CompletionView.completion_item_del(<qutebrowser.completion.completionwidget.CompletionView>)
19:03:56 DEBUG completion urlmodel:_delete_history:34 Deleting history entry None
19:03:56 DEBUG sql sql:__init__:80 Prep... | KeyError |
def read_direct(self, dest, source_sel=None, dest_sel=None):
"""Read data directly from HDF5 into an existing NumPy array.
The destination array must be C-contiguous and writable.
Selections must be the output of numpy.s_[<args>].
Broadcasting is supported for simple indexing.
"""
with phil:
... | def read_direct(self, dest, source_sel=None, dest_sel=None):
"""Read data directly from HDF5 into an existing NumPy array.
The destination array must be C-contiguous and writable.
Selections must be the output of numpy.s_[<args>].
Broadcasting is supported for simple indexing.
"""
with phil:
... | https://github.com/h5py/h5py/issues/1792 | Traceback (most recent call last):
File "/Users/jasondet/Downloads/h5py_bug.py", line 9, in <module>
dset.read_direct(arr, None, np.s_[2:])
File "/usr/local/lib/python3.9/site-packages/h5py/_hl/dataset.py", line 970, in read_direct
for mspace in dest_sel.broadcast(source_sel.mshape):
File "/usr/local/lib/python3.9/site... | TypeError |
def write_direct(self, source, source_sel=None, dest_sel=None):
"""Write data directly to HDF5 from a NumPy array.
The source array must be C-contiguous. Selections must be
the output of numpy.s_[<args>].
Broadcasting is supported for simple indexing.
"""
with phil:
if self._is_empty:... | def write_direct(self, source, source_sel=None, dest_sel=None):
"""Write data directly to HDF5 from a NumPy array.
The source array must be C-contiguous. Selections must be
the output of numpy.s_[<args>].
Broadcasting is supported for simple indexing.
"""
with phil:
if self._is_empty:... | https://github.com/h5py/h5py/issues/1792 | Traceback (most recent call last):
File "/Users/jasondet/Downloads/h5py_bug.py", line 9, in <module>
dset.read_direct(arr, None, np.s_[2:])
File "/usr/local/lib/python3.9/site-packages/h5py/_hl/dataset.py", line 970, in read_direct
for mspace in dest_sel.broadcast(source_sel.mshape):
File "/usr/local/lib/python3.9/site... | TypeError |
def create_dataset(self, name, shape=None, dtype=None, data=None, **kwds):
"""Create a new HDF5 dataset
name
Name of the dataset (absolute or relative). Provide None to make
an anonymous dataset.
shape
Dataset shape. Use "()" for scalar datasets. Required if "data"
isn't ... | def create_dataset(self, name, shape=None, dtype=None, data=None, **kwds):
"""Create a new HDF5 dataset
name
Name of the dataset (absolute or relative). Provide None to make
an anonymous dataset.
shape
Dataset shape. Use "()" for scalar datasets. Required if "data"
isn't ... | https://github.com/h5py/h5py/issues/1732 | Traceback (most recent call last):
File "test.py", line 5, in <module>
model.save('test.h5')
File "/Users/tgaddair/.venv/horovod/stable/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py", line 1171, in save
signatures)
File "/Users/tgaddair/.venv/horovod/stable/lib/python3.7/site-packages/tenso... | TypeError |
def create_virtual_dataset(self, name, layout, fillvalue=None):
"""Create a new virtual dataset in this group.
See virtual datasets in the docs for more information.
name
(str) Name of the new dataset
layout
(VirtualLayout) Defines the sources for the virtual dataset
fillvalue
... | def create_virtual_dataset(self, name, layout, fillvalue=None):
"""Create a new virtual dataset in this group.
See virtual datasets in the docs for more information.
name
(str) Name of the new dataset
layout
(VirtualLayout) Defines the sources for the virtual dataset
fillvalue
... | https://github.com/h5py/h5py/issues/1732 | Traceback (most recent call last):
File "test.py", line 5, in <module>
model.save('test.h5')
File "/Users/tgaddair/.venv/horovod/stable/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/network.py", line 1171, in save
signatures)
File "/Users/tgaddair/.venv/horovod/stable/lib/python3.7/site-packages/tenso... | TypeError |
def copy(
self,
source,
dest,
name=None,
shallow=False,
expand_soft=False,
expand_external=False,
expand_refs=False,
without_attrs=False,
):
"""Copy an object or group.
The source can be a path, Group, Dataset, or Datatype object. The
destination can be either a path ... | def copy(
self,
source,
dest,
name=None,
shallow=False,
expand_soft=False,
expand_external=False,
expand_refs=False,
without_attrs=False,
):
"""Copy an object or group.
The source can be a path, Group, Dataset, or Datatype object. The
destination can be either a path ... | https://github.com/h5py/h5py/issues/1005 | Traceback (most recent call last):
File "/home/challtdow/workspace/pytest/bin/h5_bugtest.py", line 14, in <module>
h5_file.copy(h5_source, h5_group)
File "/usr/local/lib/python3.5/dist-packages/h5py/_hl/group.py", line 372, in copy
dest_path = pp.basename(h5i.get_name(source[source_path].id))
File "h5py/_objects.pyx", ... | ValueError |
def __init__(self, dtype):
self.dtype = np.dtype(dtype)
| def __init__(self, dtype):
self.dtype = dtype
| https://github.com/h5py/h5py/issues/1540 | Traceback (most recent call last):
File "error.py", line 4, in <module>
f.attrs['empty'] = h5py.Empty('f')
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/usr/local/lib/python3.7/site-packages/h5py/_hl/attrs.py", line 100... | AttributeError |
def size(self):
"""Numpy-style attribute giving the total dataset size"""
if is_empty_dataspace(self.id):
return None
return numpy.prod(self.shape, dtype=numpy.intp)
| def size(self):
"""Numpy-style attribute giving the total dataset size"""
return numpy.prod(self.shape, dtype=numpy.intp)
| https://github.com/h5py/h5py/issues/1044 | TypeError Traceback (most recent call last)
<ipython-input-10-f4a7fbce39b5> in <module>()
----> 1 hasattr(empty, "size")
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
~/.local/lib/python3.5/site-packages/h5py/_hl/dataset.... | TypeError |
def h5py_completer(self, event):
"""Completer function to be loaded into IPython"""
base = re_object_match.split(event.line)[1]
if not isinstance(self._ofind(base).get("obj"), (AttributeManager, HLObject)):
raise TryNext
try:
return h5py_attr_completer(self, event.line)
except Valu... | def h5py_completer(self, event):
"""Completer function to be loaded into IPython"""
base = re_object_match.split(event.line)[1]
if not isinstance(self._ofind(base)["obj"], (AttributeManager, HLObject)):
raise TryNext
try:
return h5py_attr_completer(self, event.line)
except ValueErr... | https://github.com/h5py/h5py/issues/885 | $ ipython
Python 3.6.1 | packaged by conda-forge | (default, May 11 2017, 18:00:28)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.0.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: [a[Exception in thread Thread-40:
Traceback (most recent call last):
File "/zopt/conda2/envs/test... | KeyError |
def parse(self, handler, name=None):
args, varargs, kws, defaults, kwo, kwo_defaults, annotations = self._get_arg_spec(
handler
)
spec = ArgumentSpec(
name,
self._type,
positional=args,
varargs=varargs,
kwargs=kws,
kwonlyargs=kwo,
defaults=self... | def parse(self, handler, name=None):
args, varargs, kwargs, defaults, kwonly, kwonlydefaults, annotations = (
getfullargspec(unwrap(handler))
)
if ismethod(handler) or handler.__name__ == "__init__":
args = args[1:] # drop 'self'
spec = ArgumentSpec(
name,
self._type,
... | https://github.com/robotframework/robotframework/issues/3453 | from inspect import getfullargspec
from operator import eq
getfullargspec(eq)
Traceback (most recent call last):
[snip]
TypeError: unsupported callable
getfullargspec(len)
[snip]
TypeError: unsupported callable | TypeError |
def _get_defaults(self, args, default_values, kwo_defaults):
if default_values:
defaults = dict(zip(args[-len(default_values) :], default_values))
else:
defaults = {}
if kwo_defaults:
defaults.update(kwo_defaults)
return defaults
| def _get_defaults(self, args, default_values, kwonlydefaults):
if default_values:
defaults = dict(zip(args[-len(default_values) :], default_values))
else:
defaults = {}
if kwonlydefaults:
defaults.update(kwonlydefaults)
return defaults
| https://github.com/robotframework/robotframework/issues/3453 | from inspect import getfullargspec
from operator import eq
getfullargspec(eq)
Traceback (most recent call last):
[snip]
TypeError: unsupported callable
getfullargspec(len)
[snip]
TypeError: unsupported callable | TypeError |
def getfullargspec(func):
return getargspec(func) + ([], None, {})
| def getfullargspec(func):
return getargspec(unwrap(func)) + ([], None, {})
| https://github.com/robotframework/robotframework/issues/3453 | from inspect import getfullargspec
from operator import eq
getfullargspec(eq)
Traceback (most recent call last):
[snip]
TypeError: unsupported callable
getfullargspec(len)
[snip]
TypeError: unsupported callable | TypeError |
def _get_writer(self, outpath):
return file_writer(
outpath, newline=self._options["line_separator"], usage="Tidy output"
)
| def _get_writer(self, outpath):
return file_writer(outpath, newline=self._options["line_separator"])
| https://github.com/robotframework/robotframework/issues/3339 | $ python -m robot.libdoc BuiltIn out.html
Unexpected error: IOError: [Errno 13] Permission denied: 'out.html'
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/robot/utils/application.py", line 83, in _execute
rc = self.main(arguments, **options)
File "/usr/local/lib/python2.7/dist-package... | IOError |
def parse_xml(self, source, keep_clark_notation=False):
"""Parses the given XML file or string into an element structure.
The `source` can either be a path to an XML file or a string containing
XML. In both cases the XML is parsed into ElementTree
[http://docs.python.org/library/xml.etree.elementtree.h... | def parse_xml(self, source, keep_clark_notation=False):
"""Parses the given XML file or string into an element structure.
The `source` can either be a path to an XML file or a string containing
XML. In both cases the XML is parsed into ElementTree
[http://docs.python.org/library/xml.etree.elementtree.h... | https://github.com/robotframework/robotframework/issues/1748 | AttributeError: 'builtin_function_or_method' object has no attribute 'startswith'
Traceback (most recent call last):
File "/opt/ute/python/lib/python2.7/site-packages/robot/libraries/XML.py", line 447, in parse_xml
NameSpaceStripper().strip(root)
File "/opt/ute/python/lib/python2.7/site-packages/robot/libraries/XML.py"... | AttributeError |
def _remove_element(self, root, element, remove_tail=False):
parent = self._find_parent(root, element)
if not remove_tail:
self._preserve_tail(element, parent)
parent.remove(element)
| def _remove_element(self, root, element, remove_tail=False):
parent = self._find_parent(root, element)
if element.tail and not remove_tail:
self._preserve_tail(element, parent)
parent.remove(element)
| https://github.com/robotframework/robotframework/issues/1748 | AttributeError: 'builtin_function_or_method' object has no attribute 'startswith'
Traceback (most recent call last):
File "/opt/ute/python/lib/python2.7/site-packages/robot/libraries/XML.py", line 447, in parse_xml
NameSpaceStripper().strip(root)
File "/opt/ute/python/lib/python2.7/site-packages/robot/libraries/XML.py"... | AttributeError |
def _preserve_tail(self, element, parent):
if not element.tail:
return
index = list(parent).index(element)
if index == 0:
parent.text = (parent.text or "") + element.tail
else:
sibling = parent[index - 1]
sibling.tail = (sibling.tail or "") + element.tail
| def _preserve_tail(self, element, parent):
index = list(parent).index(element)
if index == 0:
parent.text = (parent.text or "") + element.tail
else:
sibling = parent[index - 1]
sibling.tail = (sibling.tail or "") + element.tail
| https://github.com/robotframework/robotframework/issues/1748 | AttributeError: 'builtin_function_or_method' object has no attribute 'startswith'
Traceback (most recent call last):
File "/opt/ute/python/lib/python2.7/site-packages/robot/libraries/XML.py", line 447, in parse_xml
NameSpaceStripper().strip(root)
File "/opt/ute/python/lib/python2.7/site-packages/robot/libraries/XML.py"... | AttributeError |
def exc_info(self):
"""
Holds the exc_info three-tuple raised by the function if the
greenlet finished with an error. Otherwise a false value.
.. note:: This is a provisional API and may change.
.. versionadded:: 1.1
"""
ei = self._exc_info
if ei is not None and ei[0] is not None:
... | def exc_info(self):
"""
Holds the exc_info three-tuple raised by the function if the
greenlet finished with an error. Otherwise a false value.
.. note:: This is a provisional API and may change.
.. versionadded:: 1.1
"""
ei = self._exc_info
if ei is not None and ei[0] is not None:
... | https://github.com/gevent/gevent/issues/1704 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 856, in gevent._gevent_cgreenlet.Greenlet.run
File "src/gevent/greenlet.py", line 837, in gevent._gevent_cgreenlet.Greenlet._Greenlet__report_error
File "/home/danmilon/tmp/gevent/src/gevent/_tblib.py", line 415, in g
return f(a)
File "/home/danmilo... | RuntimeError |
def __report_error(self, exc_info):
if isinstance(exc_info[1], GreenletExit):
self.__report_result(exc_info[1])
return
# Depending on the error, we may not be able to pickle it.
# In particular, RecursionError can be a problem.
try:
tb = dump_traceback(exc_info[2])
except: ... | def __report_error(self, exc_info):
if isinstance(exc_info[1], GreenletExit):
self.__report_result(exc_info[1])
return
self._exc_info = exc_info[0], exc_info[1], dump_traceback(exc_info[2])
hub = get_my_hub(self) # pylint:disable=undefined-variable
if self._links and not self._notifie... | https://github.com/gevent/gevent/issues/1704 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 856, in gevent._gevent_cgreenlet.Greenlet.run
File "src/gevent/greenlet.py", line 837, in gevent._gevent_cgreenlet.Greenlet._Greenlet__report_error
File "/home/danmilon/tmp/gevent/src/gevent/_tblib.py", line 415, in g
return f(a)
File "/home/danmilo... | RuntimeError |
def wrapped(self, raw):
"""
Wraps the raw IO object (`RawIOBase` or `io.TextIOBase`) in
buffers, text decoding, and newline handling.
"""
# pylint:disable=too-many-branches
result = raw
buffering = self.buffering
line_buffering = False
if buffering == 1 or buffering < 0 and raw.isat... | def wrapped(self, raw):
"""
Wraps the raw IO object (`RawIOBase`) in buffers, text decoding,
and newline handling.
"""
# pylint:disable=too-many-branches
result = raw
buffering = self.buffering
line_buffering = False
if buffering == 1 or buffering < 0 and raw.isatty():
buffe... | https://github.com/gevent/gevent/issues/1542 | $ python
Python 3.7.5 (default, Nov 20 2019, 09:21:52)
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
import sys
import gevent.fileobject
gevent.fileobject.FileObjectThread(sys.stdin).readline()
Traceback (most recent call last):
File "/home/davidlawson/virtualenvs/... | AttributeError |
def wait(self, timeout=None): # pylint:disable=unused-argument
"""Waiting for a DummySemaphore returns immediately."""
return 1
| def wait(self, timeout=None):
"""Waiting for a DummySemaphore returns immediately."""
| https://github.com/gevent/gevent/issues/1542 | $ python
Python 3.7.5 (default, Nov 20 2019, 09:21:52)
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
import sys
import gevent.fileobject
gevent.fileobject.FileObjectThread(sys.stdin).readline()
Traceback (most recent call last):
File "/home/davidlawson/virtualenvs/... | AttributeError |
def __repr__(self):
return "<%s at 0x%x %s_fobj=%r%s>" % (
self.__class__.__name__,
id(self),
"closed" if self.closed else "",
self.io,
self._extra_repr(),
)
| def __repr__(self):
return "<%s _fobj=%r%s>" % (self.__class__.__name__, self.io, self._extra_repr())
| https://github.com/gevent/gevent/issues/1510 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
File "/usr/local/lib/python3.7/site-packages/gevent/subprocess.py", line 725, in _read
data = pipe.read()
File "/usr/local/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(d... | UnicodeDecodeError |
def communicate(self, input=None, timeout=None):
"""
Interact with process and return its output and error.
- Send *input* data to stdin.
- Read data from stdout and stderr, until end-of-file is reached.
- Wait for process to terminate.
The optional *input* argument should be a
string to b... | def communicate(self, input=None, timeout=None):
"""Interact with process: Send data to stdin. Read data from
stdout and stderr, until end-of-file is reached. Wait for
process to terminate. The optional input argument should be a
string to be sent to the child process, or None, if no data
should ... | https://github.com/gevent/gevent/issues/1510 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
File "/usr/local/lib/python3.7/site-packages/gevent/subprocess.py", line 725, in _read
data = pipe.read()
File "/usr/local/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(d... | UnicodeDecodeError |
def _local_find_descriptors(self):
type_self = type(self)
gets = set()
dels = set()
set_or_del = set()
sets = set()
mro = list(type_self.mro())
for attr_name in dir(type_self):
# Conventionally, descriptors when called on a class
# return themself, but not all do. Notable ex... | def _local_find_descriptors(self):
type_self = type(self)
gets = set()
dels = set()
set_or_del = set()
sets = set()
for attr_name in dir(type_self):
attr = getattr(type_self, attr_name)
type_attr = type(attr)
if hasattr(type_attr, "__get__"):
gets.add(attr_na... | https://github.com/gevent/gevent/issues/1122 | Traceback (most recent call last):
...
File "//transaction-2.1.2-py2.py3-none-any.ovo/transaction/__init__.py", line 28, in <module>
manager = ThreadTransactionManager()
File "//gevent/src/gevent/local.py", line 517, in __new__
self.__cinit__(*args[1:], **kw)
File "//gevent/src/gevent/local.py", line 336, in __cinit__
... | AttributeError |
def __setattr__(cls, name, value):
# For symmetry with getattr and dir, pass all
# attribute setting on to the module. (This makes
# reloading work, see issue #805)
setattr(_signal_module, name, value)
| def __setattr__(cls, name, value):
# Because we can't know whether to try to go to the module
# or the class, we don't allow setting an attribute after the fact
raise TypeError("Cannot set attribute")
| https://github.com/gevent/gevent/issues/805 | [DEBUG ] Local cache dir: '/var/cache/salt/minion/files/base/_proxy'
[DEBUG ] Refreshing modules...
......
Passed invalid arguments: Cannot set attribute.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/cli/caller.py", line 196, in call
ret['return'] = func(*args, **kwargs)
File "/usr... | TypeError |
def sendall(self, data, flags=0):
if isinstance(data, unicode):
data = data.encode()
# this sendall is also reused by gevent.ssl.SSLSocket subclass,
# so it should not call self._sock methods directly
data_memory = _get_memory(data)
len_data_memory = len(data_memory)
if not len_data_memo... | def sendall(self, data, flags=0):
if isinstance(data, unicode):
data = data.encode()
# this sendall is also reused by gevent.ssl.SSLSocket subclass,
# so it should not call self._sock methods directly
data_memory = _get_memory(data)
len_data_memory = len(data_memory)
# On PyPy up throug... | https://github.com/gevent/gevent/issues/719 | Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/gevent/server.py", line 102, in wrap_socket_and_handle
ssl_socket = self.wrap_socket(client_socket, **self.ssl_... | SSLError |
def sendall(self, data, flags=0):
# XXX When we run on PyPy3, see the notes in _socket2.py's sendall()
data_memory = _get_memory(data)
len_data_memory = len(data_memory)
if not len_data_memory:
# Don't try to send empty data at all, no point, and breaks ssl
# See issue 719
return... | def sendall(self, data, flags=0):
# XXX When we run on PyPy3, see the notes in _socket2.py's sendall()
data_memory = _get_memory(data)
if self.timeout is None:
data_sent = 0
while data_sent < len(data_memory):
data_sent += self.send(data_memory[data_sent:], flags)
else:
... | https://github.com/gevent/gevent/issues/719 | Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run
result = self._run(*self.args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/gevent/server.py", line 102, in wrap_socket_and_handle
ssl_socket = self.wrap_socket(client_socket, **self.ssl_... | SSLError |
def sendall(self, data):
fileno = self.fileno()
data_memory = _get_memory(data)
bytes_total = len(data_memory)
bytes_written = 0
while True:
try:
bytes_written += _write(fileno, data_memory[bytes_written:])
except (IOError, OSError) as ex:
code = ex.args[0]
... | def sendall(self, data):
fileno = self.fileno()
bytes_total = len(data)
bytes_written = 0
while True:
try:
bytes_written += _write(fileno, _get_memory(data, bytes_written))
except (IOError, OSError) as ex:
code = ex.args[0]
if code not in ignored_error... | https://github.com/gevent/gevent/issues/466 | python test.py
Traceback (most recent call last):
File "test.py", line 22, in <module>
TestFails()
File "test.py", line 19, in TestFails
sock.sendall(anStructure)
File "/usr/local/lib/python2.7/site-packages/gevent/socket.py", line 457, in sendall
while data_sent < len(data):
TypeError: object of type 'AnStructure' has... | TypeError |
def sendall(self, data, flags=0):
if isinstance(data, unicode):
data = data.encode()
# this sendall is also reused by gevent.ssl.SSLSocket subclass,
# so it should not call self._sock methods directly
data_memory = _get_memory(data)
if self.timeout is None:
data_sent = 0
whil... | def sendall(self, data, flags=0):
if isinstance(data, unicode):
data = data.encode()
# this sendall is also reused by gevent.ssl.SSLSocket subclass,
# so it should not call self._sock methods directly
if self.timeout is None:
data_sent = 0
while data_sent < len(data):
... | https://github.com/gevent/gevent/issues/466 | python test.py
Traceback (most recent call last):
File "test.py", line 22, in <module>
TestFails()
File "test.py", line 19, in TestFails
sock.sendall(anStructure)
File "/usr/local/lib/python2.7/site-packages/gevent/socket.py", line 457, in sendall
while data_sent < len(data):
TypeError: object of type 'AnStructure' has... | TypeError |
def _get_memory(data):
try:
mv = memoryview(data)
if mv.shape:
return mv
# No shape, probably working with a ctypes object,
# or something else exotic that supports the buffer interface
return mv.tobytes()
except TypeError:
# fixes "python2.7 array.arr... | def _get_memory(string, offset):
try:
return memoryview(string)[offset:]
except TypeError:
# fixes "python2.7 array.array doesn't support memoryview used in
# gevent.socket.send" issue
# (http://code.google.com/p/gevent/issues/detail?id=94)
return buffer(string, offset)
| https://github.com/gevent/gevent/issues/466 | python test.py
Traceback (most recent call last):
File "test.py", line 22, in <module>
TestFails()
File "test.py", line 19, in TestFails
sock.sendall(anStructure)
File "/usr/local/lib/python2.7/site-packages/gevent/socket.py", line 457, in sendall
while data_sent < len(data):
TypeError: object of type 'AnStructure' has... | TypeError |
def _get_memory(data):
mv = memoryview(data)
if mv.shape:
return mv
# No shape, probably working with a ctypes object,
# or something else exotic that supports the buffer interface
return mv.tobytes()
| def _get_memory(string, offset):
return memoryview(string)[offset:]
| https://github.com/gevent/gevent/issues/466 | python test.py
Traceback (most recent call last):
File "test.py", line 22, in <module>
TestFails()
File "test.py", line 19, in TestFails
sock.sendall(anStructure)
File "/usr/local/lib/python2.7/site-packages/gevent/socket.py", line 457, in sendall
while data_sent < len(data):
TypeError: object of type 'AnStructure' has... | TypeError |
def sendall(self, data, flags=0):
data_memory = _get_memory(data)
if self.timeout is None:
data_sent = 0
while data_sent < len(data_memory):
data_sent += self.send(data_memory[data_sent:], flags)
else:
timeleft = self.timeout
end = time.time() + timeleft
d... | def sendall(self, data, flags=0):
if self.timeout is None:
data_sent = 0
while data_sent < len(data):
data_sent += self.send(_get_memory(data, data_sent), flags)
else:
timeleft = self.timeout
end = time.time() + timeleft
data_sent = 0
while True:
... | https://github.com/gevent/gevent/issues/466 | python test.py
Traceback (most recent call last):
File "test.py", line 22, in <module>
TestFails()
File "test.py", line 19, in TestFails
sock.sendall(anStructure)
File "/usr/local/lib/python2.7/site-packages/gevent/socket.py", line 457, in sendall
while data_sent < len(data):
TypeError: object of type 'AnStructure' has... | TypeError |
def patch_all(
socket=True,
dns=True,
time=True,
select=True,
thread=True,
os=True,
ssl=True,
httplib=False,
subprocess=True,
sys=False,
aggressive=True,
Event=False,
):
"""Do all of the default monkey patching (calls every other function in this module."""
# orde... | def patch_all(
socket=True,
dns=True,
time=True,
select=True,
thread=True,
os=True,
ssl=True,
httplib=False,
subprocess=False,
sys=False,
aggressive=True,
Event=False,
):
"""Do all of the default monkey patching (calls every other function in this module."""
# ord... | https://github.com/gevent/gevent/issues/466 | python test.py
Traceback (most recent call last):
File "test.py", line 22, in <module>
TestFails()
File "test.py", line 19, in TestFails
sock.sendall(anStructure)
File "/usr/local/lib/python2.7/site-packages/gevent/socket.py", line 457, in sendall
while data_sent < len(data):
TypeError: object of type 'AnStructure' has... | TypeError |
def communicate(self, input=None):
"""Interact with process: Send data to stdin. Read data from
stdout and stderr, until end-of-file is reached. Wait for
process to terminate. The optional input argument should be a
string to be sent to the child process, or None, if no data
should be sent to the... | def communicate(self, input=None):
"""Interact with process: Send data to stdin. Read data from
stdout and stderr, until end-of-file is reached. Wait for
process to terminate. The optional input argument should be a
string to be sent to the child process, or None, if no data
should be sent to the... | https://github.com/gevent/gevent/issues/466 | python test.py
Traceback (most recent call last):
File "test.py", line 22, in <module>
TestFails()
File "test.py", line 19, in TestFails
sock.sendall(anStructure)
File "/usr/local/lib/python2.7/site-packages/gevent/socket.py", line 457, in sendall
while data_sent < len(data):
TypeError: object of type 'AnStructure' has... | TypeError |
def issues(self):
email = self.username
# TODO -- doing something with blockedby would be nice.
if self.query_url:
query = self.bz.url_to_query(self.query_url)
query["column_list"] = self.COLUMN_LIST
else:
query = dict(
column_list=self.COLUMN_LIST,
bug_s... | def issues(self):
email = self.username
# TODO -- doing something with blockedby would be nice.
if self.query_url:
query = self.bz.url_to_query(self.query_url)
query["column_list"] = self.COLUMN_LIST
else:
query = dict(
column_list=self.COLUMN_LIST,
bug_s... | https://github.com/ralphbean/bugwarrior/issues/740 | Traceback (most recent call last):
File "/home/dave/dotfiles/external/pyenv/versions/bugwarrior/bin/bugwarrior-pull", line 8, in <module>
sys.exit(pull())
File "/home/dave/.pyenv/versions/2.7.18/envs/bugwarrior/lib/python2.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/ho... | TypeError |
def annotations(self, issue, issue_obj):
comments = self.jira.comments(issue.key) or []
return self.build_annotations(
((comment.author.displayName, comment.body) for comment in comments),
issue_obj.get_processed_url(issue_obj.get_url()),
)
| def annotations(self, issue, issue_obj):
comments = self.jira.comments(issue.key) or []
return self.build_annotations(
((comment.author.name, comment.body) for comment in comments),
issue_obj.get_processed_url(issue_obj.get_url()),
)
| https://github.com/ralphbean/bugwarrior/issues/718 | INFO:bugwarrior.db:Service-defined UDAs exist: you can optionally use the `bugwarrior-uda` command to export a list of UDAs you can add to your taskrc file.
INFO:bugwarrior.services:Starting to aggregate remote issues.
INFO:bugwarrior.services:Spawning 1 workers.
INFO:bugwarrior.services:Working on [JIRA]
/usr/local/li... | TypeError |
def aslist(value):
"""Cast config values to lists of strings"""
return [item.strip() for item in re.split(",(?![^{]*})", value.strip())]
| def aslist(value):
"""Cast config values to lists of strings"""
return [item.strip() for item in value.strip().split(",")]
| https://github.com/ralphbean/bugwarrior/issues/568 | Traceback (most recent call last):
File "/usr/local/bin/bugwarrior-pull", line 11, in <module>
sys.exit(pull())
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.in... | jinja2.exceptions.TemplateSyntaxError |
def get_annotations(self, tag, issue, issue_obj, url):
response = self.get_collection(
"/repositories/%s/pullrequests/%i/comments" % (tag, issue["id"])
)
return self.build_annotations(
(
(
comment["user"]["username"],
comment["content"]["raw"],
... | def get_annotations(self, tag, issue, issue_obj, url):
response = self.get_data(
self.BASE_API + "/repositories/%s/issues/%i/comments" % (tag, issue["id"])
)
return self.build_annotations(
(
(
comment["author_info"]["username"],
comment["content"],... | https://github.com/ralphbean/bugwarrior/issues/694 | ERROR:bugwarrior.services:Worker for [ELIDED] failed: Non-200 status code 410; u'https://api.bitbucket.org/1.0/repositories/[ELIDED]'; u'{"type": "error", "error": {"message": "Resource removed", "detail": "This API is no longer supported.\\n\\nFor information about its removal, please refer to the deprecation notice a... | IOError |
def issues(self):
user = self.config.get("username")
response = self.get_collection("/repositories/" + user + "/")
repo_tags = list(
filter(
self.filter_repos,
[repo["full_name"] for repo in response if repo.get("has_issues")],
)
)
issues = sum([self.fetch_is... | def issues(self):
user = self.config.get("username")
response = self.get_collection("/repositories/" + user + "/")
repo_tags = list(
filter(
self.filter_repos,
[repo["full_name"] for repo in response if repo.get("has_issues")],
)
)
issues = sum([self.fetch_is... | https://github.com/ralphbean/bugwarrior/issues/694 | ERROR:bugwarrior.services:Worker for [ELIDED] failed: Non-200 status code 410; u'https://api.bitbucket.org/1.0/repositories/[ELIDED]'; u'{"type": "error", "error": {"message": "Resource removed", "detail": "This API is no longer supported.\\n\\nFor information about its removal, please refer to the deprecation notice a... | IOError |
def to_taskwarrior(self):
return {
"project": self.extra["project"],
"annotations": self.extra["annotations"],
self.URL: self.extra["url"],
"priority": self.origin["default_priority"],
"tags": self.get_tags(),
self.FOREIGN_ID: self.record["ref"],
self.SUMMARY:... | def to_taskwarrior(self):
return {
"project": self.extra["project"],
"annotations": self.extra["annotations"],
self.URL: self.extra["url"],
"priority": self.origin["default_priority"],
"tags": self.record["tags"],
self.FOREIGN_ID: self.record["ref"],
self.SUMM... | https://github.com/ralphbean/bugwarrior/issues/591 | Traceback (most recent call last):
File "/usr/local/bin/bugwarrior-pull", line 11, in <module>
sys.exit(pull())
File "/home/frank/.local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/frank/.local/lib/python2.7/site-packages/click/core.py", line 697, in m... | TypeError |
def _get_bug_attr(bug, attr):
"""Default longdescs/flags case to [] since they may not be present."""
if attr in ("longdescs", "flags"):
return getattr(bug, attr, [])
return getattr(bug, attr)
| def _get_bug_attr(bug, attr):
"""Default only the longdescs case to [] since it may not be present."""
if attr == "longdescs":
return getattr(bug, attr, [])
return getattr(bug, attr)
| https://github.com/ralphbean/bugwarrior/issues/535 | ERROR:bugwarrior.services:Worker for [bz.redhat] failed: Bug object has no attribute 'flags'.
If 'flags' is a bugzilla attribute, it may not have been cached when the bug was fetched. You may want to adjust your include_fields for getbug/query.
Traceback (most recent call last):
File "/home/mike/Devel/bugwarrior/build/... | AttributeError |
def validate_config(config, main_section):
if not config.has_section(main_section):
die("No [%s] section found." % main_section)
logging.basicConfig(
level=getattr(logging, config.get(main_section, "log.level")),
filename=config.get(main_section, "log.file"),
)
# In general, it... | def validate_config(config, main_section):
if not config.has_section(main_section):
die("No [%s] section found." % main_section)
logging.basicConfig(
level=getattr(logging, config.get(main_section, "log.level")),
filename=config.get(main_section, "log.file"),
)
# In general, it... | https://github.com/ralphbean/bugwarrior/issues/490 | Traceback (most recent call last):
File "/usr/local/bin/bugwarrior-pull", line 11, in <module>
load_entry_point('bugwarrior==1.5.1', 'console_scripts', 'bugwarrior-pull')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7... | KeyError |
def run_hooks(conf, name):
if conf.has_option("hooks", name):
pre_import = aslist(conf.get("hooks", name))
if pre_import is not None:
for hook in pre_import:
exit_code = subprocess.call(hook, shell=True)
if exit_code is not 0:
msg = "No... | def run_hooks(conf, name):
if conf.has_option("hooks", name):
pre_import = [t.strip() for t in conf.get("hooks", name).split(",")]
if pre_import is not None:
for hook in pre_import:
exit_code = subprocess.call(hook, shell=True)
if exit_code is not 0:
... | https://github.com/ralphbean/bugwarrior/issues/490 | Traceback (most recent call last):
File "/usr/local/bin/bugwarrior-pull", line 11, in <module>
load_entry_point('bugwarrior==1.5.1', 'console_scripts', 'bugwarrior-pull')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7... | KeyError |
def synchronize(issue_generator, conf, main_section, dry_run=False):
def _bool_option(section, option, default):
try:
return asbool(conf.get(section, option))
except (NoSectionError, NoOptionError):
return default
targets = aslist(conf.get(main_section, "targets"))
s... | def synchronize(issue_generator, conf, main_section, dry_run=False):
def _bool_option(section, option, default):
try:
return asbool(conf.get(section, option))
except (NoSectionError, NoOptionError):
return default
targets = [t.strip() for t in conf.get(main_section, "tar... | https://github.com/ralphbean/bugwarrior/issues/490 | Traceback (most recent call last):
File "/usr/local/bin/bugwarrior-pull", line 11, in <module>
load_entry_point('bugwarrior==1.5.1', 'console_scripts', 'bugwarrior-pull')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7... | KeyError |
def get_defined_udas_as_strings(conf, main_section):
targets = aslist(conf.get(main_section, "targets"))
services = set([conf.get(target, "service") for target in targets])
uda_list = build_uda_config_overrides(services)
for uda in convert_override_args_to_taskrc_settings(uda_list):
yield uda
| def get_defined_udas_as_strings(conf, main_section):
targets = [t.strip() for t in conf.get(main_section, "targets").split(",")]
services = set([conf.get(target, "service") for target in targets])
uda_list = build_uda_config_overrides(services)
for uda in convert_override_args_to_taskrc_settings(uda_li... | https://github.com/ralphbean/bugwarrior/issues/490 | Traceback (most recent call last):
File "/usr/local/bin/bugwarrior-pull", line 11, in <module>
load_entry_point('bugwarrior==1.5.1', 'console_scripts', 'bugwarrior-pull')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7... | KeyError |
def __init__(self, main_config, main_section, target):
self.config = ServiceConfig(self.CONFIG_PREFIX, main_config, target)
self.main_section = main_section
self.main_config = main_config
self.target = target
self.desc_len = self._get_config_or_default("description_length", 35, asint)
self.anno... | def __init__(self, main_config, main_section, target):
self.config = ServiceConfig(self.CONFIG_PREFIX, main_config, target)
self.main_section = main_section
self.main_config = main_config
self.target = target
self.desc_len = self._get_config_or_default("description_length", 35, asint)
self.anno... | https://github.com/ralphbean/bugwarrior/issues/490 | Traceback (most recent call last):
File "/usr/local/bin/bugwarrior-pull", line 11, in <module>
load_entry_point('bugwarrior==1.5.1', 'console_scripts', 'bugwarrior-pull')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7... | KeyError |
def aggregate_issues(conf, main_section, debug):
"""Return all issues from every target."""
log.info("Starting to aggregate remote issues.")
# Create and call service objects for every target in the config
targets = aslist(conf.get(main_section, "targets"))
queue = multiprocessing.Queue()
log... | def aggregate_issues(conf, main_section, debug):
"""Return all issues from every target."""
log.info("Starting to aggregate remote issues.")
# Create and call service objects for every target in the config
targets = [t.strip() for t in conf.get(main_section, "targets").split(",")]
queue = multipro... | https://github.com/ralphbean/bugwarrior/issues/490 | Traceback (most recent call last):
File "/usr/local/bin/bugwarrior-pull", line 11, in <module>
load_entry_point('bugwarrior==1.5.1', 'console_scripts', 'bugwarrior-pull')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7... | KeyError |
def __init__(self, *args, **kw):
super(BugzillaService, self).__init__(*args, **kw)
self.base_uri = self.config.get("base_uri")
self.username = self.config.get("username")
self.ignore_cc = self.config.get(
"ignore_cc", default=False, to_type=lambda x: x == "True"
)
self.query_url = self.... | def __init__(self, *args, **kw):
super(BugzillaService, self).__init__(*args, **kw)
self.base_uri = self.config.get("base_uri")
self.username = self.config.get("username")
self.ignore_cc = self.config.get(
"ignore_cc", default=False, to_type=lambda x: x == "True"
)
self.query_url = self.... | https://github.com/ralphbean/bugwarrior/issues/490 | Traceback (most recent call last):
File "/usr/local/bin/bugwarrior-pull", line 11, in <module>
load_entry_point('bugwarrior==1.5.1', 'console_scripts', 'bugwarrior-pull')()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7... | KeyError |
def synchronize(issue_generator, conf, main_section, dry_run=False):
def _bool_option(section, option, default):
try:
return asbool(conf.get(section, option))
except (NoSectionError, NoOptionError):
return default
targets = [t.strip() for t in conf.get(main_section, "tar... | def synchronize(issue_generator, conf, main_section, dry_run=False):
def _bool_option(section, option, default):
try:
return asbool(conf.get(section, option))
except (NoSectionError, NoOptionError):
return default
targets = [t.strip() for t in conf.get(main_section, "tar... | https://github.com/ralphbean/bugwarrior/issues/350 | Traceback (most recent call last):
File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
msg = self.format(record)
File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/__init__.py", line 465, in format
record.message = record.getMessage... | UnicodeDecodeError |
def send_notification(issue, op, conf):
notify_backend = conf.get("notifications", "backend")
if notify_backend == "pynotify":
warnings.warn(
"pynotify is deprecated. Use backend=gobject. "
"See https://github.com/ralphbean/bugwarrior/issues/336"
)
notify_backe... | def send_notification(issue, op, conf):
notify_backend = conf.get("notifications", "backend")
# Notifications for growlnotify on Mac OS X
if notify_backend == "growlnotify":
import gntp.notifier
growl = gntp.notifier.GrowlNotifier(
applicationName="Bugwarrior",
noti... | https://github.com/ralphbean/bugwarrior/issues/336 | Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/bugwarrior/command.py", line 56, in pull
synchronize(issue_generator, config, main_section, dry_run)
File "/usr/lib/python2.7/dist-packages/bugwarrior/db.py", line 366, in synchronize
send_notification(issue, 'Created', conf)
File "/usr/lib/pytho... | ImportError |
def is_local(self):
return self.chain_id not in PUBLIC_CHAINS
| def is_local(self):
# TODO: #1505 -- rethink this metaphor
return int(self.w3.net.version) not in PUBLIC_CHAINS
| https://github.com/nucypher/nucypher/issues/2484 | nucypher | Authenticating Ursula
geth | WARN [12-19|12:41:45.063] Served net_version conn=172.18.0.4:40246 reqid=3 t="12.63µs" err="the method net_version does not exist/is not available"
nucypher | Traceback (most recent call last):
nucypher | File "/usr/local/lib/python3.7/sit... | KeyError |
def get_external_ip_from_default_teacher(
network: str,
federated_only: bool = False,
registry: Optional[BaseContractRegistry] = None,
log: Logger = IP_DETECTION_LOGGER,
) -> Union[str, None]:
# Prevents circular import
from nucypher.characters.lawful import Ursula
if federated_only and reg... | def get_external_ip_from_default_teacher(
network: str,
federated_only: bool = False,
log: Logger = IP_DETECTION_LOGGER,
registry: BaseContractRegistry = None,
) -> Union[str, None]:
from nucypher.characters.lawful import Ursula
if federated_only and registry:
raise ValueError("Federate... | https://github.com/nucypher/nucypher/issues/2529 | Verbose mode is enabled
Authenticating Ursula
Qualifying worker
✓ Worker is bonded to 0x559A0408aAf3beAb55E80Bd5E2ea83D233f43F7d
✓ Worker is funded with 0.378943746597798709 ETH
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/nucypher/characters/lawful.py", line 1466, in __attempt
teacher = cl... | ConnectionRefusedError |
def get_external_ip_from_known_nodes(
known_nodes: FleetSensor, sample_size: int = 3, log: Logger = IP_DETECTION_LOGGER
) -> Union[str, None]:
"""
Randomly select a sample of peers to determine the external IP address
of this host. The first node to reply successfully will be used.
# TODO: Paralleli... | def get_external_ip_from_known_nodes(
known_nodes: FleetSensor, sample_size: int = 3, log: Logger = IP_DETECTION_LOGGER
) -> Union[str, None]:
"""
Randomly select a sample of peers to determine the external IP address
of this host. The first node to reply successfully will be used.
# TODO: Paralleli... | https://github.com/nucypher/nucypher/issues/2529 | Verbose mode is enabled
Authenticating Ursula
Qualifying worker
✓ Worker is bonded to 0x559A0408aAf3beAb55E80Bd5E2ea83D233f43F7d
✓ Worker is funded with 0.378943746597798709 ETH
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/nucypher/characters/lawful.py", line 1466, in __attempt
teacher = cl... | ConnectionRefusedError |
def get_external_ip_from_centralized_source(
log: Logger = IP_DETECTION_LOGGER,
) -> Union[str, None]:
"""Use hardcoded URL to determine the external IP address of this host."""
ip = _request(url=CENTRALIZED_IP_ORACLE_URL)
if ip:
log.info(
f"Fetched external IP address ({ip}) from ce... | def get_external_ip_from_centralized_source(
log: Logger = IP_DETECTION_LOGGER,
) -> Union[str, None]:
"""Use hardcoded URL to determine the external IP address of this host."""
endpoint = "https://ifconfig.me/"
ip = __request(url=endpoint)
if ip:
log.info(
f"Fetched external IP ... | https://github.com/nucypher/nucypher/issues/2529 | Verbose mode is enabled
Authenticating Ursula
Qualifying worker
✓ Worker is bonded to 0x559A0408aAf3beAb55E80Bd5E2ea83D233f43F7d
✓ Worker is funded with 0.378943746597798709 ETH
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/nucypher/characters/lawful.py", line 1466, in __attempt
teacher = cl... | ConnectionRefusedError |
def up(
general_config,
staker_options,
config_file,
cloudprovider,
aws_profile,
remote_provider,
nucypher_image,
seed_network,
stakes,
wipe,
prometheus,
namespace,
envvars,
):
"""Creates workers for all stakes owned by the user for the given network."""
emit... | def up(
general_config,
staker_options,
config_file,
cloudprovider,
aws_profile,
remote_provider,
nucypher_image,
seed_network,
sentry_dsn,
stakes,
wipe,
prometheus,
namespace,
):
"""Creates workers for all stakes owned by the user for the given network."""
e... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def create(
general_config,
cloudprovider,
aws_profile,
remote_provider,
nucypher_image,
seed_network,
prometheus,
count,
namespace,
network,
envvars,
):
"""Creates the required number of workers to be staked later under a namespace"""
emitter = setup_emitter(general... | def create(
general_config,
cloudprovider,
aws_profile,
remote_provider,
nucypher_image,
seed_network,
sentry_dsn,
prometheus,
count,
namespace,
network,
):
"""Creates the required number of workers to be staked later under a namespace"""
emitter = setup_emitter(gene... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def add(
general_config,
host_address,
login_name,
key_path,
ssh_port,
host_nickname,
namespace,
network,
):
"""Adds an existing node to the local config for future management."""
emitter = setup_emitter(general_config)
name = host_nickname
deployer = CloudDeployers.get... | def add(
general_config,
host_address,
login_name,
key_path,
ssh_port,
host_nickname,
namespace,
network,
):
"""Adds an existing node to the local config for future management."""
emitter = setup_emitter(general_config)
name = f"{namespace}-{network}-{host_nickname}"
de... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def add_for_stake(
general_config,
staker_options,
config_file,
staker_address,
host_address,
login_name,
key_path,
ssh_port,
namespace,
):
"""Sets an existing node as the host for the given staker address."""
emitter = setup_emitter(general_config)
STAKEHOLDER = staker... | def add_for_stake(
general_config,
staker_address,
host_address,
login_name,
key_path,
ssh_port,
namespace,
):
"""Sets an existing node as the host for the given staker address."""
emitter = setup_emitter(general_config)
STAKEHOLDER = staker_options.create_character(emitter, co... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def deploy(
general_config,
remote_provider,
nucypher_image,
seed_network,
wipe,
prometheus,
namespace,
network,
gas_strategy,
include_hosts,
envvars,
):
"""Deploys NuCypher on managed hosts."""
emitter = setup_emitter(general_config)
if not CloudDeployers:
... | def deploy(
general_config,
remote_provider,
nucypher_image,
seed_network,
sentry_dsn,
wipe,
prometheus,
namespace,
network,
gas_strategy,
include_hosts,
):
"""Deploys NuCypher on managed hosts."""
emitter = setup_emitter(general_config)
if not CloudDeployers:
... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def update(
general_config,
remote_provider,
nucypher_image,
seed_network,
wipe,
prometheus,
namespace,
network,
gas_strategy,
include_hosts,
envvars,
):
"""Updates existing installations of Nucypher on existing managed remote hosts."""
emitter = setup_emitter(genera... | def update(
general_config,
remote_provider,
nucypher_image,
seed_network,
sentry_dsn,
wipe,
prometheus,
namespace,
network,
gas_strategy,
include_hosts,
):
"""Updates existing installations of Nucypher on existing managed remote hosts."""
emitter = setup_emitter(gen... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def __init__(
self,
emitter,
stakeholder,
stakeholder_config_path,
blockchain_provider=None,
nucypher_image=None,
seed_network=False,
profile=None,
prometheus=False,
pre_config=False,
network=None,
namespace=None,
gas_strategy=None,
action=None,
envvars=None,
... | def __init__(
self,
emitter,
stakeholder,
stakeholder_config_path,
blockchain_provider=None,
nucypher_image=None,
seed_network=False,
sentry_dsn=None,
profile=None,
prometheus=False,
pre_config=False,
network=None,
namespace=None,
gas_strategy=None,
action=Non... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def network_config_path(self):
return Path(DEFAULT_CONFIG_ROOT).joinpath(NODE_CONFIG_STORAGE_KEY, self.network)
| def network_config_path(self):
return os.path.join(DEFAULT_CONFIG_ROOT, NODE_CONFIG_STORAGE_KEY, self.network)
| https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def inventory_path(self):
return str(
Path(DEFAULT_CONFIG_ROOT).joinpath(
NODE_CONFIG_STORAGE_KEY, f"{self.namespace_network}.ansible_inventory.yml"
)
)
| def inventory_path(self):
return os.path.join(
DEFAULT_CONFIG_ROOT,
NODE_CONFIG_STORAGE_KEY,
f"{self.namespace_network}.ansible_inventory.yml",
)
| https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def deploy_nucypher_on_existing_nodes(self, node_names, wipe_nucypher=False):
playbook = Path(DEPLOY_DIR).joinpath("ansible/worker/setup_remote_workers.yml")
# first update any specified input in our node config
for k, input_specified_value in self.host_level_overrides.items():
for node_name in nod... | def deploy_nucypher_on_existing_nodes(self, node_names, wipe_nucypher=False):
playbook = "deploy/ansible/worker/setup_remote_workers.yml"
# first update any specified input in our node config
for k, input_specified_value in self.host_level_overrides.items():
for node_name in node_names:
... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def update_nucypher_on_existing_nodes(self, node_names):
playbook = Path(DEPLOY_DIR).joinpath("ansible/worker/update_remote_workers.yml")
# first update any specified input in our node config
for k, input_specified_value in self.host_level_overrides.items():
for node_name in node_names:
... | def update_nucypher_on_existing_nodes(self, node_names):
playbook = "deploy/ansible/worker/update_remote_workers.yml"
# first update any specified input in our node config
for k, input_specified_value in self.host_level_overrides.items():
for node_name in node_names:
if self.config["ins... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def get_worker_status(self, node_names):
playbook = Path(DEPLOY_DIR).joinpath("ansible/worker/get_workers_status.yml")
self.update_generate_inventory(node_names)
loader = DataLoader()
inventory = InventoryManager(loader=loader, sources=self.inventory_path)
callback = AnsiblePlayBookResultsCollecto... | def get_worker_status(self, node_names):
playbook = "deploy/ansible/worker/get_workers_status.yml"
self.generate_ansible_inventory(node_names)
loader = DataLoader()
inventory = InventoryManager(loader=loader, sources=self.inventory_path)
callback = AnsiblePlayBookResultsCollector(
sock=sel... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def print_worker_logs(self, node_names):
playbook = Path(DEPLOY_DIR).joinpath("ansible/worker/get_worker_logs.yml")
self.update_generate_inventory(node_names)
loader = DataLoader()
inventory = InventoryManager(loader=loader, sources=self.inventory_path)
callback = AnsiblePlayBookResultsCollector(
... | def print_worker_logs(self, node_names):
playbook = "deploy/ansible/worker/get_worker_logs.yml"
self.generate_ansible_inventory(node_names)
loader = DataLoader()
inventory = InventoryManager(loader=loader, sources=self.inventory_path)
callback = AnsiblePlayBookResultsCollector(
sock=self.e... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def backup_remote_data(self, node_names):
playbook = Path(DEPLOY_DIR).joinpath("ansible/worker/backup_remote_workers.yml")
self.update_generate_inventory(node_names)
loader = DataLoader()
inventory = InventoryManager(loader=loader, sources=self.inventory_path)
callback = AnsiblePlayBookResultsColle... | def backup_remote_data(self, node_names):
playbook = "deploy/ansible/worker/backup_remote_workers.yml"
self.generate_ansible_inventory(node_names)
loader = DataLoader()
inventory = InventoryManager(loader=loader, sources=self.inventory_path)
callback = AnsiblePlayBookResultsCollector(
sock=... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def restore_from_backup(self, target_host, source_path):
playbook = Path(DEPLOY_DIR).joinpath(
"ansible/worker/restore_ursula_from_backup.yml"
)
self.update_generate_inventory([target_host], restore_path=source_path)
loader = DataLoader()
inventory = InventoryManager(loader=loader, sources... | def restore_from_backup(self, target_host, source_path):
playbook = "deploy/ansible/worker/restore_ursula_from_backup.yml"
self.generate_ansible_inventory([target_host], restore_path=source_path)
loader = DataLoader()
inventory = InventoryManager(loader=loader, sources=self.inventory_path)
callbac... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def give_helpful_hints(self, node_names, backup=False, playbook=None):
self.emitter.echo("some relevant info:")
self.emitter.echo(f' config file: "{self.config_path}"')
self.emitter.echo(f" inventory file: {self.inventory_path}", color="yellow")
if self.config.get("keypair_path"):
self.emitter.e... | def give_helpful_hints(self, node_names, backup=False, playbook=None):
self.emitter.echo("some relevant info:")
self.emitter.echo(f' config file: "{self.config_path}"')
self.emitter.echo(f" inventory file: {self.inventory_path}", color="yellow")
if self.config.get("keypair_path"):
self.emitter.e... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def _create_keypair(self):
new_keypair_data = self.ec2Client.create_key_pair(
KeyName=f"{self.namespace_network}"
)
outpath = Path(DEFAULT_CONFIG_ROOT).joinpath(
NODE_CONFIG_STORAGE_KEY, f"{self.namespace_network}.awskeypair"
)
os.makedirs(os.path.dirname(outpath), exist_ok=True)
... | def _create_keypair(self):
new_keypair_data = self.ec2Client.create_key_pair(
KeyName=f"{self.namespace_network}"
)
outpath = os.path.join(
DEFAULT_CONFIG_ROOT,
NODE_CONFIG_STORAGE_KEY,
f"{self.namespace_network}.awskeypair",
)
os.makedirs(os.path.dirname(outpath), ex... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def _delete_keypair(self):
# only use self.namespace here to avoid accidental deletions of pre-existing keypairs
deleted_keypair_data = self.ec2Client.delete_key_pair(
KeyName=f"{self.namespace_network}"
)
if deleted_keypair_data["HTTPStatusCode"] == 200:
outpath = Path(DEFAULT_CONFIG_RO... | def _delete_keypair(self):
# only use self.namespace here to avoid accidental deletions of pre-existing keypairs
deleted_keypair_data = self.ec2Client.delete_key_pair(
KeyName=f"{self.namespace_network}"
)
if deleted_keypair_data["HTTPStatusCode"] == 200:
outpath = os.path.join(
... | https://github.com/nucypher/nucypher/issues/2473 | Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call... | TypeError |
def escape_format_string(cls, string):
"""
Escapes all curly braces from a PEP-3101's format string.
"""
escaped_string = string.replace("{", "{{").replace("}", "}}")
return escaped_string
| def escape_format_string(cls, string):
"""
Escapes curly braces from a PEP-3101's format string when there's a sequence of odd length
"""
def escape_group_of_curly_braces(match):
curlies = match.group()
if len(curlies) % 2 == 1:
curlies += curlies
return curlies
... | https://github.com/nucypher/nucypher/issues/2404 | crawler_1 | Temporarily disabling observer <twisted.logger._file.FileLogObserver object at 0x7f2956104ef0> due to exception: [Failure instance: Traceback: <class 'ValueError'>: Single '}' encountered in format string
crawler_1 | /usr/local/lib/python3.7/site-packages/monitor/crawler.py:323:learn_from_teacher_node
c... | ValueError |
def set_min_rate(
general_config: GroupGeneralConfig,
transacting_staker_options: TransactingStakerOptions,
config_file,
force,
min_rate,
):
"""Staker sets the minimum acceptable fee rate for their associated worker."""
# Setup
emitter = setup_emitter(general_config)
STAKEHOLDER = t... | def set_min_rate(
general_config: GroupGeneralConfig,
transacting_staker_options: TransactingStakerOptions,
config_file,
force,
min_rate,
):
"""Staker sets the minimum acceptable fee rate for their associated worker."""
# Setup
emitter = setup_emitter(general_config)
STAKEHOLDER = t... | https://github.com/nucypher/nucypher/issues/2390 | Traceback (most recent call last):
File "/home/tux/code/nucypher-prod/venv/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/tux/code/nucypher-prod/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwarg... | AttributeError |
def config(general_config, config_options, config_file):
"""View and optionally update the Ursula node's configuration."""
emitter = setup_emitter(general_config, config_options.worker_address)
if not config_file:
config_file = select_config_file(
emitter=emitter,
checksum_ad... | def config(general_config, config_options, config_file):
"""View and optionally update the Ursula node's configuration."""
emitter = setup_emitter(general_config, config_options.worker_address)
if not config_file:
config_file = select_config_file(
emitter=emitter,
checksum_ad... | https://github.com/nucypher/nucypher/issues/2390 | Traceback (most recent call last):
File "/home/tux/code/nucypher-prod/venv/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/tux/code/nucypher-prod/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwarg... | AttributeError |
def paint_min_rate(emitter, staker):
paint_fee_rate_range(emitter, staker.policy_agent)
minimum = staker.min_fee_rate
raw_minimum = staker.raw_min_fee_rate
rate_payload = f"""
Minimum acceptable fee rate (set by staker for their associated worker):
~ Previously set ....... {prettify_eth_amount(raw_... | def paint_min_rate(emitter, registry, policy_agent, staker_address):
paint_fee_rate_range(emitter, policy_agent)
minimum = policy_agent.min_fee_rate(staker_address)
raw_minimum = policy_agent.raw_min_fee_rate(staker_address)
rate_payload = f"""
Minimum acceptable fee rate (set by staker for their assoc... | https://github.com/nucypher/nucypher/issues/2390 | Traceback (most recent call last):
File "/home/tux/code/nucypher-prod/venv/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/tux/code/nucypher-prod/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwarg... | AttributeError |
def keep_learning_about_nodes(self):
"""
Continually learn about new nodes.
"""
# TODO: Allow the user to set eagerness? 1712
# TODO: Also, if we do allow eager, don't even defer; block right here.
self._learning_deferred = Deferred(
canceller=self._discovery_canceller
) # TODO: ... | def keep_learning_about_nodes(self):
"""
Continually learn about new nodes.
"""
# TODO: Allow the user to set eagerness? 1712
# TODO: Also, if we do allow eager, don't even defer; block right here.
self._learning_deferred = Deferred(
canceller=self._discovery_canceller
) # TODO: ... | https://github.com/nucypher/nucypher/issues/2390 | Traceback (most recent call last):
File "/home/tux/code/nucypher-prod/venv/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/tux/code/nucypher-prod/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwarg... | AttributeError |
def _discover_or_abort(_first_result):
# self.log.debug(f"{self} learning at {datetime.datetime.now()}") # 1712
result = self.learn_from_teacher_node(
eager=False, canceller=self._discovery_canceller
)
# self.log.debug(f"{self} finished learning at {datetime.datetime.now()}") # 1712
retur... | def _discover_or_abort(_first_result):
self.log.debug(f"{self} learning at {datetime.datetime.now()}")
result = self.learn_from_teacher_node(
eager=False, canceller=self._discovery_canceller
)
self.log.debug(f"{self} finished learning at {datetime.datetime.now()}")
return result
| https://github.com/nucypher/nucypher/issues/2390 | Traceback (most recent call last):
File "/home/tux/code/nucypher-prod/venv/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/tux/code/nucypher-prod/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwarg... | AttributeError |
def _make_rest_app(
datastore: Datastore, this_node, serving_domain: str, log: Logger
) -> Flask:
from nucypher.characters.lawful import Alice, Ursula
_alice_class = Alice
_node_class = Ursula
rest_app = Flask("ursula-service")
rest_app.config["MAX_CONTENT_LENGTH"] = MAX_UPLOAD_CONTENT_LENGTH
... | def _make_rest_app(
datastore: Datastore, this_node, serving_domain: str, log: Logger
) -> Flask:
from nucypher.characters.lawful import Alice, Ursula
_alice_class = Alice
_node_class = Ursula
rest_app = Flask("ursula-service")
rest_app.config["MAX_CONTENT_LENGTH"] = MAX_UPLOAD_CONTENT_LENGTH
... | https://github.com/nucypher/nucypher/issues/2390 | Traceback (most recent call last):
File "/home/tux/code/nucypher-prod/venv/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/tux/code/nucypher-prod/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwarg... | AttributeError |
def node_metadata_exchange():
# If these nodes already have the same fleet state, no exchange is necessary.
learner_fleet_state = request.args.get("fleet")
if learner_fleet_state == this_node.known_nodes.checksum:
# log.debug("Learner already knew fleet state {}; doing nothing.".format(learner_fleet... | def node_metadata_exchange():
# If these nodes already have the same fleet state, no exchange is necessary.
learner_fleet_state = request.args.get("fleet")
if learner_fleet_state == this_node.known_nodes.checksum:
log.debug(
"Learner already knew fleet state {}; doing nothing.".format(
... | https://github.com/nucypher/nucypher/issues/2390 | Traceback (most recent call last):
File "/home/tux/code/nucypher-prod/venv/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/tux/code/nucypher-prod/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwarg... | AttributeError |
def __getitem__(self, event_name: str):
event_method = self.__get_web3_event_by_name(event_name)
def wrapper(from_block=None, to_block=None, **argument_filters):
if from_block is None:
from_block = 0 # TODO: we can do better. Get contract creation block.
if to_block is None:
... | def __getitem__(self, event_name: str):
event_method = self.__get_web3_event_by_name(event_name)
def wrapper(from_block=None, to_block=None, **argument_filters):
if from_block is None:
from_block = 0 # TODO: we can do better. Get contract creation block.
if to_block is None:
... | https://github.com/nucypher/nucypher/issues/2291 | 2020-09-23T14:29:04+0000 [twisted.internet.defer#critical] Unhandled error in Deferred:
2020-09-23T14:29:04+0000 [twisted.internet.defer#critical]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/twisted/internet/base.py", line 1283, in run
self.mainLoop()
File "/usr/local/lib/python3.6/d... | builtins.ValueError |
def wrapper(from_block=None, to_block=None, **argument_filters):
if from_block is None:
from_block = 0 # TODO: we can do better. Get contract creation block.
if to_block is None:
to_block = "latest"
entries = event_method.getLogs(
fromBlock=from_block, toBlock=to_block, argument_fi... | def wrapper(from_block=None, to_block=None, **argument_filters):
if from_block is None:
from_block = 0 # TODO: we can do better. Get contract creation block.
if to_block is None:
to_block = "latest"
event_filter = event_method.createFilter(
fromBlock=from_block, toBlock=to_block, a... | https://github.com/nucypher/nucypher/issues/2291 | 2020-09-23T14:29:04+0000 [twisted.internet.defer#critical] Unhandled error in Deferred:
2020-09-23T14:29:04+0000 [twisted.internet.defer#critical]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/twisted/internet/base.py", line 1283, in run
self.mainLoop()
File "/usr/local/lib/python3.6/d... | builtins.ValueError |
def __init__(
self,
agent: "EthereumContractAgent",
event_name: str,
from_block: int,
to_block: int = None, # defaults to latest block
max_blocks_per_call: int = DEFAULT_MAX_BLOCKS_PER_CALL,
**argument_filters,
):
self.event_filter = agent.events[event_name]
self.from_block = from_b... | def __init__(
self,
agent: "EthereumContractAgent",
event_name: str,
from_block: int,
to_block: int = None, # defaults to latest block
max_blocks_per_call: int = DEFAULT_MAX_BLOCKS_PER_CALL,
**argument_filters,
):
if not agent:
raise ValueError(f"Contract agent must be provided"... | https://github.com/nucypher/nucypher/issues/2291 | 2020-09-23T14:29:04+0000 [twisted.internet.defer#critical] Unhandled error in Deferred:
2020-09-23T14:29:04+0000 [twisted.internet.defer#critical]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/twisted/internet/base.py", line 1283, in run
self.mainLoop()
File "/usr/local/lib/python3.6/d... | builtins.ValueError |
def __iter__(self):
current_from_block = self.from_block
current_to_block = min(self.from_block + self.max_blocks_per_call, self.to_block)
while current_from_block <= current_to_block:
for event_record in self.event_filter(
from_block=current_from_block,
to_block=current_to_b... | def __iter__(self):
current_from_block = self.from_block
current_to_block = min(self.from_block + self.max_blocks_per_call, self.to_block)
while current_from_block < current_to_block:
for event_record in self.event_filter(
from_block=current_from_block,
to_block=current_to_bl... | https://github.com/nucypher/nucypher/issues/2291 | 2020-09-23T14:29:04+0000 [twisted.internet.defer#critical] Unhandled error in Deferred:
2020-09-23T14:29:04+0000 [twisted.internet.defer#critical]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/twisted/internet/base.py", line 1283, in run
self.mainLoop()
File "/usr/local/lib/python3.6/d... | builtins.ValueError |
def events(general_config, staker_options, config_file, event_name):
"""See blockchain events associated to a staker"""
# Setup
emitter = setup_emitter(general_config)
STAKEHOLDER = staker_options.create_character(emitter, config_file)
_client_account, staking_address = select_client_account_for_s... | def events(general_config, staker_options, config_file, event_name):
"""See blockchain events associated to a staker"""
# Setup
emitter = setup_emitter(general_config)
STAKEHOLDER = staker_options.create_character(emitter, config_file)
_client_account, staking_address = select_client_account_for_s... | https://github.com/nucypher/nucypher/issues/2291 | 2020-09-23T14:29:04+0000 [twisted.internet.defer#critical] Unhandled error in Deferred:
2020-09-23T14:29:04+0000 [twisted.internet.defer#critical]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/twisted/internet/base.py", line 1283, in run
self.mainLoop()
File "/usr/local/lib/python3.6/d... | builtins.ValueError |
def __init__(
self,
event_name: str,
event_args_config: Dict[str, tuple],
argument_filters: Dict[str, str],
contract_agent: ContractAgents,
):
super().__init__()
self.event_name = event_name
self.contract_agent = contract_agent
# this way we don't have to deal with 'latest' at all
... | def __init__(
self,
event_name: str,
event_args_config: Dict[str, tuple],
argument_filters: Dict[str, str],
contract_agent: ContractAgents,
):
super().__init__()
self.event_name = event_name
self.contract_agent = contract_agent
self.event_filter = contract_agent.contract.events[event... | https://github.com/nucypher/nucypher/issues/2291 | 2020-09-23T14:29:04+0000 [twisted.internet.defer#critical] Unhandled error in Deferred:
2020-09-23T14:29:04+0000 [twisted.internet.defer#critical]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/twisted/internet/base.py", line 1283, in run
self.mainLoop()
File "/usr/local/lib/python3.6/d... | builtins.ValueError |
def _collect_internal(self) -> None:
from_block = self.filter_current_from_block
to_block = self.contract_agent.blockchain.client.block_number
if from_block >= to_block:
# we've already checked the latest block and waiting for a new block
# nothing to see here
return
events_thro... | def _collect_internal(self) -> None:
events = self.event_filter.get_new_entries()
for event in events:
self._event_occurred(event)
| https://github.com/nucypher/nucypher/issues/2291 | 2020-09-23T14:29:04+0000 [twisted.internet.defer#critical] Unhandled error in Deferred:
2020-09-23T14:29:04+0000 [twisted.internet.defer#critical]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/twisted/internet/base.py", line 1283, in run
self.mainLoop()
File "/usr/local/lib/python3.6/d... | builtins.ValueError |
def initialize(self, metrics_prefix: str, registry: CollectorRegistry) -> None:
super().initialize(metrics_prefix=metrics_prefix, registry=registry)
missing_commitments = self.contract_agent.get_missing_commitments(
checksum_address=self.staker_address
)
if missing_commitments == 0:
# h... | def initialize(self, metrics_prefix: str, registry: CollectorRegistry) -> None:
super().initialize(metrics_prefix=metrics_prefix, registry=registry)
missing_commitments = self.contract_agent.get_missing_commitments(
checksum_address=self.staker_address
)
if missing_commitments == 0:
# h... | https://github.com/nucypher/nucypher/issues/2291 | 2020-09-23T14:29:04+0000 [twisted.internet.defer#critical] Unhandled error in Deferred:
2020-09-23T14:29:04+0000 [twisted.internet.defer#critical]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/twisted/internet/base.py", line 1283, in run
self.mainLoop()
File "/usr/local/lib/python3.6/d... | builtins.ValueError |
def block_until_ready(self, poll_rate: int = None, timeout: int = None):
"""
Polls the staking_agent and blocks until the staking address is not
a null address for the given worker_address. Once the worker is bonded, it returns the staker address.
"""
if not self.__worker_address:
raise Runt... | def block_until_ready(self, poll_rate: int = None, timeout: int = None):
"""
Polls the staking_agent and blocks until the staking address is not
a null address for the given worker_address. Once the worker is bonded, it returns the staker address.
"""
if not self.__worker_address:
raise Runt... | https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def __init__(
self,
# Ursula
rest_host: str,
rest_port: int,
domains: Set = None, # For now, serving and learning domains will be the same.
certificate: Certificate = None,
certificate_filepath: str = None,
db_filepath: str = None,
is_me: bool = True,
interface_signature=None,
... | def __init__(
self,
# Ursula
rest_host: str,
rest_port: int,
domains: Set = None, # For now, serving and learning domains will be the same.
certificate: Certificate = None,
certificate_filepath: str = None,
db_filepath: str = None,
is_me: bool = True,
interface_signature=None,
... | https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def run(
self,
emitter: StdoutEmitter = None,
hendrix: bool = True,
learning: bool = True,
availability: bool = True,
worker: bool = True,
pruning: bool = True,
interactive: bool = False,
prometheus: bool = False,
start_reactor: bool = True,
) -> None:
"""Schedule and start s... | def run(
self,
emitter: StdoutEmitter = None,
hendrix: bool = True,
learning: bool = True,
availability: bool = True,
worker: bool = True,
pruning: bool = True,
interactive: bool = False,
prometheus: bool = False,
start_reactor: bool = True,
) -> None:
"""Schedule and start s... | https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def stop(self, halt_reactor: bool = False) -> None:
"""Stop services"""
self._availability_tracker.stop()
if self._learning_task.running:
self.stop_learning_loop()
if not self.federated_only:
self.work_tracker.stop()
if self._arrangement_pruning_task.running:
self._arrangemen... | def stop(self, halt_reactor: bool = False) -> None:
"""Stop services"""
self._availability_sensor.stop()
if self._learning_task.running:
self.stop_learning_loop()
if not self.federated_only:
self.work_tracker.stop()
if self._arrangement_pruning_task.running:
self._arrangement... | https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def unlock_nucypher_keyring(
emitter, password: str, character_configuration: CharacterConfiguration
):
emitter.message(
f"Decrypting {character_configuration._NAME} keyring...", color="yellow"
)
if character_configuration.dev_mode:
return True # Dev accounts are always unlocked
# ... | def unlock_nucypher_keyring(
emitter, password: str, character_configuration: CharacterConfiguration
):
emitter.message("Decrypting NuCypher keyring...", color="yellow")
if character_configuration.dev_mode:
return True # Dev accounts are always unlocked
# NuCypher
try:
character_co... | https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def make_cli_character(
character_config,
emitter,
unlock_keyring: bool = True,
teacher_uri: str = None,
min_stake: int = 0,
load_preferred_teachers: bool = True,
**config_args,
):
#
# Pre-Init
#
# Handle Keyring
if unlock_keyring:
unlock_nucypher_keyring(
... | def make_cli_character(
character_config,
emitter,
unlock_keyring: bool = True,
teacher_uri: str = None,
min_stake: int = 0,
load_preferred_teachers: bool = True,
**config_args,
):
#
# Pre-Init
#
# Handle Keyring
if unlock_keyring:
unlock_nucypher_keyring(
... | https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def paint_node_status(emitter, ursula, start_time):
ursula.mature() # Just to be sure
# Build Learning status line
learning_status = "Unknown"
if ursula._learning_task.running:
learning_status = "Learning at {}s Intervals".format(
ursula._learning_task.interval
)
elif n... | def paint_node_status(emitter, ursula, start_time):
ursula.mature() # Just to be sure
# Build Learning status line
learning_status = "Unknown"
if ursula._learning_task.running:
learning_status = "Learning at {}s Intervals".format(
ursula._learning_task.interval
)
elif n... | https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def connectionMade(self):
self.emitter.echo("\nType 'help' or '?' for help")
self.transport.write(self.prompt)
| def connectionMade(self):
message = "Attached {}@{}".format(
self.ursula.checksum_address, self.ursula.rest_url()
)
self.emitter.echo(message, color="green")
self.emitter.echo(
"{} | {}".format(self.ursula.nickname_icon, self.ursula.nickname),
color="blue",
bold=True,
... | https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def get_certificate(
self,
host,
port,
timeout=3,
retry_attempts: int = 3,
retry_rate: int = 2,
current_attempt: int = 0,
):
socket.setdefaulttimeout(timeout) # Set Socket Timeout
try:
self.log.info(f"Fetching seednode {host}:{port} TLS certificate")
seednode_certif... | def get_certificate(
self,
host,
port,
timeout=3,
retry_attempts: int = 3,
retry_rate: int = 2,
current_attempt: int = 0,
):
socket.setdefaulttimeout(timeout) # Set Socket Timeout
try:
self.log.info(f"Fetching seednode {host}:{port} TLS certificate")
seednode_certif... | https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def check_rest_availability(self, initiator, responder):
response = self.client.post(
node_or_sprout=responder,
data=bytes(initiator),
path="ping",
timeout=6, # Two round trips are expected
)
return response
| def check_rest_availability(
self, requesting_ursula, responding_ursula, certificate_filepath=None
):
response = self.client.post(
node_or_sprout=responding_ursula,
data=bytes(requesting_ursula),
path="ping",
timeout=4, # Two round trips are expected
certificate_filepath... | https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def stop_learning_loop(self, reason=None):
"""
Only for tests at this point. Maybe some day for graceful shutdowns.
"""
if self._learning_task.running:
self._learning_task.stop()
| def stop_learning_loop(self, reason=None):
"""
Only for tests at this point. Maybe some day for graceful shutdowns.
"""
self._learning_task.stop()
| https://github.com/nucypher/nucypher/issues/1833 | Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Unhandled error in Deferred:
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: Traceback (most recent call last):
Apr 02 17:02:28 ip-172-31-19-8 nucypher[29582]: File "/home/ubuntu/nucypher-venv/lib/python3.6/site-packages/twisted/internet/base.py", line 1283, in run
Apr ... | ValueError |
def __init__(
self,
checksum_address: str,
is_transacting: bool = True,
client_password: str = None,
*args,
**kwargs,
):
super().__init__(checksum_address=checksum_address, *args, **kwargs)
self.worklock_agent = ContractAgency.get_agent(
WorkLockAgent, registry=self.registry
... | def __init__(self, checksum_address: str, client_password: str = None, *args, **kwargs):
super().__init__(checksum_address=checksum_address, *args, **kwargs)
self.worklock_agent = ContractAgency.get_agent(
WorkLockAgent, registry=self.registry
)
self.staking_agent = ContractAgency.get_agent(
... | https://github.com/nucypher/nucypher/issues/1721 | Traceback (most recent call last):
File "/Users/david/.local/share/virtualenvs/nucypher-cjt3uwkK/bin/nucypher", line 11, in <module>
load_entry_point('nucypher', 'console_scripts', 'nucypher')()
File "/Users/david/.local/share/virtualenvs/nucypher-cjt3uwkK/lib/python3.7/site-packages/click/core.py", line 764, in __call... | nucypher.blockchain.eth.interfaces.InterfaceError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.