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 keys(self):
return list(sum(set(dir(obj)) for obj in self.objs))
| def keys(self):
return list(sum(set(dir(obj)) for obj in objs))
| https://github.com/saulpw/visidata/issues/251 | $ vd --debug -b -p newCol.vd
Think about what you're doing
opening newCol as vd
"."
opening . as dir
"1"
c=addColumn(SettableColumn("", width=options.default_width), cursorColIndex+1); draw(vd.scr); cursorVisibleColIndex=visibleCols.index(c); c.name=editCell(cursorVisibleColIndex, -1); c.width=None
AttributeError: 'Non... | AttributeError |
def __getitem__(self, k):
for obj in self.objs:
if k in dir(obj):
return getattr(obj, k)
return self.locals[k]
| def __getitem__(self, k):
for obj in self.objs:
if k in dir(obj):
return getattr(obj, k)
raise KeyError(k)
| https://github.com/saulpw/visidata/issues/251 | $ vd --debug -b -p newCol.vd
Think about what you're doing
opening newCol as vd
"."
opening . as dir
"1"
c=addColumn(SettableColumn("", width=options.default_width), cursorColIndex+1); draw(vd.scr); cursorVisibleColIndex=visibleCols.index(c); c.name=editCell(cursorVisibleColIndex, -1); c.width=None
AttributeError: 'Non... | AttributeError |
def __setitem__(self, k, v):
for obj in self.objs:
if k in dir(obj):
return setattr(obj, k, v)
self.locals[k] = v
| def __setitem__(self, k, v):
for obj in self.objs:
if k in dir(obj):
return setattr(self.objs[0], k, v)
return setattr(self.objs[-1], k, v)
| https://github.com/saulpw/visidata/issues/251 | $ vd --debug -b -p newCol.vd
Think about what you're doing
opening newCol as vd
"."
opening . as dir
"1"
c=addColumn(SettableColumn("", width=options.default_width), cursorColIndex+1); draw(vd.scr); cursorVisibleColIndex=visibleCols.index(c); c.name=editCell(cursorVisibleColIndex, -1); c.width=None
AttributeError: 'Non... | AttributeError |
def __init__(self):
self.sheets = [] # list of BaseSheet; all sheets on the sheet stack
self.allSheets = (
weakref.WeakKeyDictionary()
) # [BaseSheet] -> sheetname (all non-precious sheets ever pushed)
self.statuses = (
collections.OrderedDict()
) # (priority, statusmsg) -> num_re... | def __init__(self):
self.sheets = [] # list of BaseSheet; all sheets on the sheet stack
self.allSheets = (
weakref.WeakKeyDictionary()
) # [BaseSheet] -> sheetname (all non-precious sheets ever pushed)
self.statuses = (
collections.OrderedDict()
) # (priority, statusmsg) -> num_re... | https://github.com/saulpw/visidata/issues/251 | $ vd --debug -b -p newCol.vd
Think about what you're doing
opening newCol as vd
"."
opening . as dir
"1"
c=addColumn(SettableColumn("", width=options.default_width), cursorColIndex+1); draw(vd.scr); cursorVisibleColIndex=visibleCols.index(c); c.name=editCell(cursorVisibleColIndex, -1); c.width=None
AttributeError: 'Non... | AttributeError |
def _to_timestamp(dt: Optional[datetime.datetime]) -> Optional[timestamp_pb2.Timestamp]:
if dt is not None:
return timestamp_pb2.Timestamp(seconds=int(dt.timestamp()))
return None
| def _to_timestamp(dt: datetime.datetime):
return timestamp_pb2.Timestamp(seconds=int(dt.timestamp()))
| https://github.com/quantumlib/Cirq/issues/3787 | Traceback (most recent call last):
File "/home/lingyihu/miniconda3/envs/recirq/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/lingyihu/miniconda3/envs/recirq/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/lingyihu/proj... | ValueError |
def from_proto(cls, proto: qtypes.QuantumTimeSlot):
slot_type = qenums.QuantumTimeSlot.TimeSlotType(proto.slot_type)
start_time = None
end_time = None
if proto.HasField("start_time"):
start_time = datetime.datetime.fromtimestamp(proto.start_time.seconds)
if proto.HasField("end_time"):
... | def from_proto(cls, proto: qtypes.QuantumTimeSlot):
slot_type = qenums.QuantumTimeSlot.TimeSlotType(proto.slot_type)
if proto.HasField("reservation_config"):
return cls(
processor_id=proto.processor_name,
start_time=datetime.datetime.fromtimestamp(proto.start_time.seconds),
... | https://github.com/quantumlib/Cirq/issues/3787 | Traceback (most recent call last):
File "/home/lingyihu/miniconda3/envs/recirq/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/lingyihu/miniconda3/envs/recirq/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/lingyihu/proj... | ValueError |
def cirq_class_resolver_dictionary(self) -> Dict[str, Type]:
if self._crd is None:
import cirq
from cirq.devices.noise_model import _NoNoiseModel
from cirq.experiments import (
CrossEntropyResult,
CrossEntropyResultDict,
GridInteractionLayer,
)
... | def cirq_class_resolver_dictionary(self) -> Dict[str, Type]:
if self._crd is None:
import cirq
from cirq.devices.noise_model import _NoNoiseModel
from cirq.experiments import (
CrossEntropyResult,
CrossEntropyResultDict,
GridInteractionLayer,
)
... | https://github.com/quantumlib/Cirq/issues/3380 | Traceback (most recent call last):
File "/Users/balintp/Library/Application Support/JetBrains/PyCharm2020.2/scratches/scratch_1.py", line 3, in <module>
print(cirq.read_json(json_text="""{
File "/Users/balintp/dev/proj/Cirq/cirq/protocols/json_serialization.py", line 526, in read_json
return json.loads(json_text, objec... | ValueError |
def grid_qubit_from_proto_id(proto_id: str) -> "cirq.GridQubit":
"""Parse a proto id to a `cirq.GridQubit`.
Proto ids for grid qubits are of the form `{row}_{col}` where `{row}` is
the integer row of the grid qubit, and `{col}` is the integer column of
the qubit.
Args:
proto_id: The id to ... | def grid_qubit_from_proto_id(proto_id: str) -> "cirq.GridQubit":
"""Parse a proto id to a `cirq.GridQubit`.
Proto ids for grid qubits are of the form `{row}_{col}` where `{row}` is
the integer row of the grid qubit, and `{col}` is the integer column of
the qubit.
Args:
proto_id: The id to ... | https://github.com/quantumlib/Cirq/issues/3219 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~/Projects/Cirq/cirq/google/api/v2/program.py in grid_qubit_from_proto_id(proto_id)
102 row, col = parts
--> 103 return devices.GridQubit(row=int(row), ... | ValueError |
def main(
self,
args=None,
prog_name=None,
complete_var=None,
standalone_mode=True,
**extra,
):
"""This is the way to invoke a script with all the bells and
whistles as a command line application. This will always terminate
the application after a call. If this is not wanted, ``Sys... | def main(
self,
args=None,
prog_name=None,
complete_var=None,
standalone_mode=True,
**extra,
):
"""This is the way to invoke a script with all the bells and
whistles as a command line application. This will always terminate
the application after a call. If this is not wanted, ``Sys... | https://github.com/pallets/click/issues/942 | $ ./testclick subcommand <TAB>Traceback (most recent call last):
File "./testclick", line 23, in <module>
entrypoint(obj={'completions': ['abc', 'def', 'ghi', ]})
File "/home/user/testclick/venv/lib/python3.6/site-packages/click/core.py", line 731, in __call__
return self.main(*args, **kwargs)
File "/home/user/testclic... | TypeError |
def _main_shell_completion(self, ctx_args, prog_name, complete_var=None):
"""Check if the shell is asking for tab completion, process
that, then exit early. Called from :meth:`main` before the
program is invoked.
:param prog_name: Name of the executable in the shell.
:param complete_var: Name of th... | def _main_shell_completion(self, prog_name, complete_var=None):
"""Check if the shell is asking for tab completion, process
that, then exit early. Called from :meth:`main` before the
program is invoked.
:param prog_name: Name of the executable in the shell.
:param complete_var: Name of the environm... | https://github.com/pallets/click/issues/942 | $ ./testclick subcommand <TAB>Traceback (most recent call last):
File "./testclick", line 23, in <module>
entrypoint(obj={'completions': ['abc', 'def', 'ghi', ]})
File "/home/user/testclick/venv/lib/python3.6/site-packages/click/core.py", line 731, in __call__
return self.main(*args, **kwargs)
File "/home/user/testclic... | TypeError |
def shell_complete(cli, ctx_args, prog_name, complete_var, instruction):
"""Perform shell completion for the given CLI program.
:param cli: Command being called.
:param ctx_args: Extra arguments to pass to
``cli.make_context``.
:param prog_name: Name of the executable in the shell.
:param c... | def shell_complete(cli, prog_name, complete_var, instruction):
"""Perform shell completion for the given CLI program.
:param cli: Command being called.
:param prog_name: Name of the executable in the shell.
:param complete_var: Name of the environment variable that holds
the completion instruct... | https://github.com/pallets/click/issues/942 | $ ./testclick subcommand <TAB>Traceback (most recent call last):
File "./testclick", line 23, in <module>
entrypoint(obj={'completions': ['abc', 'def', 'ghi', ]})
File "/home/user/testclick/venv/lib/python3.6/site-packages/click/core.py", line 731, in __call__
return self.main(*args, **kwargs)
File "/home/user/testclic... | TypeError |
def __init__(self, cli, ctx_args, prog_name, complete_var):
self.cli = cli
self.ctx_args = ctx_args
self.prog_name = prog_name
self.complete_var = complete_var
| def __init__(self, cli, prog_name, complete_var):
self.cli = cli
self.prog_name = prog_name
self.complete_var = complete_var
| https://github.com/pallets/click/issues/942 | $ ./testclick subcommand <TAB>Traceback (most recent call last):
File "./testclick", line 23, in <module>
entrypoint(obj={'completions': ['abc', 'def', 'ghi', ]})
File "/home/user/testclick/venv/lib/python3.6/site-packages/click/core.py", line 731, in __call__
return self.main(*args, **kwargs)
File "/home/user/testclic... | TypeError |
def get_completions(self, args, incomplete):
"""Determine the context and last complete command or parameter
from the complete args. Call that object's ``shell_complete``
method to get the completions for the incomplete value.
:param args: List of complete args before the incomplete value.
:param i... | def get_completions(self, args, incomplete):
"""Determine the context and last complete command or parameter
from the complete args. Call that object's ``shell_complete``
method to get the completions for the incomplete value.
:param args: List of complete args before the incomplete value.
:param i... | https://github.com/pallets/click/issues/942 | $ ./testclick subcommand <TAB>Traceback (most recent call last):
File "./testclick", line 23, in <module>
entrypoint(obj={'completions': ['abc', 'def', 'ghi', ]})
File "/home/user/testclick/venv/lib/python3.6/site-packages/click/core.py", line 731, in __call__
return self.main(*args, **kwargs)
File "/home/user/testclic... | TypeError |
def _resolve_context(cli, ctx_args, prog_name, args):
"""Produce the context hierarchy starting with the command and
traversing the complete arguments. This only follows the commands,
it doesn't trigger input prompts or callbacks.
:param cli: Command being called.
:param prog_name: Name of the exec... | def _resolve_context(cli, prog_name, args):
"""Produce the context hierarchy starting with the command and
traversing the complete arguments. This only follows the commands,
it doesn't trigger input prompts or callbacks.
:param cli: Command being called.
:param prog_name: Name of the executable in ... | https://github.com/pallets/click/issues/942 | $ ./testclick subcommand <TAB>Traceback (most recent call last):
File "./testclick", line 23, in <module>
entrypoint(obj={'completions': ['abc', 'def', 'ghi', ]})
File "/home/user/testclick/venv/lib/python3.6/site-packages/click/core.py", line 731, in __call__
return self.main(*args, **kwargs)
File "/home/user/testclic... | TypeError |
def resolve_ctx(cli, prog_name, args):
"""
Parse into a hierarchy of contexts. Contexts are connected through the parent variable.
:param cli: command definition
:param prog_name: the program that is running
:param args: full list of args
:return: the final context/command parsed
"""
ctx... | def resolve_ctx(cli, prog_name, args):
"""
Parse into a hierarchy of contexts. Contexts are connected through the parent variable.
:param cli: command definition
:param prog_name: the program that is running
:param args: full list of args
:return: the final context/command parsed
"""
ctx... | https://github.com/pallets/click/issues/925 | Traceback (most recent call last):
File "test_compl.py", line 19, in <module>
test_argument_choice()
File "test_compl.py", line 14, in test_argument_choice
assert list(get_choices(cli, 'lol', ['arg11'], '')) == ['arg21', 'arg22']
AssertionError | AssertionError |
def get_choices(cli, prog_name, args, incomplete):
"""
:param cli: command definition
:param prog_name: the program that is running
:param args: full list of args
:param incomplete: the incomplete text to autocomplete
:return: all the possible completions for the incomplete
"""
all_args ... | def get_choices(cli, prog_name, args, incomplete):
"""
:param cli: command definition
:param prog_name: the program that is running
:param args: full list of args
:param incomplete: the incomplete text to autocomplete
:return: all the possible completions for the incomplete
"""
all_args ... | https://github.com/pallets/click/issues/925 | Traceback (most recent call last):
File "test_compl.py", line 19, in <module>
test_argument_choice()
File "test_compl.py", line 14, in test_argument_choice
assert list(get_choices(cli, 'lol', ['arg11'], '')) == ['arg21', 'arg22']
AssertionError | AssertionError |
def __init__(
self,
command,
parent=None,
info_name=None,
obj=None,
auto_envvar_prefix=None,
default_map=None,
terminal_width=None,
max_content_width=None,
resilient_parsing=False,
allow_extra_args=None,
allow_interspersed_args=None,
ignore_unknown_options=None,
h... | def __init__(
self,
command,
parent=None,
info_name=None,
obj=None,
auto_envvar_prefix=None,
default_map=None,
terminal_width=None,
max_content_width=None,
resilient_parsing=False,
allow_extra_args=None,
allow_interspersed_args=None,
ignore_unknown_options=None,
h... | https://github.com/pallets/click/issues/925 | Traceback (most recent call last):
File "test_compl.py", line 19, in <module>
test_argument_choice()
File "test_compl.py", line 14, in test_argument_choice
assert list(get_choices(cli, 'lol', ['arg11'], '')) == ['arg21', 'arg22']
AssertionError | AssertionError |
def resolve_command(self, ctx, args):
cmd_name = make_str(args[0])
original_cmd_name = cmd_name
# Get the command
cmd = self.get_command(ctx, cmd_name)
# If we can't find the command but there is a normalization
# function available, we try with that one.
if cmd is None and ctx.token_norma... | def resolve_command(self, ctx, args):
cmd_name = make_str(args[0])
original_cmd_name = cmd_name
# Get the command
cmd = self.get_command(ctx, cmd_name)
# If we can't find the command but there is a normalization
# function available, we try with that one.
if cmd is None and ctx.token_norma... | https://github.com/pallets/click/issues/925 | Traceback (most recent call last):
File "test_compl.py", line 19, in <module>
test_argument_choice()
File "test_compl.py", line 14, in test_argument_choice
assert list(get_choices(cli, 'lol', ['arg11'], '')) == ['arg21', 'arg22']
AssertionError | AssertionError |
def full_process_value(self, ctx, value):
value = self.process_value(ctx, value)
if value is None and not ctx.resilient_parsing:
value = self.get_default(ctx)
if self.required and self.value_is_missing(value):
raise MissingParameter(ctx=ctx, param=self)
return value
| def full_process_value(self, ctx, value):
value = self.process_value(ctx, value)
if value is None:
value = self.get_default(ctx)
if self.required and self.value_is_missing(value):
raise MissingParameter(ctx=ctx, param=self)
return value
| https://github.com/pallets/click/issues/925 | Traceback (most recent call last):
File "test_compl.py", line 19, in <module>
test_argument_choice()
File "test_compl.py", line 14, in test_argument_choice
assert list(get_choices(cli, 'lol', ['arg11'], '')) == ['arg21', 'arg22']
AssertionError | AssertionError |
def main(
self, args=None, prog_name=None, complete_var=None, standalone_mode=True, **extra
):
"""This is the way to invoke a script with all the bells and
whistles as a command line application. This will always terminate
the application after a call. If this is not wanted, ``SystemExit``
needs t... | def main(
self, args=None, prog_name=None, complete_var=None, standalone_mode=True, **extra
):
"""This is the way to invoke a script with all the bells and
whistles as a command line application. This will always terminate
the application after a call. If this is not wanted, ``SystemExit``
needs t... | https://github.com/pallets/click/issues/625 | $ python ./test-click.py --name ob --count 1000 | head -1
Hello ob!
Traceback (most recent call last):
File "./test-click.py", line 13, in <module>
hello()
File "/Users/obonilla/o/click/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/Users/obonilla/o/click/click/core.py", line 696, in mai... | IOError |
def _get_ssh_client(self, host):
"""
Create a SSH Client based on host, username and password if provided.
If there is any AuthenticationException/SSHException, raise HTTP Error 403 as permission denied.
:param host:
:return: ssh client instance
"""
ssh = None
global remote_user
gl... | def _get_ssh_client(self, host):
"""
Create a SSH Client based on host, username and password if provided.
If there is any AuthenticationException/SSHException, raise HTTP Error 403 as permission denied.
:param host:
:return: ssh client instance
"""
ssh = None
try:
ssh = paramik... | https://github.com/jupyter/enterprise_gateway/issues/705 | Starting Jupyter Enterprise Gateway...
Traceback (most recent call last):
File "/opt/conda/bin/jupyter-enterprisegateway", line 6, in <module> from enterprise_gateway import launch_instance
File "/opt/conda/lib/python3.7/site-packages/enterprise_gateway/__init__.py", line 4,
in <module> from .enterprisegatewayapp impor... | KeyError |
def execute(self, code, timeout=DEFAULT_TIMEOUT):
"""
Executes the code provided and returns the result of that execution.
"""
response = []
try:
msg_id = self._send_request(code)
post_idle = False
while True:
response_message = self._get_response(msg_id, timeout... | def execute(self, code, timeout=DEFAULT_TIMEOUT):
"""
Executes the code provided and returns the result of that execution.
"""
response = []
try:
msg_id = self._send_request(code)
post_idle = False
while True:
response_message = self._get_response(msg_id, timeout... | https://github.com/jupyter/enterprise_gateway/issues/421 | ======================================================================
FAIL: test_hello_world (enterprise_gateway.itests.test_scala_kernel.TestScalaKernelLocal)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/kevin-bates/enterprise_gatew... | AssertionError |
def _enforce_limits(self, **kw):
"""
Enforces any limits that may be imposed by the configuration.
"""
# if kernels-per-user is configured, ensure that this next kernel is still within the limit. If this
# is due to a restart, skip enforcement since we're re-using that id.
max_kernels_per_user... | def _enforce_limits(self, **kw):
"""
Enforces any limits that may be imposed by the configuration.
"""
# if kernels-per-user is configured, ensure that this next kernel is still within the limit
max_kernels_per_user = self.kernel_manager.parent.parent.max_kernels_per_user
if max_kernels_per_use... | https://github.com/jupyter/enterprise_gateway/issues/331 | [I 2018-05-08 15:50:53.686 EnterpriseGatewayApp] KernelRestarter: restarting kernel (1/5), keep random ports
[W 180508 15:50:53 handlers:465] kernel 2a96df20-5527-42f0-ae4f-884c99f624ae restarted
[D 2018-05-08 15:50:53.688 EnterpriseGatewayApp] RemoteKernelManager.signal_kernel(9)
[D 2018-05-08 15:50:53.688 EnterpriseG... | HTTPError |
def start_kernel_from_session(
self, kernel_id, kernel_name, connection_info, process_info, launch_args
):
# Create a KernelManger instance and load connection and process info, then confirm the kernel is still
# alive.
constructor_kwargs = {}
if self.kernel_spec_manager:
constructor_kwargs[... | def start_kernel_from_session(
self, kernel_id, kernel_name, connection_info, process_info, launch_args
):
# Create a KernelManger instance and load connection and process info, then confirm the kernel is still
# alive.
constructor_kwargs = {}
if self.kernel_spec_manager:
constructor_kwargs[... | https://github.com/jupyter/enterprise_gateway/issues/108 | [D 2017-08-03 15:27:28.840 KernelGatewayApp] Found kernel python2 in /usr/share/jupyter/kernels
Traceback (most recent call last):
File "/usr/bin/jupyter-kernelgateway", line 11, in <module>
load_entry_point('jupyter-kernel-gateway', 'console_scripts', 'jupyter-kernelgateway')()
File "/usr/lib/python2.7/site-packages/j... | AttributeError |
def __init__(self, prespawn_count, kernel_manager):
self.kernel_manager = kernel_manager
# Make sure we've got a int
if not prespawn_count:
prespawn_count = 0
env = dict(os.environ.copy())
env["KERNEL_USERNAME"] = prespawn_username
for _ in range(prespawn_count):
self.kernel_mana... | def __init__(self, prespawn_count, kernel_manager):
self.kernel_manager = kernel_manager
# Make sure we've got a int
if not prespawn_count:
prespawn_count = 0
env = dict(os.environ)
env["KERNEL_USERNAME"] = prespawn_username
for _ in range(prespawn_count):
self.kernel_manager.sta... | https://github.com/jupyter/enterprise_gateway/issues/87 | [D 2017-07-26 12:02:29.586 KernelGatewayApp] Instantiating kernel 'Spark 2.1 - Scala (YARN Cluster Mode)' with process proxy: kernel_gateway.services.kernels.processproxy.YarnProcessProxy
[I 170726 12:02:29 base:37] Request http://elyra-fyi-node-1:8088//ws/v1/cluster/nodes
[E 2017-07-26 12:02:29.591 KernelGatewayApp] U... | KeyError |
def __init__(self, kernel_manager, connection_file_mode, **kw):
self.kernel_manager = kernel_manager
# use the zero-ip from the start, can prevent having to write out connection file again
self.kernel_manager.ip = "0.0.0.0"
self.connection_file_mode = connection_file_mode
if self.connection_file_mo... | def __init__(self, kernel_manager, connection_file_mode, **kw):
self.kernel_manager = kernel_manager
# use the zero-ip from the start, can prevent having to write out connection file again
self.kernel_manager.ip = "0.0.0.0"
self.connection_file_mode = connection_file_mode
if self.connection_file_mo... | https://github.com/jupyter/enterprise_gateway/issues/87 | [D 2017-07-26 12:02:29.586 KernelGatewayApp] Instantiating kernel 'Spark 2.1 - Scala (YARN Cluster Mode)' with process proxy: kernel_gateway.services.kernels.processproxy.YarnProcessProxy
[I 170726 12:02:29 base:37] Request http://elyra-fyi-node-1:8088//ws/v1/cluster/nodes
[E 2017-07-26 12:02:29.591 KernelGatewayApp] U... | KeyError |
def launch_process(self, cmd, **kw):
env_dict = kw.get("env")
if env_dict is None:
env_dict = dict(os.environ.copy())
kw.update({"env": env_dict})
# see if KERNEL_LAUNCH_TIMEOUT was included from user
self.kernel_launch_timeout = float(
env_dict.get("KERNEL_LAUNCH_TIMEOUT", elyr... | def launch_process(self, cmd, **kw):
pass
| https://github.com/jupyter/enterprise_gateway/issues/87 | [D 2017-07-26 12:02:29.586 KernelGatewayApp] Instantiating kernel 'Spark 2.1 - Scala (YARN Cluster Mode)' with process proxy: kernel_gateway.services.kernels.processproxy.YarnProcessProxy
[I 170726 12:02:29 base:37] Request http://elyra-fyi-node-1:8088//ws/v1/cluster/nodes
[E 2017-07-26 12:02:29.591 KernelGatewayApp] U... | KeyError |
def __init__(self, kernel_manager, **kwargs):
super(KernelSessionManager, self).__init__(**kwargs)
self.kernel_manager = kernel_manager
self._sessions = dict()
self.kernel_session_file = os.path.join(self._get_sessions_loc(), "kernels.json")
self._load_sessions()
| def __init__(self, kernel_manager, **kwargs):
super(KernelSessionManager, self).__init__(**kwargs)
self.kernel_manager = kernel_manager
self._sessions = dict()
self.kernel_session_file = os.path.join(self.get_sessions_loc(), "kernels.json")
self._load_sessions()
| https://github.com/jupyter/enterprise_gateway/issues/87 | [D 2017-07-26 12:02:29.586 KernelGatewayApp] Instantiating kernel 'Spark 2.1 - Scala (YARN Cluster Mode)' with process proxy: kernel_gateway.services.kernels.processproxy.YarnProcessProxy
[I 170726 12:02:29 base:37] Request http://elyra-fyi-node-1:8088//ws/v1/cluster/nodes
[E 2017-07-26 12:02:29.591 KernelGatewayApp] U... | KeyError |
def create_session(self, kernel_id, **kwargs):
# Persists information about the kernel session within the designated repository.
km = self.kernel_manager.get_kernel(kernel_id)
# Compose the kernel_session entry
kernel_session = dict()
kernel_session["kernel_id"] = kernel_id
kernel_session["use... | def create_session(self, kernel_id, **kwargs):
# Persists information about the kernel session within the designated repository.
km = self.kernel_manager.get_kernel(kernel_id)
# Compose the kernel_session entry
kernel_session = dict()
kernel_session["kernel_id"] = kernel_id
kernel_session["use... | https://github.com/jupyter/enterprise_gateway/issues/87 | [D 2017-07-26 12:02:29.586 KernelGatewayApp] Instantiating kernel 'Spark 2.1 - Scala (YARN Cluster Mode)' with process proxy: kernel_gateway.services.kernels.processproxy.YarnProcessProxy
[I 170726 12:02:29 base:37] Request http://elyra-fyi-node-1:8088//ws/v1/cluster/nodes
[E 2017-07-26 12:02:29.591 KernelGatewayApp] U... | KeyError |
def query_app_state_by_id(app_id):
"""Return the state of an application.
:param app_id:
:return:
"""
url = "%s/apps/%s/state" % (YarnProcessProxy.yarn_endpoint, app_id)
cmd = ["curl", "-X", "GET", url]
process = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,... | def query_app_state_by_id(app_id):
"""Return the state of an application.
:param app_id:
:return:
"""
url = "%s/apps/%s/state" % (YarnProcessProxy.yarn_endpoint, app_id)
cmd = ["curl", "-X", "GET", url]
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
outp... | https://github.com/jupyter/enterprise_gateway/issues/85 | [D 2017-07-20 12:22:23.076 KernelGatewayApp] kernel_id=237badc9-ce85-42ea-bd13-4d8432993ca3, kernel_name=spark_2.1_scala_yarn_cluster, last_activity=2017-07-20 19:03:50.488255+00:00
[D 2017-07-20 12:22:23.077 KernelGatewayApp] kernel_id=d371a88a-53fb-42c9-827b-1ee263160716, kernel_name=spark_2.1_scala_yarn_cluster, las... | OSError |
def kill_app_by_id(app_id):
"""Kill an application. If the app's state is FINISHED or FAILED, it won't be changed to KILLED.
TODO: extend the yarn_api_client to support cluster_application_kill with PUT, e.g.:
YarnProcessProxy.resource_mgr.cluster_application_kill(application_id=app_id)
:param app_... | def kill_app_by_id(app_id):
"""Kill an application. If the app's state is FINISHED or FAILED, it won't be changed to KILLED.
TODO: extend the yarn_api_client to support cluster_application_kill with PUT, e.g.:
YarnProcessProxy.resource_mgr.cluster_application_kill(application_id=app_id)
:param app_... | https://github.com/jupyter/enterprise_gateway/issues/85 | [D 2017-07-20 12:22:23.076 KernelGatewayApp] kernel_id=237badc9-ce85-42ea-bd13-4d8432993ca3, kernel_name=spark_2.1_scala_yarn_cluster, last_activity=2017-07-20 19:03:50.488255+00:00
[D 2017-07-20 12:22:23.077 KernelGatewayApp] kernel_id=d371a88a-53fb-42c9-827b-1ee263160716, kernel_name=spark_2.1_scala_yarn_cluster, las... | OSError |
def start_kernel_from_session(
self, kernel_id, kernel_name, connection_info, process_info, launch_args
):
# Create a KernelManger instance and load connection and process info, then confirm the kernel is still
# alive.
constructor_kwargs = {}
if self.kernel_spec_manager:
constructor_kwargs[... | def start_kernel_from_session(
self, kernel_id, kernel_name, connection_info, process_info, launch_args
):
# Create a KernelManger instance and load connection and process info, then confirm the kernel is still
# alive.
constructor_kwargs = {}
if self.kernel_spec_manager:
constructor_kwargs[... | https://github.com/jupyter/enterprise_gateway/issues/74 | [D 2017-07-16 15:56:15.197 KernelGatewayApp] RemoteKernelManager: Writing connection file with ip=169.45.103.144, control=33001, hb=45662, iopub=44204, stdin=33960, shell=44543
Traceback (most recent call last):
File "/opt/anaconda2/bin/jupyter-kernelgateway", line 11, in <module>
sys.exit(launch_instance())
File "/opt... | IOError |
def styleSheet(self) -> Optional[StyleSheet]:
return next(self.model.select(StyleSheet), None)
| def styleSheet(self) -> Optional[StyleSheet]:
model = self.model
style_sheet = next(model.select(StyleSheet), None)
if not style_sheet:
style_sheet = self.model.create(StyleSheet)
style_sheet.styleSheet = DEFAULT_STYLE_SHEET
return style_sheet
| https://github.com/gaphor/gaphor/issues/578 | Traceback (most recent call last):
File "/home/dan/Projects/gaphor/gaphor/ui/actiongroup.py", line 138, in _action_activate
method(from_variant(param))
File "/home/dan/Projects/gaphor/gaphor/ui/appfilemanager.py", line 121, in action_open_recent
self.load(filename)
File "/home/dan/Projects/gaphor/gaphor/ui/appfilemanag... | RuntimeError |
def style(self, node: StyleNode) -> Style:
style_sheet = self.styleSheet
return {
**FALLBACK_STYLE, # type: ignore[misc]
**(style_sheet.match(node) if style_sheet else {}),
}
| def style(self, node: StyleNode) -> Style:
style_sheet = self.styleSheet
return {
**FALLBACK_STYLE, # type: ignore[misc]
**style_sheet.match(node),
}
| https://github.com/gaphor/gaphor/issues/578 | Traceback (most recent call last):
File "/home/dan/Projects/gaphor/gaphor/ui/actiongroup.py", line 138, in _action_activate
method(from_variant(param))
File "/home/dan/Projects/gaphor/gaphor/ui/appfilemanager.py", line 121, in action_open_recent
self.load(filename)
File "/home/dan/Projects/gaphor/gaphor/ui/appfilemanag... | RuntimeError |
def load_elements_generator(elements, factory, modeling_language, gaphor_version):
"""Load a file and create a model if possible.
Exceptions: IOError, ValueError.
"""
log.debug(f"Loading {len(elements)} elements")
# The elements are iterated three times:
size = len(elements) * 3
def updat... | def load_elements_generator(elements, factory, modeling_language, gaphor_version):
"""Load a file and create a model if possible.
Exceptions: IOError, ValueError.
"""
log.debug(f"Loading {len(elements)} elements")
# The elements are iterated three times:
size = len(elements) * 3
def updat... | https://github.com/gaphor/gaphor/issues/578 | Traceback (most recent call last):
File "/home/dan/Projects/gaphor/gaphor/ui/actiongroup.py", line 138, in _action_activate
method(from_variant(param))
File "/home/dan/Projects/gaphor/gaphor/ui/appfilemanager.py", line 121, in action_open_recent
self.load(filename)
File "/home/dan/Projects/gaphor/gaphor/ui/appfilemanag... | RuntimeError |
def load_default_model(session):
element_factory = session.get_service("element_factory")
element_factory.flush()
with element_factory.block_events():
element_factory.create(StyleSheet)
model = element_factory.create(UML.Package)
model.name = gettext("New model")
diagram = el... | def load_default_model(session):
element_factory = session.get_service("element_factory")
element_factory.flush()
with element_factory.block_events():
model = element_factory.create(UML.Package)
model.name = gettext("New model")
diagram = element_factory.create(UML.Diagram)
d... | https://github.com/gaphor/gaphor/issues/578 | Traceback (most recent call last):
File "/home/dan/Projects/gaphor/gaphor/ui/actiongroup.py", line 138, in _action_activate
method(from_variant(param))
File "/home/dan/Projects/gaphor/gaphor/ui/appfilemanager.py", line 121, in action_open_recent
self.load(filename)
File "/home/dan/Projects/gaphor/gaphor/ui/appfilemanag... | RuntimeError |
def namespace_popup_model(self):
assert self.view
model = Gio.Menu.new()
part = Gio.Menu.new()
part.append(gettext("_Open"), "tree-view.open")
part.append(gettext("_Rename"), "tree-view.rename")
model.append_section(None, part)
part = Gio.Menu.new()
part.append(gettext("New _Diagram"),... | def namespace_popup_model(self):
assert self.view
model = Gio.Menu.new()
part = Gio.Menu.new()
part.append(gettext("_Open"), "tree-view.open")
part.append(gettext("_Rename"), "tree-view.rename")
model.append_section(None, part)
part = Gio.Menu.new()
part.append(gettext("New _Diagram"),... | https://github.com/gaphor/gaphor/issues/438 | Traceback (most recent call last):
File "/home/dan/Projects/gaphor/gaphor/ui/namespace.py", line 568, in _on_view_event
menu = Gtk.Menu.new_from_model(self.namespace_popup_model())
File "/home/dan/Projects/gaphor/gaphor/ui/namespace.py", line 544, in namespace_popup_model
gettext('Show in "{diagram}"').format(diagram=d... | AttributeError |
def create_as(self, type, id, parent=None, subject=None):
if not type or not issubclass(type, gaphas.Item):
raise TypeError(
f"Type {type} can not be added to a diagram as it is not a diagram item"
)
item = type(id, self.model)
if subject:
item.subject = subject
self.... | def create_as(self, type, id, parent=None, subject=None):
item = type(id, self.model)
if subject:
item.subject = subject
self.canvas.add(item, parent)
self.model.handle(DiagramItemCreated(self.model, item))
return item
| https://github.com/gaphor/gaphor/issues/286 | gaphor.storage.storage INFO Loading file deployment_diagram.gaphor
gaphor.storage.parser ERROR File corrupted, remove element 8cef44be-7376-11ea-80af-e4f89cae6ece and try again
NoneType: None
gaphor.storage.storage INFO Read 140 elements from file
gaphor.storage.storage WARNING file b'/home/lie/projects/test/deployment... | AttributeError |
def create_as(self, type: Type[T], id: str) -> T:
"""
Create a new model element of type 'type' with 'id' as its ID.
This method should only be used when loading models, since it does
not emit an ElementCreated event.
"""
if not type or not issubclass(type, Element) or issubclass(type, Presentat... | def create_as(self, type: Type[T], id: str) -> T:
"""
Create a new model element of type 'type' with 'id' as its ID.
This method should only be used when loading models, since it does
not emit an ElementCreated event.
"""
assert issubclass(type, Element)
obj = type(id, self)
self._elemen... | https://github.com/gaphor/gaphor/issues/286 | gaphor.storage.storage INFO Loading file deployment_diagram.gaphor
gaphor.storage.parser ERROR File corrupted, remove element 8cef44be-7376-11ea-80af-e4f89cae6ece and try again
NoneType: None
gaphor.storage.storage INFO Read 140 elements from file
gaphor.storage.storage WARNING file b'/home/lie/projects/test/deployment... | AttributeError |
def _on_name_change(self, event):
if event.property is UML.Diagram.name:
for page in range(0, self._notebook.get_n_pages()):
widget = self._notebook.get_nth_page(page)
if event.element is widget.diagram_page.diagram:
self._notebook.set_tab_label(
w... | def _on_name_change(self, event):
if event.property is UML.Diagram.name:
for page in range(0, self._notebook.get_n_pages()):
widget = self._notebook.get_nth_page(page)
if event.element is widget.diagram_page.diagram:
print("Name change", event.__dict__)
... | https://github.com/gaphor/gaphor/issues/149 | gaphor.transaction ERROR Transaction terminated due to an exception, performing a rollback
Traceback (most recent call last):
File "/app/lib/python3.7/site-packages/gaphor/transaction.py", line 27, in _transactional
r = func(*args, **kwargs)
File "/app/lib/python3.7/site-packages/gaphor/ui/namespace.py", line 600, in t... | AttributeError |
def iter_for_element(self, element, old_namespace=0):
"""Get the Gtk.TreeIter for an element in the Namespace.
Args:
element: The element contained in the in the Namespace.
old_namespace: The old namespace containing the element, optional.
Returns: Gtk.TreeIter object
"""
# Using ... | def iter_for_element(self, element, old_namespace=0):
# Using `0` as sentinel
if old_namespace != 0:
parent_iter = self.iter_for_element(old_namespace)
elif element and element.namespace:
parent_iter = self.iter_for_element(element.namespace)
else:
parent_iter = None
child_i... | https://github.com/gaphor/gaphor/issues/149 | gaphor.transaction ERROR Transaction terminated due to an exception, performing a rollback
Traceback (most recent call last):
File "/app/lib/python3.7/site-packages/gaphor/transaction.py", line 27, in _transactional
r = func(*args, **kwargs)
File "/app/lib/python3.7/site-packages/gaphor/ui/namespace.py", line 600, in t... | AttributeError |
def _on_element_delete(self, event):
element = event.element
if type(element) in self.filter:
iter = self.iter_for_element(element)
# iter should be here, unless we try to delete an element who's
# parent element is already deleted, so let's be lenient.
if iter:
self.... | def _on_element_delete(self, event):
element = event.element
if type(element) in self.filter:
iter = self.iter_for_element(element)
# iter should be here, unless we try to delete an element who's parent element is already deleted, so let's be lenient.
if iter:
self.model.remo... | https://github.com/gaphor/gaphor/issues/149 | gaphor.transaction ERROR Transaction terminated due to an exception, performing a rollback
Traceback (most recent call last):
File "/app/lib/python3.7/site-packages/gaphor/transaction.py", line 27, in _transactional
r = func(*args, **kwargs)
File "/app/lib/python3.7/site-packages/gaphor/ui/namespace.py", line 600, in t... | AttributeError |
def select_element(self, element):
"""Select an element from the Namespace view.
The element is selected. After this an action may be executed,
such as OpenModelElement, which will try to open the element (if it's
a Diagram).
"""
tree_iter = self.iter_for_element(element)
path = self.model... | def select_element(self, element):
"""
Select an element from the Namespace view.
The element is selected. After this an action may be executed,
such as OpenModelElement, which will try to open the element (if it's
a Diagram).
"""
path = Gtk.TreePath.new_from_indices(
self._namespace... | https://github.com/gaphor/gaphor/issues/149 | gaphor.transaction ERROR Transaction terminated due to an exception, performing a rollback
Traceback (most recent call last):
File "/app/lib/python3.7/site-packages/gaphor/transaction.py", line 27, in _transactional
r = func(*args, **kwargs)
File "/app/lib/python3.7/site-packages/gaphor/ui/namespace.py", line 600, in t... | AttributeError |
def tree_view_rename_selected(self):
view = self._namespace
element = view.get_selected_element()
if element is not None:
selection = view.get_selection()
model, iter = selection.get_selected()
path = model.get_path(iter)
column = view.get_column(0)
cell = column.get_... | def tree_view_rename_selected(self):
view = self._namespace
element = view.get_selected_element()
if element is not None:
path = view.get_model().path_from_element(element)
column = view.get_column(0)
cell = column.get_cells()[1]
cell.set_property("editable", 1)
cell.... | https://github.com/gaphor/gaphor/issues/149 | gaphor.transaction ERROR Transaction terminated due to an exception, performing a rollback
Traceback (most recent call last):
File "/app/lib/python3.7/site-packages/gaphor/transaction.py", line 27, in _transactional
r = func(*args, **kwargs)
File "/app/lib/python3.7/site-packages/gaphor/ui/namespace.py", line 600, in t... | AttributeError |
def get_tcp_dstip(self, sock):
pfile = self.firewall.pfile
try:
peer = sock.getpeername()
except socket.error:
_, e = sys.exc_info()[:2]
if e.args[0] == errno.EINVAL:
return sock.getsockname()
proxy = sock.getsockname()
argv = (
sock.family,
soc... | def get_tcp_dstip(self, sock):
pfile = self.firewall.pfile
try:
peer = sock.getpeername()
except socket.error:
_, e = sys.exc_info()[:2]
if e.args[0] == errno.EINVAL:
debug2(
"get_tcp_dstip error: sock.getpeername() %s\nsocket is probably closed.\n"
... | https://github.com/sshuttle/sshuttle/issues/287 | Traceback (most recent call last):
File "/usr/local/bin/sshuttle", line 11, in <module>
load_entry_point('sshuttle==0.78.4', 'console_scripts', 'sshuttle')()
File "/usr/local/Cellar/sshuttle/0.78.4_1/libexec/lib/python3.7/site-packages/sshuttle/cmdline.py", line 79, in main
opt.user)
File "/usr/local/Cellar/sshuttle/0.... | OSError |
def _try_peername(sock):
try:
pn = sock.getpeername()
if pn:
return "%s:%s" % (pn[0], pn[1])
except socket.error:
_, e = sys.exc_info()[:2]
if e.args[0] == errno.EINVAL:
pass
elif e.args[0] not in (errno.ENOTCONN, errno.ENOTSOCK):
raise... | def _try_peername(sock):
try:
pn = sock.getpeername()
if pn:
return "%s:%s" % (pn[0], pn[1])
except socket.error:
_, e = sys.exc_info()[:2]
if e.args[0] == errno.EINVAL:
debug2(
"_try_peername error: sock.getpeername() %s\nsocket is probabl... | https://github.com/sshuttle/sshuttle/issues/287 | Traceback (most recent call last):
File "/usr/local/bin/sshuttle", line 11, in <module>
load_entry_point('sshuttle==0.78.4', 'console_scripts', 'sshuttle')()
File "/usr/local/Cellar/sshuttle/0.78.4_1/libexec/lib/python3.7/site-packages/sshuttle/cmdline.py", line 79, in main
opt.user)
File "/usr/local/Cellar/sshuttle/0.... | OSError |
def _pre_experiment_hook(self, experiment: Experiment):
monitoring_params = experiment.monitoring_params
monitoring_params["dir"] = str(Path(experiment.logdir).absolute())
log_on_batch_end: bool = monitoring_params.pop("log_on_batch_end", False)
log_on_epoch_end: bool = monitoring_params.pop("log_on_ep... | def _pre_experiment_hook(self, experiment: Experiment):
monitoring_params = experiment.monitoring_params
monitoring_params["dir"] = str(Path(experiment.logdir).absolute())
log_on_batch_end: bool = monitoring_params.pop("log_on_batch_end", False)
log_on_epoch_end: bool = monitoring_params.pop("log_on_ep... | https://github.com/catalyst-team/catalyst/issues/640 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-279a2ce060b8> in <module>
24 monitoring_params={
25 'project': "yt",
---> 26 'group': "aa"
27 }
28 )
~/.local/lib/python3.6/si... | TypeError |
def _init(self, **kwargs):
global WANDB_ENABLED
assert len(kwargs) == 0
if WANDB_ENABLED:
if self.monitoring_params is not None:
self.checkpoints_glob: List[str] = self.monitoring_params.pop(
"checkpoints_glob", []
)
wandb.init(**self.monitoring_p... | def _init(self, **kwargs):
global WANDB_ENABLED
assert len(kwargs) == 0
if WANDB_ENABLED:
if self.monitoring_params is not None:
self.checkpoints_glob: List[str] = self.monitoring_params.pop(
"checkpoints_glob", ["best.pth", "last.pth"]
)
wandb.in... | https://github.com/catalyst-team/catalyst/issues/640 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-279a2ce060b8> in <module>
24 monitoring_params={
25 'project': "yt",
---> 26 'group': "aa"
27 }
28 )
~/.local/lib/python3.6/si... | TypeError |
def _init(self, **kwargs):
global WANDB_ENABLED
assert len(kwargs) == 0
if WANDB_ENABLED:
if self.monitoring_params is not None:
self.checkpoints_glob: List[str] = self.monitoring_params.pop(
"checkpoints_glob", []
)
wandb.init(**self.monitoring_p... | def _init(self, **kwargs):
global WANDB_ENABLED
assert len(kwargs) == 0
if WANDB_ENABLED:
if self.monitoring_params is not None:
self.checkpoints_glob: List[str] = self.monitoring_params.pop(
"checkpoints_glob", ["best.pth", "last.pth"]
)
wandb.in... | https://github.com/catalyst-team/catalyst/issues/640 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-279a2ce060b8> in <module>
24 monitoring_params={
25 'project': "yt",
---> 26 'group': "aa"
27 }
28 )
~/.local/lib/python3.6/si... | TypeError |
def load_checkpoint(*, filename, state: _State):
if os.path.isfile(filename):
print(f"=> loading checkpoint {filename}")
checkpoint = utils.load_checkpoint(filename)
state.epoch = checkpoint["epoch"]
state.stage_epoch = checkpoint["stage_epoch"]
state.stage = checkpoint["sta... | def load_checkpoint(*, filename, state: _State):
if os.path.isfile(filename):
print(f"=> loading checkpoint {filename}")
checkpoint = utils.load_checkpoint(filename)
state.epoch = checkpoint["epoch"]
utils.unpack_checkpoint(
checkpoint,
model=state.model,
... | https://github.com/catalyst-team/catalyst/issues/640 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-279a2ce060b8> in <module>
24 monitoring_params={
25 'project': "yt",
---> 26 'group': "aa"
27 }
28 )
~/.local/lib/python3.6/si... | TypeError |
def on_stage_start(self, state: _State):
for key in self._keys_from_state:
value = getattr(state, key, None)
if value is not None:
setattr(self, key, value)
if self.resume_dir is not None:
self.resume = str(self.resume_dir) + "/" + str(self.resume)
if self.resume is not... | def on_stage_start(self, state: _State):
for key in self._keys_from_state:
value = getattr(state, key, None)
if value is not None:
setattr(self, key, value)
if self.resume_dir is not None:
self.resume = str(self.resume_dir) + "/" + str(self.resume)
if self.resume is not... | https://github.com/catalyst-team/catalyst/issues/640 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-279a2ce060b8> in <module>
24 monitoring_params={
25 'project': "yt",
---> 26 'group': "aa"
27 }
28 )
~/.local/lib/python3.6/si... | TypeError |
def _prepare_for_stage(self, stage: str):
utils.set_global_seed(self.experiment.initial_seed)
migrating_params = dict(**self.experiment.get_state_params(stage))
migrate_from_previous_stage = migrating_params.get(
"migrate_from_previous_stage", True
)
if self.state is not None and migrate_fr... | def _prepare_for_stage(self, stage: str):
utils.set_global_seed(self.experiment.initial_seed)
migrating_params = {}
stage_state_params = self.experiment.get_state_params(stage)
migrate_from_previous_stage = stage_state_params.get(
"migrate_from_previous_stage", True
)
if self.state is no... | https://github.com/catalyst-team/catalyst/issues/640 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-279a2ce060b8> in <module>
24 monitoring_params={
25 'project': "yt",
---> 26 'group': "aa"
27 }
28 )
~/.local/lib/python3.6/si... | TypeError |
def _run_stage(self, stage: str):
self._prepare_for_stage(stage)
self._run_event("stage", moment="start")
while self.state.stage_epoch < self.state.num_epochs:
self._run_event("epoch", moment="start")
utils.set_global_seed(self.experiment.initial_seed + self.state.epoch + 1)
self._r... | def _run_stage(self, stage: str):
self._prepare_for_stage(stage)
self._run_event("stage", moment="start")
for epoch in range(self.state.num_epochs):
self.state.stage_epoch = epoch
self._run_event("epoch", moment="start")
self._run_epoch(stage=stage, epoch=epoch)
self._run_e... | https://github.com/catalyst-team/catalyst/issues/640 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-279a2ce060b8> in <module>
24 monitoring_params={
25 'project': "yt",
---> 26 'group': "aa"
27 }
28 )
~/.local/lib/python3.6/si... | TypeError |
def stages(self) -> List[str]:
"""Experiment's stage names"""
stages_keys = list(self.stages_config.keys())
# Change start `stages_keys` if resume data were founded
state_params = self.get_state_params(stages_keys[0])
resume, resume_dir = [
state_params.get(key, None) for key in ["resume", ... | def stages(self) -> List[str]:
"""Experiment's stage names"""
stages_keys = list(self.stages_config.keys())
return stages_keys
| https://github.com/catalyst-team/catalyst/issues/640 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-279a2ce060b8> in <module>
24 monitoring_params={
25 'project': "yt",
---> 26 'group': "aa"
27 }
28 )
~/.local/lib/python3.6/si... | TypeError |
def imread(uri, grayscale=False, expand_dims=True, rootpath=None, **kwargs):
"""
Args:
uri: {str, pathlib.Path, bytes, file}
The resource to load the image from, e.g. a filename, pathlib.Path,
http address or file object, see the docs for more info.
grayscale:
expand_dim... | def imread(uri, grayscale=False, expand_dims=True, rootpath=None, **kwargs):
"""
Args:
uri: {str, pathlib.Path, bytes, file}
The resource to load the image from, e.g. a filename, pathlib.Path,
http address or file object, see the docs for more info.
grayscale:
expand_dim... | https://github.com/catalyst-team/catalyst/issues/472 | TypeError Traceback (most recent call last)
<ipython-input-92-cf55df030d98> in <module>
3
4 os.system("wget -O img.png https://www.sample-videos.com/img/Sample-png-image-200kb.png")
----> 5 imread("img.png")
/usr/local/lib/python3.6/dist-packages/catalyst/utils/image.py in imread(uri, g... | TypeError |
def deploy(
self,
contract: Any,
*args: Tuple,
amount: int = 0,
gas_limit: Optional[int] = None,
gas_price: Optional[int] = None,
nonce: Optional[int] = None,
) -> Any:
"""Deploys a contract.
Args:
contract: ContractContainer instance.
*args: Constructor arguments. T... | def deploy(
self,
contract: Any,
*args: Tuple,
amount: int = 0,
gas_limit: Optional[int] = None,
gas_price: Optional[int] = None,
nonce: Optional[int] = None,
) -> Any:
"""Deploys a contract.
Args:
contract: ContractContainer instance.
*args: Constructor arguments. T... | https://github.com/eth-brownie/brownie/issues/537 | Running 'scripts.dev-deploy.main'...
Transaction sent: 0x36f1599c9b5b5ab9f243f5d0c64e8f2637a355818bc4cf5e1a67168e9e22713e
Gas price: 0.0 gwei Gas limit: 6721975
ArgobytesOwnedVaultDeployer.constructor confirmed - Block: 1 Gas used: 3545980 (52.75%)
ArgobytesOwnedVaultDeployer deployed at: 0x04246fAA61004668E1C0a388... | brownie.exceptions.ContractNotFound |
def _add_from_tx(self, tx: TransactionReceiptType) -> None:
tx._confirmed.wait()
if tx.status:
try:
self.at(tx.contract_address, tx.sender, tx)
except ContractNotFound:
# if the contract self-destructed during deployment
pass
| def _add_from_tx(self, tx: TransactionReceiptType) -> None:
tx._confirmed.wait()
if tx.status:
self.at(tx.contract_address, tx.sender, tx)
| https://github.com/eth-brownie/brownie/issues/537 | Running 'scripts.dev-deploy.main'...
Transaction sent: 0x36f1599c9b5b5ab9f243f5d0c64e8f2637a355818bc4cf5e1a67168e9e22713e
Gas price: 0.0 gwei Gas limit: 6721975
ArgobytesOwnedVaultDeployer.constructor confirmed - Block: 1 Gas used: 3545980 (52.75%)
ArgobytesOwnedVaultDeployer deployed at: 0x04246fAA61004668E1C0a388... | brownie.exceptions.ContractNotFound |
def __init__(
self,
address: str,
owner: Optional[AccountsType] = None,
tx: TransactionReceiptType = None,
) -> None:
address = _resolve_address(address)
self.bytecode = web3.eth.getCode(address).hex()[2:]
if not self.bytecode:
raise ContractNotFound(f"No contract deployed at {addres... | def __init__(
self,
address: str,
owner: Optional[AccountsType] = None,
tx: TransactionReceiptType = None,
) -> None:
address = _resolve_address(address)
self.bytecode = web3.eth.getCode(address).hex()[2:]
if not self.bytecode:
raise ContractNotFound(f"No contract deployed at {addres... | https://github.com/eth-brownie/brownie/issues/537 | Running 'scripts.dev-deploy.main'...
Transaction sent: 0x36f1599c9b5b5ab9f243f5d0c64e8f2637a355818bc4cf5e1a67168e9e22713e
Gas price: 0.0 gwei Gas limit: 6721975
ArgobytesOwnedVaultDeployer.constructor confirmed - Block: 1 Gas used: 3545980 (52.75%)
ArgobytesOwnedVaultDeployer deployed at: 0x04246fAA61004668E1C0a388... | brownie.exceptions.ContractNotFound |
def attach(self, laddr: Union[str, Tuple]) -> None:
"""Attaches to an already running RPC client subprocess.
Args:
laddr: Address that the client is listening at. Can be supplied as a
string "http://127.0.0.1:8545" or tuple ("127.0.0.1", 8545)"""
if self.is_active():
raise Sy... | def attach(self, laddr: Union[str, Tuple]) -> None:
"""Attaches to an already running RPC client subprocess.
Args:
laddr: Address that the client is listening at. Can be supplied as a
string "http://127.0.0.1:8545" or tuple ("127.0.0.1", 8545)"""
if self.is_active():
raise Sy... | https://github.com/eth-brownie/brownie/issues/263 | Brownie v1.1.0 - Python development framework for Ethereum
Brownie project has been compiled at /Users/alper/eBlocBroker/contract/build/contracts
==================================================================== test session starts =====================================================================
platform darwi... | PermissionError |
def get_str_dtype(cls, pandas_dtype_arg) -> Optional[str]:
"""Get pandas-compatible string representation of dtype."""
pandas_dtype = cls.get_dtype(pandas_dtype_arg)
if pandas_dtype is None:
return pandas_dtype
elif isinstance(pandas_dtype, PandasDtype):
return pandas_dtype.str_alias
... | def get_str_dtype(cls, pandas_dtype_arg):
"""Get pandas-compatible string representation of dtype."""
dtype_ = pandas_dtype_arg
if dtype_ is None:
return dtype_
if is_extension_array_dtype(dtype_):
if isinstance(dtype_, type):
try:
# Convert to str here becau... | https://github.com/pandera-dev/pandera/issues/418 | Traceback (most recent call last):
File "foo.py", line 8, in <module>
yaml_schema = schema.to_yaml()
File "/Users/nielsbantilan/git/pandera/pandera/schemas.py", line 1197, in to_yaml
return pandera.io.to_yaml(self, fp)
File "/Users/nielsbantilan/git/pandera/pandera/io.py", line 223, in to_yaml
statistics = _serialize_s... | AttributeError |
def __eq__(self, other):
# pylint: disable=comparison-with-callable
# see https://github.com/PyCQA/pylint/issues/2306
if other is None:
return False
other_dtype = PandasDtype.get_dtype(other)
if self.value == "string" and LEGACY_PANDAS:
return PandasDtype.String.value == other_dtype.... | def __eq__(self, other):
# pylint: disable=comparison-with-callable
# see https://github.com/PyCQA/pylint/issues/2306
if other is None:
return False
if isinstance(other, str):
other = self.from_str_alias(other)
if self.value == "string" and LEGACY_PANDAS:
return PandasDtype.S... | https://github.com/pandera-dev/pandera/issues/418 | Traceback (most recent call last):
File "foo.py", line 8, in <module>
yaml_schema = schema.to_yaml()
File "/Users/nielsbantilan/git/pandera/pandera/schemas.py", line 1197, in to_yaml
return pandera.io.to_yaml(self, fp)
File "/Users/nielsbantilan/git/pandera/pandera/io.py", line 223, in to_yaml
statistics = _serialize_s... | AttributeError |
def _deserialize_component_stats(serialized_component_stats):
from pandera import Check # pylint: disable=import-outside-toplevel
pandas_dtype = PandasDtype.from_str_alias(
serialized_component_stats["pandas_dtype"]
)
checks = None
if serialized_component_stats.get("checks") is not None:
... | def _deserialize_component_stats(serialized_component_stats):
from pandera import Check # pylint: disable=import-outside-toplevel
pandas_dtype = PandasDtype.from_str_alias(
serialized_component_stats["pandas_dtype"]
)
checks = None
if serialized_component_stats["checks"] is not None:
... | https://github.com/pandera-dev/pandera/issues/418 | Traceback (most recent call last):
File "foo.py", line 8, in <module>
yaml_schema = schema.to_yaml()
File "/Users/nielsbantilan/git/pandera/pandera/schemas.py", line 1197, in to_yaml
return pandera.io.to_yaml(self, fp)
File "/Users/nielsbantilan/git/pandera/pandera/io.py", line 223, in to_yaml
statistics = _serialize_s... | AttributeError |
def get_dataframe_schema_statistics(dataframe_schema):
"""Get statistical properties from dataframe schema."""
statistics = {
"columns": {
col_name: {
"pandas_dtype": column.pdtype,
"nullable": column.nullable,
"allow_duplicates": column.allow_... | def get_dataframe_schema_statistics(dataframe_schema):
"""Get statistical properties from dataframe schema."""
statistics = {
"columns": {
col_name: {
"pandas_dtype": column._pandas_dtype,
"nullable": column.nullable,
"allow_duplicates": column... | https://github.com/pandera-dev/pandera/issues/418 | Traceback (most recent call last):
File "foo.py", line 8, in <module>
yaml_schema = schema.to_yaml()
File "/Users/nielsbantilan/git/pandera/pandera/schemas.py", line 1197, in to_yaml
return pandera.io.to_yaml(self, fp)
File "/Users/nielsbantilan/git/pandera/pandera/io.py", line 223, in to_yaml
statistics = _serialize_s... | AttributeError |
def pdtype(self) -> Optional[PandasDtype]:
"""PandasDtype of the dataframe."""
pandas_dtype = PandasDtype.get_str_dtype(self.pandas_dtype)
if pandas_dtype is None:
return pandas_dtype
return PandasDtype.from_str_alias(pandas_dtype)
| def pdtype(self) -> Optional[PandasDtype]:
"""PandasDtype of the dataframe."""
if self.pandas_dtype is None:
return self.pandas_dtype
return PandasDtype.from_str_alias(PandasDtype.get_str_dtype(self.pandas_dtype))
| https://github.com/pandera-dev/pandera/issues/418 | Traceback (most recent call last):
File "foo.py", line 8, in <module>
yaml_schema = schema.to_yaml()
File "/Users/nielsbantilan/git/pandera/pandera/schemas.py", line 1197, in to_yaml
return pandera.io.to_yaml(self, fp)
File "/Users/nielsbantilan/git/pandera/pandera/io.py", line 223, in to_yaml
statistics = _serialize_s... | AttributeError |
def _parse_annotation(self, raw_annotation: Type) -> None:
"""Parse key information from annotation.
:param annotation: A subscripted type.
:returns: Annotation
"""
self.raw_annotation = raw_annotation
self.optional = typing_inspect.is_optional_type(raw_annotation)
if self.optional:
... | def _parse_annotation(self, raw_annotation: Type) -> None:
"""Parse key information from annotation.
:param annotation: A subscripted type.
:returns: Annotation
"""
self.raw_annotation = raw_annotation
self.optional = typing_inspect.is_optional_type(raw_annotation)
if self.optional:
... | https://github.com/pandera-dev/pandera/issues/378 | TypeError Traceback (most recent call last)
<ipython-input-10-1d3df28d227a> in <module>
----> 1 Schema.validate(df)
/cw/dtaijupiter/NoCsBack/dtai/pieterr/Projects/socceraction/.venv/lib/python3.6/site-packages/pandera/model.py in validate(cls, check_obj, head, tail, sample, random_state... | TypeError |
def _serialize_component_stats(component_stats):
"""
Serialize column or index statistics into json/yaml-compatible format.
"""
serialized_checks = None
if component_stats["checks"] is not None:
serialized_checks = {}
for check_name, check_stats in component_stats["checks"].items():
... | def _serialize_component_stats(component_stats):
"""
Serialize column or index statistics into json/yaml-compatible format.
"""
serialized_checks = None
if component_stats["checks"] is not None:
serialized_checks = {
check_name: _serialize_check_stats(
check_stats... | https://github.com/pandera-dev/pandera/issues/246 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-7-6d1fa2fde789> in <module>
----> 1 pa.io.to_script(schema)
~/git/pandera/pandera/io.py in to_script(dataframe_schema, path_or_buf)
309 ... | AttributeError |
def _format_checks(checks_dict):
if checks_dict is None:
return "None"
checks = []
for check_name, check_kwargs in checks_dict.items():
if check_kwargs is None:
warnings.warn(
f"Check {check_name} cannot be serialized. This check will be ignored"
)
... | def _format_checks(checks_dict):
if checks_dict is None:
return "None"
checks = []
for check_name, check_kwargs in checks_dict.items():
args = ", ".join(
"{}={}".format(k, v.__repr__()) for k, v in check_kwargs.items()
)
checks.append("Check.{}({})".format(check_... | https://github.com/pandera-dev/pandera/issues/246 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-7-6d1fa2fde789> in <module>
----> 1 pa.io.to_script(schema)
~/git/pandera/pandera/io.py in to_script(dataframe_schema, path_or_buf)
309 ... | AttributeError |
def get_route_to(self, destination="", protocol="", longer=False):
routes = {}
# Placeholder for vrf arg
vrf = ""
# Right not iterating through vrfs is necessary
# show ipv6 route doesn't support vrf 'all'
if vrf == "":
vrfs = sorted(self._get_vrfs())
else:
vrfs = [vrf]
... | def get_route_to(self, destination="", protocol="", longer=False):
routes = {}
# Placeholder for vrf arg
vrf = ""
# Right not iterating through vrfs is necessary
# show ipv6 route doesn't support vrf 'all'
if vrf == "":
vrfs = sorted(self._get_vrfs())
else:
vrfs = [vrf]
... | https://github.com/napalm-automation/napalm/issues/1069 | Traceback (most recent call last):
File "eos2.py", line 7, in <module>
dev_info = dev.get_route_to(u'3.3.3.3/32')
File "/usr/local/lib/python2.7/dist-packages/napalm/eos/eos.py", line 1258, in get_route_to
.get("peerAddr", "")
File "/usr/local/lib/python2.7/dist-packages/napalm/base/helpers.py", line 330, in ip
addr_ob... | netaddr.core.AddrFormatError |
def _send_command(
self,
command,
delay_factor=None,
start=None,
expect_string=None,
read_output=None,
receive=False,
):
if not expect_string:
expect_string = self._XML_MODE_PROMPT
if read_output is None:
read_output = ""
if not delay_factor:
delay_facto... | def _send_command(
self,
command,
delay_factor=None,
start=None,
expect_string=None,
read_output=None,
receive=False,
):
if not expect_string:
expect_string = self._XML_MODE_PROMPT
if read_output is None:
read_output = ""
if not delay_factor:
delay_facto... | https://github.com/napalm-automation/napalm/issues/1312 | root@1dab935bca2b:/opt/peering-manager# napalm --debug --user root --password xxxx --vendor iosxr --optional_args "ssh_config_file='/root/.ssh/config'" router1 call get_facts
2020-10-28 20:41:43,221 - napalm - DEBUG - Starting napalm's debugging tool
2020-10-28 20:41:43,221 - napalm - DEBUG - Gathering napalm packages
... | AttributeError |
def get_interfaces_counters(self):
"""
Return interface counters and errors.
'tx_errors': int,
'rx_errors': int,
'tx_discards': int,
'rx_discards': int,
'tx_octets': int,
'rx_octets': int,
'tx_unicast_packets': int,
'rx_unicast_packets': int,
'tx_multicast_packets': int,
... | def get_interfaces_counters(self):
"""
Return interface counters and errors.
'tx_errors': int,
'rx_errors': int,
'tx_discards': int,
'rx_discards': int,
'tx_octets': int,
'rx_octets': int,
'tx_unicast_packets': int,
'rx_unicast_packets': int,
'tx_multicast_packets': int,
... | https://github.com/napalm-automation/napalm/issues/1200 | Traceback (most recent call last):
File "list-vlan2.py", line 19, in <module>
print(yaml.dump(device.get_interfaces_counters()))
File "/srv/home/adm-brin-f/Devel/pythonspace/test-napalm/.venv/lib/python3.6/site-packages/napalm/ios/ios.py", line 2133, in get_interfaces_counters
counters[interface]["rx_discards"] = int(m... | KeyError |
def _process_optional_args(self, optional_args):
# Define locking method
self.lock_disable = optional_args.get("lock_disable", False)
self.enablepwd = optional_args.pop("enable_password", "")
self.eos_autoComplete = optional_args.pop("eos_autoComplete", None)
# eos_transport is there for backwards ... | def _process_optional_args(self, optional_args):
# Define locking method
self.lock_disable = optional_args.get("lock_disable", False)
self.enablepwd = optional_args.pop("enable_password", "")
self.eos_autoComplete = optional_args.pop("eos_autoComplete", None)
# eos_transport is there for backwards ... | https://github.com/napalm-automation/napalm/issues/1200 | Traceback (most recent call last):
File "list-vlan2.py", line 19, in <module>
print(yaml.dump(device.get_interfaces_counters()))
File "/srv/home/adm-brin-f/Devel/pythonspace/test-napalm/.venv/lib/python3.6/site-packages/napalm/ios/ios.py", line 2133, in get_interfaces_counters
counters[interface]["rx_discards"] = int(m... | KeyError |
def _load_config(self, filename=None, config=None, replace=True):
if self.config_session is None:
self.config_session = "napalm_{}".format(datetime.now().microsecond)
commands = []
commands.append("configure session {}".format(self.config_session))
if replace:
commands.append("rollback ... | def _load_config(self, filename=None, config=None, replace=True):
if self.config_session is None:
self.config_session = "napalm_{}".format(datetime.now().microsecond)
commands = []
commands.append("configure session {}".format(self.config_session))
if replace:
commands.append("rollback ... | https://github.com/napalm-automation/napalm/issues/1200 | Traceback (most recent call last):
File "list-vlan2.py", line 19, in <module>
print(yaml.dump(device.get_interfaces_counters()))
File "/srv/home/adm-brin-f/Devel/pythonspace/test-napalm/.venv/lib/python3.6/site-packages/napalm/ios/ios.py", line 2133, in get_interfaces_counters
counters[interface]["rx_discards"] = int(m... | KeyError |
def run_commands(self, commands, **kwargs):
"""
Run commands wrapper
:param commands: list of commands
:param kwargs: other args
:return: list of outputs
"""
fn0039_transform = kwargs.pop("fn0039_transform", True)
if fn0039_transform:
if isinstance(commands, str):
com... | def run_commands(self, commands, **kwargs):
"""
Run commands wrapper
:param commands: list of commands
:param kwargs: other args
:return: list of outputs
"""
if isinstance(commands, str):
new_commands = [cli_convert(commands, self.cli_version)]
else:
new_commands = [cli_c... | https://github.com/napalm-automation/napalm/issues/1200 | Traceback (most recent call last):
File "list-vlan2.py", line 19, in <module>
print(yaml.dump(device.get_interfaces_counters()))
File "/srv/home/adm-brin-f/Devel/pythonspace/test-napalm/.venv/lib/python3.6/site-packages/napalm/ios/ios.py", line 2133, in get_interfaces_counters
counters[interface]["rx_discards"] = int(m... | KeyError |
def get_optics(self):
command = "show interfaces transceiver"
output = self._send_command(command)
is_vss = False
# Check if router supports the command
if "% Invalid input" in output:
return {}
elif "% Incomplete command" in output:
if self._is_vss():
is_vss = True
... | def get_optics(self):
command = "show interfaces transceiver"
output = self._send_command(command)
# Check if router supports the command
if "% Invalid input" in output:
return {}
# Formatting data into return data structure
optics_detail = {}
try:
split_output = re.split(... | https://github.com/napalm-automation/napalm/issues/1200 | Traceback (most recent call last):
File "list-vlan2.py", line 19, in <module>
print(yaml.dump(device.get_interfaces_counters()))
File "/srv/home/adm-brin-f/Devel/pythonspace/test-napalm/.venv/lib/python3.6/site-packages/napalm/ios/ios.py", line 2133, in get_interfaces_counters
counters[interface]["rx_discards"] = int(m... | KeyError |
def commit_config(self, message=""):
"""Commit configuration."""
commit_args = {"comment": message} if message else {}
self.device.cu.commit(ignore_warning=self.ignore_warning, **commit_args)
if not self.lock_disable and not self.session_config_lock:
self._unlock()
if self.config_private:
... | def commit_config(self, message=""):
"""Commit configuration."""
commit_args = {"comment": message} if message else {}
self.device.cu.commit(ignore_warning=self.ignore_warning, **commit_args)
if not self.lock_disable and not self.session_config_lock:
self._unlock()
| https://github.com/napalm-automation/napalm/issues/1200 | Traceback (most recent call last):
File "list-vlan2.py", line 19, in <module>
print(yaml.dump(device.get_interfaces_counters()))
File "/srv/home/adm-brin-f/Devel/pythonspace/test-napalm/.venv/lib/python3.6/site-packages/napalm/ios/ios.py", line 2133, in get_interfaces_counters
counters[interface]["rx_discards"] = int(m... | KeyError |
def discard_config(self):
"""Discard changes (rollback 0)."""
self.device.cu.rollback(rb_id=0)
if not self.lock_disable and not self.session_config_lock:
self._unlock()
if self.config_private:
self.device.rpc.close_configuration()
| def discard_config(self):
"""Discard changes (rollback 0)."""
self.device.cu.rollback(rb_id=0)
if not self.lock_disable and not self.session_config_lock:
self._unlock()
| https://github.com/napalm-automation/napalm/issues/1200 | Traceback (most recent call last):
File "list-vlan2.py", line 19, in <module>
print(yaml.dump(device.get_interfaces_counters()))
File "/srv/home/adm-brin-f/Devel/pythonspace/test-napalm/.venv/lib/python3.6/site-packages/napalm/ios/ios.py", line 2133, in get_interfaces_counters
counters[interface]["rx_discards"] = int(m... | KeyError |
def _send_command(self, command, raw_text=False, cmd_verify=True):
"""
Wrapper for Netmiko's send_command method.
raw_text argument is not used and is for code sharing with NX-API.
"""
return self.device.send_command(command, cmd_verify=cmd_verify)
| def _send_command(self, command, raw_text=False):
"""
Wrapper for Netmiko's send_command method.
raw_text argument is not used and is for code sharing with NX-API.
"""
return self.device.send_command(command)
| https://github.com/napalm-automation/napalm/issues/1200 | Traceback (most recent call last):
File "list-vlan2.py", line 19, in <module>
print(yaml.dump(device.get_interfaces_counters()))
File "/srv/home/adm-brin-f/Devel/pythonspace/test-napalm/.venv/lib/python3.6/site-packages/napalm/ios/ios.py", line 2133, in get_interfaces_counters
counters[interface]["rx_discards"] = int(m... | KeyError |
def is_alive(self):
"""Returns a flag with the state of the SSH connection."""
null = chr(0)
try:
if self.device is None:
return {"is_alive": False}
else:
# Try sending ASCII null byte to maintain the connection alive
self._send_command(null, cmd_verify=Fa... | def is_alive(self):
"""Returns a flag with the state of the SSH connection."""
null = chr(0)
try:
if self.device is None:
return {"is_alive": False}
else:
# Try sending ASCII null byte to maintain the connection alive
self._send_command(null)
except (s... | https://github.com/napalm-automation/napalm/issues/1200 | Traceback (most recent call last):
File "list-vlan2.py", line 19, in <module>
print(yaml.dump(device.get_interfaces_counters()))
File "/srv/home/adm-brin-f/Devel/pythonspace/test-napalm/.venv/lib/python3.6/site-packages/napalm/ios/ios.py", line 2133, in get_interfaces_counters
counters[interface]["rx_discards"] = int(m... | KeyError |
def get_interfaces_ip(self):
"""
Get interface IP details. Returns a dictionary of dictionaries.
Sample output:
{
"Ethernet2/3": {
"ipv4": {
"4.4.4.4": {
"prefix_length": 16
}
},
"ipv6": {
"2... | def get_interfaces_ip(self):
"""
Get interface IP details. Returns a dictionary of dictionaries.
Sample output:
{
"Ethernet2/3": {
"ipv4": {
"4.4.4.4": {
"prefix_length": 16
}
},
"ipv6": {
"2... | https://github.com/napalm-automation/napalm/issues/1020 | $ napalm -v nxos_ssh --user itifous --password ***** n9k-hostname call get_interfaces_ip
2019-07-16 13:51:56,644 - napalm - ERROR - method - Failed: list index out of range
================= Traceback =================
Traceback (most recent call last):
File "/home/itifous/.local/share/virtualenvs/netbox-netprod-impo... | IndexError |
def get_bgp_neighbors(self):
"""BGP neighbor information.
Supports both IPv4 and IPv6. vrf aware
"""
supported_afi = [
"ipv4 unicast",
"ipv4 multicast",
"ipv6 unicast",
"ipv6 multicast",
"vpnv4 unicast",
"vpnv6 unicast",
"ipv4 mdt",
]
bgp... | def get_bgp_neighbors(self):
"""BGP neighbor information.
Supports both IPv4 and IPv6. vrf aware
"""
supported_afi = [
"ipv4 unicast",
"ipv4 multicast",
"ipv6 unicast",
"ipv6 multicast",
"vpnv4 unicast",
"vpnv6 unicast",
"ipv4 mdt",
]
bgp... | https://github.com/napalm-automation/napalm/issues/987 | In [3]: with IOSDriver("ios01", os.environ.get("NAPALM_USERNAME"), os.environ.get("NAPALM_PASSWORD")) as d:
...: d.get_bgp_neighbors()
...:
NAPALM didn't catch this exception. Please, fill a bugfix on https://github.com/napalm-automation/napalm/issues
Don't forget to include this traceback.
------------------------... | AddrFormatError |
def build_help():
parser = argparse.ArgumentParser(
description="Command line tool to handle configuration on devices using NAPALM."
"The script will print the diff on the screen",
epilog="Automate all the things!!!",
)
parser.add_argument(
dest="hostname",
action="st... | def build_help():
parser = argparse.ArgumentParser(
description="Command line tool to handle configuration on devices using NAPALM."
"The script will print the diff on the screen",
epilog="Automate all the things!!!",
)
parser.add_argument(
dest="hostname",
action="st... | https://github.com/napalm-automation/napalm/issues/936 | user@host:/opt/netbox$ napalm --user username--password xxxxx --vendor nxos_ssh --debug 10.28.210.5
2019-02-28 15:07:06,834 - napalm - DEBUG - Starting napalm's debugging tool
2019-02-28 15:07:06,834 - napalm - DEBUG - Gathering napalm packages
2019-02-28 15:07:06,835 - napalm - DEBUG - napalm==2.4.0
2019-02-28 15:07:0... | AttributeError |
def get_lldp_neighbors_detail(self, interface=""):
"""Detailed view of the LLDP neighbors."""
lldp_neighbors = {}
lldp_table = junos_views.junos_lldp_neighbors_detail_table(self.device)
try:
lldp_table.get()
except RpcError as rpcerr:
# this assumes the library runs in an environmen... | def get_lldp_neighbors_detail(self, interface=""):
"""Detailed view of the LLDP neighbors."""
lldp_neighbors = {}
lldp_table = junos_views.junos_lldp_neighbors_detail_table(self.device)
try:
lldp_table.get()
except RpcError as rpcerr:
# this assumes the library runs in an environmen... | https://github.com/napalm-automation/napalm/issues/430 | NAPALM didn't catch this exception. Please, fill a bugfix on https://github.com/napalm-automation/napalm/issues
Don't forget to include this traceback.
Traceback (most recent call last):
File "./probe.py", line 42, in <module>
main()
File "./probe.py", line 17, in main
lldp = dev.get_lldp_neighbors_detail()
File "/User... | jnpr.junos.exception.RpcError |
def parse_intf_section(interface):
"""Parse a single entry from show interfaces output.
Different cases:
mgmt0 is up
admin state is up
Ethernet2/1 is up
admin state is up, Dedicated Interface
Vlan1 is down (Administratively down), line protocol is down, autostate enabled
Ethernet154/... | def parse_intf_section(interface):
"""Parse a single entry from show interfaces output.
Different cases:
mgmt0 is up
admin state is up
Ethernet2/1 is up
admin state is up, Dedicated Interface
Vlan1 is down (Administratively down), line protocol is down, autostate enabled
Ethernet154/... | https://github.com/napalm-automation/napalm/issues/855 | Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/utils/napalm.py", line 167, in call
out = getattr(napalm_device.get('DRIVER'), method)(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/napalm/nxos_ssh/nxos_ssh.py", line 836, in get_interfaces
interfaces.update(parse_intf_secti... | AttributeError |
def get_environment(self):
def extract_temperature_data(data):
for s in data:
temp = s["currentTemperature"] if "currentTemperature" in s else 0.0
name = s["name"]
values = {
"temperature": temp,
"is_alert": temp > s["overheatThreshold"],
... | def get_environment(self):
def extract_temperature_data(data):
for s in data:
temp = s["currentTemperature"] if "currentTemperature" in s else 0.0
name = s["name"]
values = {
"temperature": temp,
"is_alert": temp > s["overheatThreshold"],
... | https://github.com/napalm-automation/napalm/issues/810 | In [4]: d.get_environment()
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-4-b99851033f4f> in <module>()
----> 1 d.get_environment()
~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/napalm/eos/eos... | KeyError |
def get_route_to(self, destination="", protocol=""):
routes = {}
# Placeholder for vrf arg
vrf = ""
# Right not iterating through vrfs is necessary
# show ipv6 route doesn't support vrf 'all'
if vrf == "":
vrfs = sorted(self._get_vrfs())
else:
vrfs = [vrf]
if protocol.... | def get_route_to(self, destination="", protocol=""):
routes = {}
# Placeholder for vrf arg
vrf = ""
# Right not iterating through vrfs is necessary
# show ipv6 route doesn't support vrf 'all'
if vrf == "":
vrfs = sorted(self._get_vrfs())
else:
vrfs = [vrf]
if protocol.... | https://github.com/napalm-automation/napalm/issues/736 | ValueError Traceback (most recent call last)
<ipython-input-2-c5a9e185b0d9> in <module>()
5
6 with EOSDriver("router", "bewing", getpass()) as d:
----> 7 pprint(d.get_route_to("192.0.2.0/24"))
8
9
/mnt/c/Users/bewing/PycharmProjects/napalm/napalm/eos/eos.py in get_route_to(self, dest... | ValueError |
def parse_intf_section(interface):
"""Parse a single entry from show interfaces output.
Different cases:
mgmt0 is up
admin state is up
Ethernet2/1 is up
admin state is up, Dedicated Interface
Vlan1 is down (Administratively down), line protocol is down, autostate enabled
Ethernet154/... | def parse_intf_section(interface):
"""Parse a single entry from show interfaces output.
Different cases:
mgmt0 is up
admin state is up
Ethernet2/1 is up
admin state is up, Dedicated Interface
Vlan1 is down (Administratively down), line protocol is down, autostate enabled
Ethernet154/... | https://github.com/napalm-automation/napalm/issues/672 | Traceback (most recent call last):
File "script_switch.py", line 308, in <module>
main(sys.argv[1:])
File "script_switch.py", line 303, in main
test_migration(ip, login, pwd, driver, fex)
File "script_switch.py", line 206, in test_migration
new_intf_table = device.get_interfaces()
File "/home/florian_lacommare/GitHub/n... | AttributeError |
def get_facts(self):
"""Return a set of facts from the devices."""
# default values.
vendor = "Cisco"
uptime = -1
serial_number, fqdn, os_version, hostname, domain_name, model = ("",) * 6
# obtain output from device
show_ver = self.device.send_command("show version")
show_hosts = self.d... | def get_facts(self):
"""Return a set of facts from the devices."""
# default values.
vendor = "Cisco"
uptime = -1
serial_number, fqdn, os_version, hostname, domain_name, model = ("",) * 6
# obtain output from device
show_ver = self.device.send_command("show version")
show_hosts = self.d... | https://github.com/napalm-automation/napalm/issues/672 | Traceback (most recent call last):
File "script_switch.py", line 308, in <module>
main(sys.argv[1:])
File "script_switch.py", line 303, in main
test_migration(ip, login, pwd, driver, fex)
File "script_switch.py", line 206, in test_migration
new_intf_table = device.get_interfaces()
File "/home/florian_lacommare/GitHub/n... | AttributeError |
def get_mac_address_table(self):
"""
Returns a lists of dictionaries. Each dictionary represents an entry in the MAC Address
Table, having the following keys
* mac (string)
* interface (string)
* vlan (int)
* active (boolean)
* static (boolean)
* moves (int)
... | def get_mac_address_table(self):
"""
Returns a lists of dictionaries. Each dictionary represents an entry in the MAC Address
Table, having the following keys
* mac (string)
* interface (string)
* vlan (int)
* active (boolean)
* static (boolean)
* moves (int)
... | https://github.com/napalm-automation/napalm/issues/672 | Traceback (most recent call last):
File "script_switch.py", line 308, in <module>
main(sys.argv[1:])
File "script_switch.py", line 303, in main
test_migration(ip, login, pwd, driver, fex)
File "script_switch.py", line 206, in test_migration
new_intf_table = device.get_interfaces()
File "/home/florian_lacommare/GitHub/n... | AttributeError |
def get_lldp_neighbors_detail(self, interface=""):
"""Detailed view of the LLDP neighbors."""
lldp_neighbors = {}
lldp_table = junos_views.junos_lldp_neighbors_detail_table(self.device)
try:
lldp_table.get()
except RpcError as rpcerr:
# this assumes the library runs in an environmen... | def get_lldp_neighbors_detail(self, interface=""):
"""Detailed view of the LLDP neighbors."""
lldp_neighbors = {}
lldp_table = junos_views.junos_lldp_neighbors_detail_table(self.device)
try:
lldp_table.get()
except RpcError as rpcerr:
# this assumes the library runs in an environmen... | https://github.com/napalm-automation/napalm/issues/646 | 2018-02-09 14:10:53,449 - napalm - ERROR - method - Failed: RpcError(severity: error, bad_element: get-lldp-interface-neighbors-information, message: error: syntax error
error: syntax error)
================= Traceback =================
Traceback (most recent call last):
File "/usr/local/bin/napalm", line 11, in <mod... | jnpr.junos.exception.RpcError |
def get_lldp_neighbors(self):
"""IOS implementation of get_lldp_neighbors."""
lldp = {}
command = "show lldp neighbors"
output = self._send_command(command)
# Check if router supports the command
if "% Invalid input" in output:
return {}
# Process the output to obtain just the LLDP... | def get_lldp_neighbors(self):
"""IOS implementation of get_lldp_neighbors."""
lldp = {}
command = "show lldp neighbors"
output = self._send_command(command)
# Check if router supports the command
if "% Invalid input" in output:
return {}
# Process the output to obtain just the LLDP... | https://github.com/napalm-automation/napalm/issues/456 | Traceback (most recent call last):
File "hello.py", line 57, in <module>
print (local_int_brief)
NameError: name 'local_int_brief' is not defined | NameError |
def get_optics(self):
"""Return optics information."""
optics_table = junos_views.junos_intf_optics_table(self.device)
optics_table.get()
optics_items = optics_table.items()
# optics_items has no lane information, so we need to re-format data
# inserting lane 0 for all optics. Note it contains ... | def get_optics(self):
"""Return optics information."""
optics_table = junos_views.junos_intf_optics_table(self.device)
optics_table.get()
optics_items = optics_table.items()
# optics_items has no lane information, so we need to re-format data
# inserting lane 0 for all optics. Note it contains ... | https://github.com/napalm-automation/napalm/issues/491 | Traceback (most recent call last):
File "nuke.py", line 32, in <module>
optics = device.get_optics()
File "/Users/jboswell/.virtualenvs/nuke/lib/python2.7/site-packages/napalm_junos/junos.py", line 1785, in get_optics
[None, C.OPTICS_NULL_LEVEL]
ValueError: could not convert string to float: - Inf | ValueError |
def run(args):
import os
import sys
import numpy as np
import evo.core.lie_algebra as lie
from evo.core import trajectory
from evo.core.trajectory import PoseTrajectory3D
from evo.tools import file_interface, log
from evo.tools.settings import SETTINGS
log.configure_logging(
... | def run(args):
import os
import sys
import numpy as np
import evo.core.lie_algebra as lie
from evo.core import trajectory
from evo.core.trajectory import PoseTrajectory3D
from evo.tools import file_interface, log
from evo.tools.settings import SETTINGS
log.configure_logging(
... | https://github.com/MichaelGrupp/evo/issues/237 | [DEBUG][2020-01-30 17:55:20,837][main_traj.run():284]
--------------------------------------------------------------------------------
[DEBUG][2020-01-30 17:55:21,225][file_interface.read_bag_trajectory():271]
Loaded 1762 nav_msgs/Odometry messages of topic: /odom
[DEBUG][2020-01-30 17:55:21,832][file_interface.read_ba... | RuntimeError |
def get_delta_unit(args):
from evo.core.metrics import Unit
delta_unit = Unit.none
if args.delta_unit == "f":
delta_unit = Unit.frames
elif args.delta_unit == "d":
delta_unit = Unit.degrees
elif args.delta_unit == "r":
delta_unit = Unit.radians
elif args.delta_unit == "m... | def get_delta_unit(args):
from evo.core.metrics import Unit
delta_unit = None
if args.delta_unit == "f":
delta_unit = Unit.frames
elif args.delta_unit == "d":
delta_unit = Unit.degrees
elif args.delta_unit == "r":
delta_unit = Unit.radians
elif args.delta_unit == "m":
... | https://github.com/MichaelGrupp/evo/issues/145 | [ERROR] Unhandled error in evo.main_rpe
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/evo/entry_points.py", line 90, in launch
main_module.run(args)
File "/usr/local/lib/python2.7/dist-packages/evo/main_rpe.py", line 244, in run
est_name=est_name,
File "/usr/local/lib/python2.7/dist-pa... | AttributeError |
def get_result(self, ref_name="reference", est_name="estimate"):
"""
Wrap the result in Result object.
:param ref_name: optional, label of the reference data
:param est_name: optional, label of the estimated data
:return:
"""
result = Result()
metric_name = self.__class__.__name__
re... | def get_result(self, ref_name="reference", est_name="estimate"):
"""
Wrap the result in Result object.
:param ref_name: optional, label of the reference data
:param est_name: optional, label of the estimated data
:return:
"""
result = Result()
metric_name = self.__class__.__name__
un... | https://github.com/MichaelGrupp/evo/issues/145 | [ERROR] Unhandled error in evo.main_rpe
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/evo/entry_points.py", line 90, in launch
main_module.run(args)
File "/usr/local/lib/python2.7/dist-packages/evo/main_rpe.py", line 244, in run
est_name=est_name,
File "/usr/local/lib/python2.7/dist-pa... | AttributeError |
def __init__(
self,
pose_relation=PoseRelation.translation_part,
delta=1.0,
delta_unit=Unit.frames,
rel_delta_tol=0.1,
all_pairs=False,
):
if delta < 0:
raise MetricsException("delta must be a positive number")
if (
delta_unit == Unit.frames
and not isinstance(del... | def __init__(
self,
pose_relation=PoseRelation.translation_part,
delta=1.0,
delta_unit=Unit.frames,
rel_delta_tol=0.1,
all_pairs=False,
):
if delta < 0:
raise MetricsException("delta must be a positive number")
if (
delta_unit == Unit.frames
and not isinstance(del... | https://github.com/MichaelGrupp/evo/issues/145 | [ERROR] Unhandled error in evo.main_rpe
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/evo/entry_points.py", line 90, in launch
main_module.run(args)
File "/usr/local/lib/python2.7/dist-packages/evo/main_rpe.py", line 244, in run
est_name=est_name,
File "/usr/local/lib/python2.7/dist-pa... | AttributeError |
def __init__(self, pose_relation=PoseRelation.translation_part):
self.pose_relation = pose_relation
self.E = []
self.error = []
if pose_relation == PoseRelation.translation_part:
self.unit = Unit.meters
elif pose_relation == PoseRelation.rotation_angle_deg:
self.unit = Unit.degrees
... | def __init__(self, pose_relation=PoseRelation.translation_part):
self.pose_relation = pose_relation
self.E = []
self.error = []
if pose_relation == PoseRelation.translation_part:
self.unit = Unit.meters
elif pose_relation == PoseRelation.rotation_angle_deg:
self.unit = Unit.degrees
... | https://github.com/MichaelGrupp/evo/issues/145 | [ERROR] Unhandled error in evo.main_rpe
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/evo/entry_points.py", line 90, in launch
main_module.run(args)
File "/usr/local/lib/python2.7/dist-packages/evo/main_rpe.py", line 244, in run
est_name=est_name,
File "/usr/local/lib/python2.7/dist-pa... | AttributeError |
def matching_time_indices(stamps_1, stamps_2, max_diff=0.01, offset_2=0.0):
"""
searches for the best matching timestamps of 2 lists and returns their list indices
:param stamps_1: first vector of timestamps
:param stamps_2: second vector of timestamps
:param max_diff: max. allowed absolute time dif... | def matching_time_indices(stamps_1, stamps_2, max_diff=0.01, offset_2=0.0):
"""
searches for the best matching timestamps of 2 lists and returns their list indices
:param stamps_1: first vector of timestamps
:param stamps_2: second vector of timestamps
:param max_diff: max. allowed absolute time dif... | https://github.com/MichaelGrupp/evo/issues/74 | [ERROR] Unhandled error in evo.main_ape
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/evo/entry_points.py", line 87, in launch
main_module.run(args)
File "/usr/local/lib/python2.7/dist-packages/evo/main_ape.py", line 215, in run
est_name=est_name,
File "/usr/local/lib/python2.7/dist-pa... | MetricsException |
def parse_object_fields(
self, obj: JsonSchemaObject, path: List[str]
) -> List[DataModelFieldBase]:
properties: Dict[str, JsonSchemaObject] = (
obj.properties if obj.properties is not None else {}
)
requires: Set[str] = {*obj.required} if obj.required is not None else {*()}
fields: List[Dat... | def parse_object_fields(
self, obj: JsonSchemaObject, path: List[str]
) -> List[DataModelFieldBase]:
properties: Dict[str, JsonSchemaObject] = (
obj.properties if obj.properties is not None else {}
)
requires: Set[str] = {*obj.required} if obj.required is not None else {*()}
fields: List[Dat... | https://github.com/koxudaxi/datamodel-code-generator/issues/225 | Traceback (most recent call last):
File "test.py", line 20, in <module>
print(Test(failing={"foo": "bar"}).to_json())
File "pydantic/main.py", line 346, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Test
failing -> foo
value is not a valid dict (type=type_error.dict... | pydantic.error_wrappers.ValidationError |
def parse_object(
self,
name: str,
obj: JsonSchemaObject,
path: List[str],
singular_name: bool = False,
unique: bool = False,
additional_properties: Optional[JsonSchemaObject] = None,
) -> DataModel:
class_name = self.model_resolver.add(
path, name, class_name=True, singular_name... | def parse_object(
self,
name: str,
obj: JsonSchemaObject,
path: List[str],
singular_name: bool = False,
unique: bool = False,
) -> DataModel:
class_name = self.model_resolver.add(
path, name, class_name=True, singular_name=singular_name, unique=unique
).name
fields = self.par... | https://github.com/koxudaxi/datamodel-code-generator/issues/225 | Traceback (most recent call last):
File "test.py", line 20, in <module>
print(Test(failing={"foo": "bar"}).to_json())
File "pydantic/main.py", line 346, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Test
failing -> foo
value is not a valid dict (type=type_error.dict... | pydantic.error_wrappers.ValidationError |
def parse_object_fields(
self, obj: JsonSchemaObject, path: List[str]
) -> List[DataModelFieldBase]:
properties: Dict[str, JsonSchemaObject] = (
obj.properties if obj.properties is not None else {}
)
requires: Set[str] = {*obj.required} if obj.required is not None else {*()}
fields: List[Dat... | def parse_object_fields(
self, obj: JsonSchemaObject, path: List[str]
) -> List[DataModelFieldBase]:
properties: Dict[str, JsonSchemaObject] = (
obj.properties if obj.properties is not None else {}
)
requires: Set[str] = {*obj.required} if obj.required is not None else {*()}
fields: List[Dat... | https://github.com/koxudaxi/datamodel-code-generator/issues/216 | Traceback (most recent call last):
File "<input>", line 1, in <module>
File "pydantic\main.py", line 346, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 2 validation errors for FileSetUpload
tags -> tag1
value is not a valid dict (type=type_error.dict)
tags -> tag2
value is not a valid dic... | pydantic.error_wrappers.ValidationError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.