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 run(self, edit, message=None):
self.commit_on_close = self.view.settings().get("git_savvy.commit_on_close")
if self.commit_on_close:
# make sure the view would not be closed by commiting synchronously
self.run_async(commit_message=message)
else:
sublime.set_timeout_async(lambda: ... | def run(self, edit, message=None):
sublime.set_timeout_async(lambda: self.run_async(commit_message=message), 0)
| https://github.com/timbrel/GitSavvy/issues/772 | Traceback (most recent call last):
File "core.git_command in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/GitSavvy.sublime-package", line 103, in git
File "core.git_command in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/GitSavvy.sublime-package", line 297, in r... | RuntimeError |
def run_async(self, commit_message=None):
if commit_message is None:
view_text = self.view.substr(sublime.Region(0, self.view.size()))
help_text = self.view.settings().get("git_savvy.commit_view.help_text")
commit_message = view_text.split(help_text)[0]
include_unstaged = self.view.sett... | def run_async(self, commit_message=None):
if commit_message is None:
view_text = self.view.substr(sublime.Region(0, self.view.size()))
help_text = self.view.settings().get("git_savvy.commit_view.help_text")
commit_message = view_text.split(help_text)[0]
include_unstaged = self.view.sett... | https://github.com/timbrel/GitSavvy/issues/772 | Traceback (most recent call last):
File "core.git_command in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/GitSavvy.sublime-package", line 103, in git
File "core.git_command in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/GitSavvy.sublime-package", line 297, in r... | RuntimeError |
def run(self, edit):
if self.view.settings().get("git_savvy.commit_on_close"):
view_text = self.view.substr(sublime.Region(0, self.view.size()))
help_text = self.view.settings().get("git_savvy.commit_view.help_text")
message_txt = view_text.split(help_text)[0] if help_text in view_text else ... | def run(self, edit):
savvy_settings = sublime.load_settings("GitSavvy.sublime-settings")
if savvy_settings.get("commit_on_close"):
view_text = self.view.substr(sublime.Region(0, self.view.size()))
help_text = self.view.settings().get("git_savvy.commit_view.help_text")
message_txt = view_... | https://github.com/timbrel/GitSavvy/issues/772 | Traceback (most recent call last):
File "core.git_command in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/GitSavvy.sublime-package", line 103, in git
File "core.git_command in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/GitSavvy.sublime-package", line 297, in r... | RuntimeError |
def add_ignore(self, path_or_pattern):
"""
Add the provided relative path or pattern to the repo's `.gitignore` file.
"""
global linesep
if not linesep:
# Use native line ending on Windows only when `autocrlf` is set to `true`.
if os.name == "nt":
autocrlf = (
... | def add_ignore(self, path_or_pattern):
"""
Add the provided relative path or pattern to the repo's `.gitignore` file.
"""
global linesep
if not linesep:
# Use native line ending on Windows only when `autocrlf` is set to `true`.
if os.name == "nt":
autocrlf = (
... | https://github.com/timbrel/GitSavvy/issues/498 | Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 574, in run_
return self.run(edit)
File "/Users/alextegelid/Library/Application Support/Sublime Text 3/Packages/GitSavvy/core/interfaces/status.py", line 566, in run
self.add_ignore(os.path.join("/", fpath))
... | UnicodeEncodeError |
def run(self):
savvy_settings = sublime.load_settings("GitSavvy.sublime-settings")
if savvy_settings.get("disable_git_init_prompt"):
return
active_view_id = self.window.active_view().id()
if active_view_id not in views_with_offer_made and sublime.ok_cancel_dialog(
NO_REPO_MESSAGE
):... | def run(self):
active_view_id = self.window.active_view().id()
if active_view_id not in views_with_offer_made and sublime.ok_cancel_dialog(
NO_REPO_MESSAGE
):
self.window.run_command("gs_init")
else:
views_with_offer_made.add(active_view_id)
| https://github.com/timbrel/GitSavvy/issues/589 | Traceback (most recent call last):
File "core.git_command in C:\Users\fpeij\AppData\Roaming\Sublime Text 3\Installed Packages\GitSavvy.sublime-package", line 133, in git
File "core.git_command in C:\Users\fpeij\AppData\Roaming\Sublime Text 3\Installed Packages\GitSavvy.sublime-package", line 215, in repo_path
File "cor... | GitSavvy.core.git_command.GitSavvyError |
def run_async(self, settings=None, cached=False):
if settings is None:
file_view = self.window.active_view()
syntax_file = file_view.settings().get("syntax")
settings = {
"git_savvy.file_path": self.file_path,
"git_savvy.repo_path": self.repo_path,
}
else:... | def run_async(self, settings=None, cached=False):
if settings is None:
file_view = self.window.active_view()
syntax_file = file_view.settings().get("syntax")
settings = {
"git_savvy.file_path": self.file_path,
"git_savvy.repo_path": self.repo_path,
}
else:... | https://github.com/timbrel/GitSavvy/issues/624 | Traceback (most recent call last):
File "core.commands.inline_diff in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/GitSavvy.sublime-package", line 37, in <lambda>
File "core.commands.inline_diff in /Users/user/Library/Application Support/Sublime Text 3/Installed Packages/GitSavvy.sublime-pa... | AttributeError |
def do_clone(self):
sublime.status_message("Start cloning {}".format(self.git_url))
self.git("clone", self.git_url, self.suggested_git_root, working_dir=".")
sublime.status_message("Cloned repo successfully.")
self.open_folder()
util.view.refresh_gitsavvy(self.window.active_view())
| def do_clone(self):
sublime.status_message("Start cloning {}".format(self.git_url))
self.git("clone", self.git_url, self.suggested_git_root)
sublime.status_message("Cloned repo successfully.")
self.open_folder()
util.view.refresh_gitsavvy(self.window.active_view())
| https://github.com/timbrel/GitSavvy/issues/613 | Traceback (most recent call last):
File "/Users/pavel/Library/Application Support/Sublime Text 3/Packages/GitSavvy/core/git_command.py", line 126, in git
cwd=working_dir or self.repo_path,
File "/Users/pavel/Library/Application Support/Sublime Text 3/Packages/GitSavvy/core/git_command.py", line 213, in repo_path
return... | ValueError |
def run_async(self):
log, cursor = self.interface.get_log()
if log is None or cursor is None or cursor == -1:
return
branch_name, ref, _ = self.interface.get_branch_state()
current = log[cursor]
if current["branch_name"] != branch_name:
sublime.error_message("Current branch does no... | def run_async(self):
log, cursor = self.interface.get_log()
if log is None or cursor is None or cursor == -1:
return
branch_name, ref = self.interface.get_branch_state()
current = log[cursor]
if current["branch_name"] != branch_name:
sublime.error_message("Current branch does not m... | https://github.com/timbrel/GitSavvy/issues/490 | Traceback (most recent call last):
File "/Users/kyank/Library/Application Support/Sublime Text 3/Packages/GitSavvy/core/interfaces/rebase.py", line 353, in run_async
branch_name, ref = self.interface.get_branch_state()
ValueError: too many values to unpack (expected 2) | ValueError |
def run_async(self):
log, cursor = self.interface.get_log()
if log is None or cursor is None or cursor == len(log) - 1:
return
branch_name, ref, _ = self.interface.get_branch_state()
undone_action = log[cursor + 1]
if undone_action["branch_name"] != branch_name:
sublime.error_messa... | def run_async(self):
log, cursor = self.interface.get_log()
if log is None or cursor is None or cursor == len(log) - 1:
return
branch_name, ref = self.interface.get_branch_state()
undone_action = log[cursor + 1]
if undone_action["branch_name"] != branch_name:
sublime.error_message(... | https://github.com/timbrel/GitSavvy/issues/490 | Traceback (most recent call last):
File "/Users/kyank/Library/Application Support/Sublime Text 3/Packages/GitSavvy/core/interfaces/rebase.py", line 353, in run_async
branch_name, ref = self.interface.get_branch_state()
ValueError: too many values to unpack (expected 2) | ValueError |
def search_user_directory(self, term: str) -> List[User]:
"""
Search user directory for a given term, returning a list of users
Args:
term: term to be searched for
Returns:
user_list: list of users returned by server-side search
"""
try:
response = self.api._send(
... | def search_user_directory(self, term: str) -> List[User]:
"""
Search user directory for a given term, returning a list of users
Args:
term: term to be searched for
Returns:
user_list: list of users returned by server-side search
"""
response = self.api._send("POST", "/user_direct... | https://github.com/raiden-network/raiden/issues/6584 | Traceback (most recent call last):
File "raiden/ui/cli.py", line 617, in run
File "raiden/ui/runners.py", line 21, in run_services
File "raiden/ui/app.py", line 446, in run_app
File "raiden/app.py", line 90, in start
File "raiden/raiden_service.py", line 444, in start
File "raiden/raiden_service.py", line 552, in _star... | matrix_client.errors.MatrixRequestError |
def warm_users(self, users: List[User]) -> None:
for user in users:
user_id = user.user_id
cached_displayname = self.userid_to_displayname.get(user_id)
if cached_displayname is None:
# The cache is cold, query and warm it.
if not user.displayname:
# H... | def warm_users(self, users: List[User]) -> None:
for user in users:
user_id = user.user_id
cached_displayname = self.userid_to_displayname.get(user_id)
if cached_displayname is None:
# The cache is cold, query and warm it.
if not user.displayname:
# H... | https://github.com/raiden-network/raiden/issues/6584 | Traceback (most recent call last):
File "raiden/ui/cli.py", line 617, in run
File "raiden/ui/runners.py", line 21, in run_services
File "raiden/ui/app.py", line 446, in run_app
File "raiden/app.py", line 90, in start
File "raiden/raiden_service.py", line 444, in start
File "raiden/raiden_service.py", line 552, in _star... | matrix_client.errors.MatrixRequestError |
def first_login(
client: GMatrixClient, signer: Signer, username: str, cap_str: str
) -> User:
"""Login within a server.
There are multiple cases where a previous auth token can become invalid and
a new login is necessary:
- The server is configured to automatically invalidate tokens after a while... | def first_login(
client: GMatrixClient, signer: Signer, username: str, cap_str: str
) -> User:
"""Login within a server.
There are multiple cases where a previous auth token can become invalid and
a new login is necessary:
- The server is configured to automatically invalidate tokens after a while... | https://github.com/raiden-network/raiden/issues/6584 | Traceback (most recent call last):
File "raiden/ui/cli.py", line 617, in run
File "raiden/ui/runners.py", line 21, in run_services
File "raiden/ui/app.py", line 446, in run_app
File "raiden/app.py", line 90, in start
File "raiden/raiden_service.py", line 444, in start
File "raiden/raiden_service.py", line 552, in _star... | matrix_client.errors.MatrixRequestError |
def validate_userid_signature(user: User) -> Optional[Address]:
"""Validate a userId format and signature on displayName, and return its address"""
# display_name should be an address in the USERID_RE format
match = USERID_RE.match(user.user_id)
if not match:
log.warning("Invalid user id", user=... | def validate_userid_signature(user: User) -> Optional[Address]:
"""Validate a userId format and signature on displayName, and return its address"""
# display_name should be an address in the USERID_RE format
match = USERID_RE.match(user.user_id)
if not match:
return None
msg = (
"Th... | https://github.com/raiden-network/raiden/issues/6555 | Traceback (most recent call last):
File "raiden/ui/cli.py", line 617, in run
File "raiden/ui/runners.py", line 21, in run_services
File "raiden/ui/app.py", line 446, in run_app
File "raiden/app.py", line 90, in start
File "raiden/raiden_service.py", line 444, in start
File "raiden/raiden_service.py", line 552, in _star... | AssertionError |
def get(self, token_address: TokenAddress, target_address: Address) -> Response:
kwargs = validate_query_params(self.get_schema)
return self.rest_api.get_raiden_events_payment_history_with_timestamps(
registry_address=self.rest_api.raiden_api.raiden.default_registry.address,
token_address=token_... | def get(
self, token_address: TokenAddress = None, target_address: Address = None
) -> Response:
kwargs = validate_query_params(self.get_schema)
return self.rest_api.get_raiden_events_payment_history_with_timestamps(
registry_address=self.rest_api.raiden_api.raiden.default_registry.address,
... | https://github.com/raiden-network/raiden/issues/6217 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
File "raiden/api/rest.py", line 409, in _run
File "gevent/baseserver.py", line 389, in serve_forever
File "src/gevent/event.py", line 133, in gevent._event.Event.wait
File "src/gevent/_abstract_linkable.py", lin... | TypeError |
def __init__(
self,
rpc_client: JSONRPCClient,
proxy_manager: ProxyManager,
query_start_block: BlockNumber,
default_registry: TokenNetworkRegistry,
default_secret_registry: SecretRegistry,
default_service_registry: Optional[ServiceRegistry],
default_one_to_n_address: Optional[OneToNAddre... | def __init__(
self,
rpc_client: JSONRPCClient,
proxy_manager: ProxyManager,
query_start_block: BlockNumber,
default_registry: TokenNetworkRegistry,
default_secret_registry: SecretRegistry,
default_service_registry: Optional[ServiceRegistry],
default_one_to_n_address: Optional[OneToNAddre... | https://github.com/raiden-network/raiden/issues/6081 | Traceback (most recent call last):
File "/Users/ulo/Envs/raiden/lib/python3.7/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/Users/ulo/Envs/raiden/lib/python3.7/site-packages/urllib3/connectionpool.py", line 383, in _make_reques... | urllib3.exceptions.ReadTimeoutError |
def _log_sync_progress(
self, polled_block_number: BlockNumber, target_block: BlockNumber
) -> None:
"""Print a message if there are many blocks to be fetched, or if the
time in-between polls is high.
"""
now = time.monotonic()
blocks_until_target = target_block - polled_block_number
polled_... | def _log_sync_progress(self, to_block: BlockNumber) -> None:
"""Print a message if there are many blocks to be fetched, or if the
time in-between polls is high.
"""
now = datetime.now()
blocks_to_sync = to_block - self.last_log_block
elapsed = (now - self.last_log_time).total_seconds()
if b... | https://github.com/raiden-network/raiden/issues/6081 | Traceback (most recent call last):
File "/Users/ulo/Envs/raiden/lib/python3.7/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/Users/ulo/Envs/raiden/lib/python3.7/site-packages/urllib3/connectionpool.py", line 383, in _make_reques... | urllib3.exceptions.ReadTimeoutError |
def _synchronize_with_blockchain(self) -> None:
"""Prepares the alarm task callback and synchronize with the blockchain
since the last run.
Notes about setup order:
- The filters must be polled after the node state has been primed,
otherwise the state changes won't have effect.
- The sync... | def _synchronize_with_blockchain(self) -> None:
"""Prepares the alarm task callback and synchronize with the blockchain
since the last run.
Notes about setup order:
- The filters must be polled after the node state has been primed,
otherwise the state changes won't have effect.
- The sync... | https://github.com/raiden-network/raiden/issues/6081 | Traceback (most recent call last):
File "/Users/ulo/Envs/raiden/lib/python3.7/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/Users/ulo/Envs/raiden/lib/python3.7/site-packages/urllib3/connectionpool.py", line 383, in _make_reques... | urllib3.exceptions.ReadTimeoutError |
def _poll_until_target(self, target_block_number: BlockNumber) -> None:
"""Poll blockchain events up to `target_block_number`.
Multiple queries may be necessary on restarts, because the node may
have been offline for an extend period of time. During normal
operation, this must not happen, because in th... | def _poll_until_target(self, target_block_number: BlockNumber) -> None:
"""Poll blockchain events up to `target_block_number`.
Multiple queries may be necessary on restarts, because the node may
have been offline for an extend period of time. During normal
operation, this must not happen, because in th... | https://github.com/raiden-network/raiden/issues/6081 | Traceback (most recent call last):
File "/Users/ulo/Envs/raiden/lib/python3.7/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/Users/ulo/Envs/raiden/lib/python3.7/site-packages/urllib3/connectionpool.py", line 383, in _make_reques... | urllib3.exceptions.ReadTimeoutError |
def transfer_async(
self,
registry_address: TokenNetworkRegistryAddress,
token_address: TokenAddress,
amount: PaymentAmount,
target: TargetAddress,
identifier: PaymentID = None,
secret: Secret = None,
secrethash: SecretHash = None,
lock_timeout: BlockTimeout = None,
) -> "PaymentStat... | def transfer_async(
self,
registry_address: TokenNetworkRegistryAddress,
token_address: TokenAddress,
amount: PaymentAmount,
target: TargetAddress,
identifier: PaymentID = None,
secret: Secret = None,
secrethash: SecretHash = None,
lock_timeout: BlockTimeout = None,
) -> "PaymentStat... | https://github.com/raiden-network/raiden/issues/5922 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
File "site-packages/raiden/network/transport/matrix/transport.py", line 629, in _health_check_worker
File "site-packages/raiden/network/transport/matrix/transport.py", line 606, in immediate_health_check_for
Fil... | ValueError |
def initiate_payment(
self,
registry_address: TokenNetworkRegistryAddress,
token_address: TokenAddress,
target_address: TargetAddress,
amount: PaymentAmount,
identifier: PaymentID,
secret: Secret,
secret_hash: SecretHash,
lock_timeout: BlockTimeout,
) -> Response:
log.debug(
... | def initiate_payment(
self,
registry_address: TokenNetworkRegistryAddress,
token_address: TokenAddress,
target_address: TargetAddress,
amount: PaymentAmount,
identifier: PaymentID,
secret: Secret,
secret_hash: SecretHash,
lock_timeout: BlockTimeout,
) -> Response:
log.debug(
... | https://github.com/raiden-network/raiden/issues/5922 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
File "site-packages/raiden/network/transport/matrix/transport.py", line 629, in _health_check_worker
File "site-packages/raiden/network/transport/matrix/transport.py", line 606, in immediate_health_check_for
Fil... | ValueError |
def _maybe_create_room_for_address(self, address: Address) -> None:
if self._stop_event.ready():
return None
if self._get_room_for_address(address):
return None
assert self._raiden_service is not None, "_raiden_service not set"
# The rooms creation is asymmetric, only the node with th... | def _maybe_create_room_for_address(self, address: Address) -> None:
if self._stop_event.ready():
return None
if self._get_room_for_address(address):
return None
assert self._raiden_service is not None, "_raiden_service not set"
# The rooms creation is assymetric, only the node with th... | https://github.com/raiden-network/raiden/issues/5922 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
File "site-packages/raiden/network/transport/matrix/transport.py", line 629, in _health_check_worker
File "site-packages/raiden/network/transport/matrix/transport.py", line 606, in immediate_health_check_for
Fil... | ValueError |
def register_token(
self, registry_address: TokenNetworkRegistryAddress, token_address: TokenAddress
) -> Response:
if self.raiden_api.raiden.config.environment_type == Environment.PRODUCTION:
return api_error(
errors="Registering a new token is currently disabled in production mode",
... | def register_token(
self, registry_address: TokenNetworkRegistryAddress, token_address: TokenAddress
) -> Response:
if self.raiden_api.raiden.config.environment_type == Environment.PRODUCTION:
return api_error(
errors="Registering a new token is currently disabled in production mode",
... | https://github.com/raiden-network/raiden/issues/5779 | 2020-01-29 18:24:57.713109 [info ] 127.0.0.1 - - [2020-01-29 19:24:57] "PUT /api/v1/tokens/0x95B2d84De40a0121061b105E6B54016a49621B44 HTTP/1.1" 500 161 3.064439 [raiden.api.rest.pywsgi]
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
File "/home/raphael/c... | raiden.exceptions.BrokenPreconditionError |
def register_token(
self, registry_address: TokenNetworkRegistryAddress, token_address: TokenAddress
) -> Response:
if self.raiden_api.raiden.config.environment_type == Environment.PRODUCTION:
return api_error(
errors="Registering a new token is currently disabled in production mode",
... | def register_token(
self, registry_address: TokenNetworkRegistryAddress, token_address: TokenAddress
) -> Response:
if self.raiden_api.raiden.config.environment_type == Environment.PRODUCTION:
return api_error(
errors="Registering a new token is currently disabled in production mode",
... | https://github.com/raiden-network/raiden/issues/5779 | 2020-01-29 18:24:57.713109 [info ] 127.0.0.1 - - [2020-01-29 19:24:57] "PUT /api/v1/tokens/0x95B2d84De40a0121061b105E6B54016a49621B44 HTTP/1.1" 500 161 3.064439 [raiden.api.rest.pywsgi]
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
File "/home/raphael/c... | raiden.exceptions.BrokenPreconditionError |
def add_token(
self,
token_address: TokenAddress,
channel_participant_deposit_limit: TokenAmount,
token_network_deposit_limit: TokenAmount,
given_block_identifier: BlockSpecification,
) -> TokenNetworkAddress:
"""
Register token of `token_address` with the token network.
The limits apply... | def add_token(
self,
token_address: TokenAddress,
channel_participant_deposit_limit: TokenAmount,
token_network_deposit_limit: TokenAmount,
given_block_identifier: BlockSpecification,
) -> TokenNetworkAddress:
"""
Register token of `token_address` with the token network.
The limits apply... | https://github.com/raiden-network/raiden/issues/5779 | 2020-01-29 18:24:57.713109 [info ] 127.0.0.1 - - [2020-01-29 19:24:57] "PUT /api/v1/tokens/0x95B2d84De40a0121061b105E6B54016a49621B44 HTTP/1.1" 500 161 3.064439 [raiden.api.rest.pywsgi]
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
File "/home/raphael/c... | raiden.exceptions.BrokenPreconditionError |
def check_handler(self) -> None:
"""Check handler executed after the poll backend returns.
Note:
- For each of the watchers in the ready state there will be a callback,
which will do work related to the watcher (e.g. read from a socket).
This time must not be accounted for in the Idle timeout, ... | def check_handler(self) -> None:
"""Check handler executed after the poll backend returns.
Note:
- For each of the watchers in the ready state there will be a callback,
which will do work related to the watcher (e.g. read from a socket).
This time must not be accounted for in the Idle timeout, ... | https://github.com/raiden-network/raiden/issues/5738 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/raiden/utils/debugging.py", line 123, in check_handler
while curr_time - self.measurements_start > self.measurement_interval:
File "/usr/local/lib/python3.7/site-packages/raiden/utils/debugging.py", line 137, in measurements_start
return se... | IndexError |
def log(self) -> None:
if not self.measurements:
log.debug(
"Idle",
context_switches=self.context_switches,
measurements=self.measurements,
)
return
log.debug(
"Idle",
start=self.measurements_start,
context_switches=self.context... | def log(self) -> None:
log.debug(
"Idle",
start=self.measurements_start,
context_switches=self.context_switches,
idled=self.idled,
interval=self.running_interval,
idle_pct=self.idled_pct,
measurements=self.measurements,
)
| https://github.com/raiden-network/raiden/issues/5738 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/raiden/utils/debugging.py", line 123, in check_handler
while curr_time - self.measurements_start > self.measurement_interval:
File "/usr/local/lib/python3.7/site-packages/raiden/utils/debugging.py", line 137, in measurements_start
return se... | IndexError |
def _check_and_send(self) -> None:
"""Check and send all pending/queued messages that are not waiting on retry timeout
After composing the to-be-sent message, also message queue from messages that are not
present in the respective SendMessageEvent queue anymore
"""
if not self.transport.greenlet:
... | def _check_and_send(self) -> None:
"""Check and send all pending/queued messages that are not waiting on retry timeout
After composing the to-be-sent message, also message queue from messages that are not
present in the respective SendMessageEvent queue anymore
"""
if not self.transport.greenlet:
... | https://github.com/raiden-network/raiden/issues/3512 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
File "site-packages/raiden/network/transport/matrix.py", line 263, in _run
File "site-packages/raiden/network/transport/matrix.py", line 254, in _check_and_send
File "site-packages/raiden/network/transport/matri... | matrix_client.errors.MatrixRequestError |
def _broadcast_worker(self) -> None:
def _broadcast(room_name: str, serialized_message: str) -> None:
if not any(suffix in room_name for suffix in self._config.broadcast_rooms):
raise RuntimeError(
f'Broadcast called on non-public room "{room_name}". '
f"Known pub... | def _broadcast_worker(self) -> None:
def _broadcast(room_name: str, serialized_message: str) -> None:
if not any(suffix in room_name for suffix in self._config.broadcast_rooms):
raise RuntimeError(
f'Broadcast called on non-public room "{room_name}". '
f"Known pub... | https://github.com/raiden-network/raiden/issues/3512 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
File "site-packages/raiden/network/transport/matrix.py", line 263, in _run
File "site-packages/raiden/network/transport/matrix.py", line 254, in _check_and_send
File "site-packages/raiden/network/transport/matri... | matrix_client.errors.MatrixRequestError |
def _check_and_send(self) -> None:
"""Check and send all pending/queued messages that are not waiting on retry timeout
After composing the to-be-sent message, also message queue from messages that are not
present in the respective SendMessageEvent queue anymore
"""
if not self.transport.greenlet:
... | def _check_and_send(self) -> None:
"""Check and send all pending/queued messages that are not waiting on retry timeout
After composing the to-be-sent message, also message queue from messages that are not
present in the respective SendMessageEvent queue anymore
"""
if not self.transport.greenlet:
... | https://github.com/raiden-network/raiden/issues/3512 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
File "site-packages/raiden/network/transport/matrix.py", line 263, in _run
File "site-packages/raiden/network/transport/matrix.py", line 254, in _check_and_send
File "site-packages/raiden/network/transport/matri... | matrix_client.errors.MatrixRequestError |
def start( # type: ignore
self,
raiden_service: "RaidenService",
whitelist: List[Address],
prev_auth_data: Optional[str],
) -> None:
if not self._stop_event.ready():
raise RuntimeError(f"{self!r} already started")
self.log.debug("Matrix starting")
self._stop_event.clear()
self._... | def start( # type: ignore
self,
raiden_service: "RaidenService",
whitelist: List[Address],
prev_auth_data: Optional[str],
) -> None:
if not self._stop_event.ready():
raise RuntimeError(f"{self!r} already started")
self.log.debug("Matrix starting")
self._stop_event.clear()
self._... | https://github.com/raiden-network/raiden/issues/5276 | {
"task": "<TransferTask: {'from': 0, 'to': 1, 'amount': 500000000000000000, 'expected_http_status': 200}>",
"event": "Task errored",
"logger": "scenario_player.tasks.base",
"level": "error",
"timestamp": "2019-11-12 01:58:24.322286",
"exception": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/s... | nurllib3.exceptions.ProtocolError |
def _handle_invite(self, room_id: _RoomID, state: dict) -> None:
"""Handle an invite request.
Always join a room, even if the partner is not whitelisted. That was
previously done to prevent a malicious node from inviting and spamming
the user. However, there are cases where nodes trying to create rooms... | def _handle_invite(self, room_id: _RoomID, state: dict) -> None:
"""Handle an invite request.
Always join a room, even if the partner is not whitelisted. That was
previously done to prevent a malicious node from inviting and spamming
the user. However, there are cases where nodes trying to create rooms... | https://github.com/raiden-network/raiden/issues/5276 | {
"task": "<TransferTask: {'from': 0, 'to': 1, 'amount': 500000000000000000, 'expected_http_status': 200}>",
"event": "Task errored",
"logger": "scenario_player.tasks.base",
"level": "error",
"timestamp": "2019-11-12 01:58:24.322286",
"exception": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/s... | nurllib3.exceptions.ProtocolError |
def _handle_message(self, room: Room, event: Dict[str, Any]) -> bool:
"""Handle text messages sent to listening rooms"""
if self._stop_event.ready():
return False
is_valid_type = (
event["type"] == "m.room.message" and event["content"]["msgtype"] == "m.text"
)
if not is_valid_type:
... | def _handle_message(self, room: Room, event: Dict[str, Any]) -> bool:
"""Handle text messages sent to listening rooms"""
if self._stop_event.ready():
return False
is_valid_type = (
event["type"] == "m.room.message" and event["content"]["msgtype"] == "m.text"
)
if not is_valid_type:
... | https://github.com/raiden-network/raiden/issues/5276 | {
"task": "<TransferTask: {'from': 0, 'to': 1, 'amount': 500000000000000000, 'expected_http_status': 200}>",
"event": "Task errored",
"logger": "scenario_player.tasks.base",
"level": "error",
"timestamp": "2019-11-12 01:58:24.322286",
"exception": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/s... | nurllib3.exceptions.ProtocolError |
def _is_broadcast_room(self, room: Room) -> bool:
room_aliases = set(room.aliases)
if room.canonical_alias:
room_aliases.add(room.canonical_alias)
return any(
suffix in room_alias
for suffix in self._config.broadcast_rooms
for room_alias in room.aliases
)
| def _is_broadcast_room(self, room: Room) -> bool:
return any(
suffix in room_alias
for suffix in self._config.broadcast_rooms
for room_alias in room.aliases
)
| https://github.com/raiden-network/raiden/issues/5276 | {
"task": "<TransferTask: {'from': 0, 'to': 1, 'amount': 500000000000000000, 'expected_http_status': 200}>",
"event": "Task errored",
"logger": "scenario_player.tasks.base",
"level": "error",
"timestamp": "2019-11-12 01:58:24.322286",
"exception": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.7/s... | nurllib3.exceptions.ProtocolError |
def get_transfer_from_task(
secrethash: SecretHash, transfer_task: TransferTask
) -> Optional[LockedTransferType]:
transfer: LockedTransferType
if isinstance(transfer_task, InitiatorTask):
if secrethash in transfer_task.manager_state.initiator_transfers:
transfer = transfer_task.manager_... | def get_transfer_from_task(
secrethash: SecretHash, transfer_task: TransferTask
) -> Tuple[LockedTransferType, str]:
role = views.role_from_transfer_task(transfer_task)
transfer: LockedTransferType
if isinstance(transfer_task, InitiatorTask):
transfer = transfer_task.manager_state.initiator_tran... | https://github.com/raiden-network/raiden/issues/5480 | 2019-12-11 10:18:23.082312 [error ] UnlockFailed! [raiden.raiden_event_handler] node=0x65A148DE5d57279EB9FdFe8c11cF9A43E599a537 reason=route was canceled secrethash=0xa045514824f5fd112d2f42a67e26ec965dce904a2edd90dfdda77fc882339275
2019-12-11 10:18:23.083932 [error ] Error processing request ... | KeyError |
def transfer_tasks_view(
transfer_tasks: Dict[SecretHash, TransferTask],
token_address: TokenAddress = None,
channel_id: ChannelID = None,
) -> List[Dict[str, Any]]:
view = list()
for secrethash, transfer_task in transfer_tasks.items():
transfer = get_transfer_from_task(secrethash, transfer... | def transfer_tasks_view(
transfer_tasks: Dict[SecretHash, TransferTask],
token_address: TokenAddress = None,
channel_id: ChannelID = None,
) -> List[Dict[str, Any]]:
view = list()
for secrethash, transfer_task in transfer_tasks.items():
transfer, role = get_transfer_from_task(secrethash, tr... | https://github.com/raiden-network/raiden/issues/5480 | 2019-12-11 10:18:23.082312 [error ] UnlockFailed! [raiden.raiden_event_handler] node=0x65A148DE5d57279EB9FdFe8c11cF9A43E599a537 reason=route was canceled secrethash=0xa045514824f5fd112d2f42a67e26ec965dce904a2edd90dfdda77fc882339275
2019-12-11 10:18:23.083932 [error ] Error processing request ... | KeyError |
def _deserialize(self, value, attr, data, **kwargs): # pylint: disable=unused-argument
if not is_0x_prefixed(value):
self.fail("missing_prefix")
if not is_checksum_address(value):
self.fail("invalid_checksum")
try:
value = to_canonical_address(value)
except ValueError:
... | def _deserialize(self, value, attr, data, **kwargs): # pylint: disable=unused-argument
if not is_0x_prefixed(value):
self.fail("missing_prefix")
if not is_checksum_address(value):
self.fail("invalid_checksum")
try:
value = to_canonical_address(value)
except ValueError:
... | https://github.com/raiden-network/raiden/issues/5209 | 2019-11-04 14:09:33.074227 [critical ] Unhandled exception when processing endpoint request [raiden.api.rest] node=0xf5eAE6E37B2873D32E11C88E310956D3C9c712f0
Traceback (most recent call last):
File "flask/app.py", line 1832, in full_dispatch_request
File "flask/app.py", line 1818, in dispatch_request
File "flask_restfu... | ValueError |
def __init__(
self,
stats: Stats,
traj_logger: TrajLogger,
rng: np.random.RandomState,
instances: typing.List[str],
instance_specifics: typing.Mapping[str, np.ndarray] = None,
cutoff: typing.Optional[float] = None,
deterministic: bool = False,
initial_budget: typing.Optional[float] =... | def __init__(
self,
stats: Stats,
traj_logger: TrajLogger,
rng: np.random.RandomState,
instances: typing.List[str],
instance_specifics: typing.Mapping[str, np.ndarray] = None,
cutoff: typing.Optional[float] = None,
deterministic: bool = False,
initial_budget: typing.Optional[float] =... | https://github.com/automl/SMAC3/issues/695 | INFO:smac.facade.smac_bohb_facade.BOHB4HPO:Estimated cost of incumbent: 2147483647.000000
Traceback (most recent call last):
File "BOHB4HPO_sgd_instances.py", line 79, in <module>
main()
File "BOHB4HPO_sgd_instances.py", line 75, in main
incumbent = smac.optimize()
File "/home/eggenspk/Work/git/SMAC3/smac/facade/smac_a... | AttributeError |
def process_results(
self,
run_info: RunInfo,
incumbent: typing.Optional[Configuration],
run_history: RunHistory,
time_bound: float,
result: RunValue,
log_traj: bool = True,
) -> typing.Tuple[Configuration, float]:
"""
The intensifier stage will be updated based on the results/status... | def process_results(
self,
run_info: RunInfo,
incumbent: typing.Optional[Configuration],
run_history: RunHistory,
time_bound: float,
result: RunValue,
log_traj: bool = True,
) -> typing.Tuple[Configuration, float]:
"""
The intensifier stage will be updated based on the results/status... | https://github.com/automl/SMAC3/issues/695 | INFO:smac.facade.smac_bohb_facade.BOHB4HPO:Estimated cost of incumbent: 2147483647.000000
Traceback (most recent call last):
File "BOHB4HPO_sgd_instances.py", line 79, in <module>
main()
File "BOHB4HPO_sgd_instances.py", line 75, in main
incumbent = smac.optimize()
File "/home/eggenspk/Work/git/SMAC3/smac/facade/smac_a... | AttributeError |
def get_next_run(
self,
challengers: typing.Optional[typing.List[Configuration]],
incumbent: Configuration,
chooser: typing.Optional[EPMChooser],
run_history: RunHistory,
repeat_configs: bool = True,
num_workers: int = 1,
) -> typing.Tuple[RunInfoIntent, RunInfo]:
"""
Selects which c... | def get_next_run(
self,
challengers: typing.Optional[typing.List[Configuration]],
incumbent: Configuration,
chooser: typing.Optional[EPMChooser],
run_history: RunHistory,
repeat_configs: bool = True,
num_workers: int = 1,
) -> typing.Tuple[RunInfoIntent, RunInfo]:
"""
Selects which c... | https://github.com/automl/SMAC3/issues/695 | INFO:smac.facade.smac_bohb_facade.BOHB4HPO:Estimated cost of incumbent: 2147483647.000000
Traceback (most recent call last):
File "BOHB4HPO_sgd_instances.py", line 79, in <module>
main()
File "BOHB4HPO_sgd_instances.py", line 75, in main
incumbent = smac.optimize()
File "/home/eggenspk/Work/git/SMAC3/smac/facade/smac_a... | AttributeError |
def _update_stage(self, run_history: RunHistory) -> None:
"""
Update tracking information for a new stage/iteration and update statistics.
This method is called to initialize stage variables and after all configurations
of a successive halving stage are completed.
Parameters
----------
run... | def _update_stage(self, run_history: RunHistory) -> None:
"""
Update tracking information for a new stage/iteration and update statistics.
This method is called to initialize stage variables and after all configurations
of a successive halving stage are completed.
Parameters
----------
run... | https://github.com/automl/SMAC3/issues/695 | INFO:smac.facade.smac_bohb_facade.BOHB4HPO:Estimated cost of incumbent: 2147483647.000000
Traceback (most recent call last):
File "BOHB4HPO_sgd_instances.py", line 79, in <module>
main()
File "BOHB4HPO_sgd_instances.py", line 75, in main
incumbent = smac.optimize()
File "/home/eggenspk/Work/git/SMAC3/smac/facade/smac_a... | AttributeError |
def _top_k(
self, configs: typing.List[Configuration], run_history: RunHistory, k: int
) -> typing.List[Configuration]:
"""
Selects the top 'k' configurations from the given list based on their performance.
This retrieves the performance for each configuration from the runhistory and checks
that th... | def _top_k(
self, configs: typing.List[Configuration], run_history: RunHistory, k: int
) -> typing.List[Configuration]:
"""
Selects the top 'k' configurations from the given list based on their performance.
This retrieves the performance for each configuration from the runhistory and checks
that th... | https://github.com/automl/SMAC3/issues/695 | INFO:smac.facade.smac_bohb_facade.BOHB4HPO:Estimated cost of incumbent: 2147483647.000000
Traceback (most recent call last):
File "BOHB4HPO_sgd_instances.py", line 79, in <module>
main()
File "BOHB4HPO_sgd_instances.py", line 75, in main
incumbent = smac.optimize()
File "/home/eggenspk/Work/git/SMAC3/smac/facade/smac_a... | AttributeError |
def _launched_all_configs_for_current_stage(self, run_history: RunHistory) -> bool:
"""
This procedure queries if the addition of currently finished configs
and running configs are sufficient for the current stage.
If more configs are needed, it will return False.
Parameters
----------
run_h... | def _launched_all_configs_for_current_stage(self, run_history: RunHistory) -> bool:
"""
This procedure queries if the addition of currently finished configs
and running configs are sufficient for the current stage.
If more configs are needed, it will return False.
Parameters
----------
run_h... | https://github.com/automl/SMAC3/issues/695 | INFO:smac.facade.smac_bohb_facade.BOHB4HPO:Estimated cost of incumbent: 2147483647.000000
Traceback (most recent call last):
File "BOHB4HPO_sgd_instances.py", line 79, in <module>
main()
File "BOHB4HPO_sgd_instances.py", line 75, in main
incumbent = smac.optimize()
File "/home/eggenspk/Work/git/SMAC3/smac/facade/smac_a... | AttributeError |
def _get_runs(
self,
configs: Union[str, typing.List[Configuration]],
insts: Union[str, typing.List[str]],
repetitions: int = 1,
runhistory: RunHistory = None,
) -> typing.Tuple[typing.List[_Run], RunHistory]:
"""
Generate list of SMAC-TAE runs to be executed. This means
combinations of ... | def _get_runs(
self,
configs: Union[str, typing.List[Configuration]],
insts: Union[str, typing.List[str]],
repetitions: int = 1,
runhistory: RunHistory = None,
) -> typing.Tuple[typing.List[_Run], RunHistory]:
"""
Generate list of SMAC-TAE runs to be executed. This means
combinations of ... | https://github.com/automl/SMAC3/issues/695 | INFO:smac.facade.smac_bohb_facade.BOHB4HPO:Estimated cost of incumbent: 2147483647.000000
Traceback (most recent call last):
File "BOHB4HPO_sgd_instances.py", line 79, in <module>
main()
File "BOHB4HPO_sgd_instances.py", line 75, in main
incumbent = smac.optimize()
File "/home/eggenspk/Work/git/SMAC3/smac/facade/smac_a... | AttributeError |
def _transform_arguments(self):
self.n_features = len(self.feature_dict)
self.feature_array = None
if self.overall_obj[:3] in ["PAR", "par"]:
par_str = self.overall_obj[3:]
elif self.overall_obj[:4] in ["mean", "MEAN"]:
par_str = self.overall_obj[4:]
# Check for par-value as in "par... | def _transform_arguments(self):
self.n_features = len(self.feature_dict)
self.feature_array = None
if self.overall_obj[:3] in ["PAR", "par"]:
self.par_factor = int(self.overall_obj[3:])
elif self.overall_obj[:4] in ["mean", "MEAN"]:
self.par_factor = int(self.overall_obj[4:])
else:
... | https://github.com/automl/SMAC3/issues/165 | Traceback (most recent call last):
File "/home/lindauer/git/SMAC3/scripts/smac", line 20, in <module>
smac.main_cli()
File "/home/lindauer/git/SMAC3/smac/smac_cli.py", line 48, in main_cli
scen = Scenario(args_.scenario_file, misc_args)
File "/home/lindauer/git/SMAC3/smac/scenario/scenario.py", line 94, in __init__
sel... | ValueError |
def run(
self,
config,
instance=None,
cutoff=None,
memory_limit=None,
seed=12345,
instance_specific="0",
):
"""
runs target algorithm <self.ta> with configuration <config> on
instance <instance> with instance specifics <specifics>
for at most <cutoff> seconds and random seed ... | def run(
self,
config,
instance=None,
cutoff=None,
memory_limit=None,
seed=12345,
instance_specific="0",
):
"""
runs target algorithm <self.ta> with configuration <config> on
instance <instance> with instance specifics <specifics>
for at most <cutoff> seconds and random seed ... | https://github.com/automl/SMAC3/issues/56 | Traceback (most recent call last):
File "/home/lindauer/git/SMAC3/scripts/smac", line 20, in <module>
smac.main_cli()
File "/home/lindauer/git/SMAC3/smac/smac_cli.py", line 47, in main_cli
smbo.run(max_iters=args_.max_iterations)
File "/home/lindauer/git/SMAC3/smac/smbo/smbo.py", line 282, in run
self.incumbent = self.... | AttributeError |
def __init__(self, ta, stats, run_obj="runtime", par_factor=1):
"""
Constructor
Parameters
----------
ta : list
target algorithm command line as list of arguments
stats: Stats()
stats object to collect statistics about runtime and so on
run_obj: str
... | def __init__(self, ta, stats, run_obj="runtime"):
"""
Constructor
Parameters
----------
ta : list
target algorithm command line as list of arguments
stats: Stats()
stats object to collect statistics about runtime and so on
run_obj: str
run ob... | https://github.com/automl/SMAC3/issues/56 | Traceback (most recent call last):
File "/home/lindauer/git/SMAC3/scripts/smac", line 20, in <module>
smac.main_cli()
File "/home/lindauer/git/SMAC3/smac/smac_cli.py", line 47, in main_cli
smbo.run(max_iters=args_.max_iterations)
File "/home/lindauer/git/SMAC3/smac/smbo/smbo.py", line 282, in run
self.incumbent = self.... | AttributeError |
def start(
self,
config,
instance,
cutoff=None,
memory_limit=None,
seed=12345,
instance_specific="0",
):
"""
wrapper function for ExecuteTARun.run() to check configuration budget before the runs
and to update stats after run
Parameters
----------
config : diction... | def start(
self,
config,
instance,
cutoff=None,
memory_limit=None,
seed=12345,
instance_specific="0",
):
"""
wrapper function for ExecuteTARun.run() to check configuration budget before the runs
and to update stats after run
Parameters
----------
config : diction... | https://github.com/automl/SMAC3/issues/56 | Traceback (most recent call last):
File "/home/lindauer/git/SMAC3/scripts/smac", line 20, in <module>
smac.main_cli()
File "/home/lindauer/git/SMAC3/smac/smac_cli.py", line 47, in main_cli
smbo.run(max_iters=args_.max_iterations)
File "/home/lindauer/git/SMAC3/smac/smbo/smbo.py", line 282, in run
self.incumbent = self.... | AttributeError |
def run(self, config, instance=None, cutoff=None, seed=12345, instance_specific="0"):
"""
runs target algorithm <self.ta> with configuration <config> on
instance <instance> with instance specifics <specifics>
for at most <cutoff> seconds and random seed <seed>
Parameters
----------
conf... | def run(self, config, instance=None, cutoff=None, seed=12345, instance_specific="0"):
"""
runs target algorithm <self.ta> with configuration <config> on
instance <instance> with instance specifics <specifics>
for at most <cutoff> seconds and random seed <seed>
Parameters
----------
conf... | https://github.com/automl/SMAC3/issues/56 | Traceback (most recent call last):
File "/home/lindauer/git/SMAC3/scripts/smac", line 20, in <module>
smac.main_cli()
File "/home/lindauer/git/SMAC3/smac/smac_cli.py", line 47, in main_cli
smbo.run(max_iters=args_.max_iterations)
File "/home/lindauer/git/SMAC3/smac/smbo/smbo.py", line 282, in run
self.incumbent = self.... | AttributeError |
def run(self, config, instance=None, cutoff=None, seed=12345, instance_specific="0"):
"""
runs target algorithm <self.ta> with configuration <config> on
instance <instance> with instance specifics <specifics>
for at most <cutoff> seconds and random seed <seed>
Parameters
----------
conf... | def run(self, config, instance=None, cutoff=None, seed=12345, instance_specific="0"):
"""
runs target algorithm <self.ta> with configuration <config> on
instance <instance> with instance specifics <specifics>
for at most <cutoff> seconds and random seed <seed>
Parameters
----------
conf... | https://github.com/automl/SMAC3/issues/56 | Traceback (most recent call last):
File "/home/lindauer/git/SMAC3/scripts/smac", line 20, in <module>
smac.main_cli()
File "/home/lindauer/git/SMAC3/smac/smac_cli.py", line 47, in main_cli
smbo.run(max_iters=args_.max_iterations)
File "/home/lindauer/git/SMAC3/smac/smbo/smbo.py", line 282, in run
self.incumbent = self.... | AttributeError |
def add(
self, config, cost, time, status, instance_id=None, seed=None, additional_info=None
):
"""
adds a data of a new target algorithm (TA) run;
it will update data if the same key values are used
(config, instance_id, seed)
Attributes
----------
config : dict (or other type -- d... | def add(
self, config, cost, time, status, instance_id=None, seed=None, additional_info=None
):
"""
adds a data of a new target algorithm (TA) run;
it will update data if the same key values are used
(config, instance_id, seed)
Attributes
----------
config : dict (or other type -- d... | https://github.com/automl/SMAC3/issues/17 | KeyError Traceback (most recent call last)
<ipython-input-10-a9f6024df581> in <module>()
38 smbo = SMBO(scenario=scenario, rng=1, tae_runner=taf)
39 Stats.scenario = scenario
---> 40 smbo.run(max_iters=100)
41
42 print("Final Incumbent: %s" % (smbo.incumbent))
/home/feurerm/virtualenvs... | KeyError |
def update_cost(self, config, cost):
config_id = self.config_ids[config]
self.cost_per_config[config_id] = cost
| def update_cost(self, config, cost):
config_id = self.config_ids[config.__repr__()]
self.cost_per_config[config_id] = cost
| https://github.com/automl/SMAC3/issues/17 | KeyError Traceback (most recent call last)
<ipython-input-10-a9f6024df581> in <module>()
38 smbo = SMBO(scenario=scenario, rng=1, tae_runner=taf)
39 Stats.scenario = scenario
---> 40 smbo.run(max_iters=100)
41
42 print("Final Incumbent: %s" % (smbo.incumbent))
/home/feurerm/virtualenvs... | KeyError |
def get_cost(self, config):
config_id = self.config_ids[config]
return self.cost_per_config[config_id]
| def get_cost(self, config):
config_id = self.config_ids[config.__repr__()]
return self.cost_per_config[config_id]
| https://github.com/automl/SMAC3/issues/17 | KeyError Traceback (most recent call last)
<ipython-input-10-a9f6024df581> in <module>()
38 smbo = SMBO(scenario=scenario, rng=1, tae_runner=taf)
39 Stats.scenario = scenario
---> 40 smbo.run(max_iters=100)
41
42 print("Final Incumbent: %s" % (smbo.incumbent))
/home/feurerm/virtualenvs... | KeyError |
def save_json(self, fn="runhistory.json"):
"""
saves runhistory on disk
Parameters
----------
fn : str
file name
"""
configs = {id_: conf.get_dictionary() for id_, conf in self.ids_config.items()}
data = [
(
[
int(k.config_id),
... | def save_json(self, fn="runhistory.json"):
"""
saves runhistory on disk
Parameters
----------
fn : str
file name
"""
id_vec = dict(
[(id_, conf.get_array().tolist()) for id_, conf in self.ids_config.items()]
)
data = [
(
[
int(k.... | https://github.com/automl/SMAC3/issues/17 | KeyError Traceback (most recent call last)
<ipython-input-10-a9f6024df581> in <module>()
38 smbo = SMBO(scenario=scenario, rng=1, tae_runner=taf)
39 Stats.scenario = scenario
---> 40 smbo.run(max_iters=100)
41
42 print("Final Incumbent: %s" % (smbo.incumbent))
/home/feurerm/virtualenvs... | KeyError |
def load_json(self, fn, cs):
"""Load and runhistory in json representation from disk.
Overwrites current runthistory!
Parameters
----------
fn : str
file name to load from
cs : ConfigSpace
instance of configuration space
"""
with open(fn) as fp:
all_data = json... | def load_json(self, fn, cs):
"""Load and runhistory in json representation from disk.
Overwrites current runthistory!
Parameters
----------
fn : str
file name to load from
cs : ConfigSpace
instance of configuration space
"""
with open(fn) as fp:
all_data = json... | https://github.com/automl/SMAC3/issues/17 | KeyError Traceback (most recent call last)
<ipython-input-10-a9f6024df581> in <module>()
38 smbo = SMBO(scenario=scenario, rng=1, tae_runner=taf)
39 Stats.scenario = scenario
---> 40 smbo.run(max_iters=100)
41
42 print("Final Incumbent: %s" % (smbo.incumbent))
/home/feurerm/virtualenvs... | KeyError |
def _runtime(config, run_history, instance_seed_pairs=None):
"""Return array of all runtimes for the given config for further calculations.
Parameters
----------
config : Configuration
configuration to calculate objective for
run_history : RunHistory
RunHistory object from which the... | def _runtime(config, run_history, instance_seed_pairs=None):
"""Return array of all runtimes for the given config for further calculations.
Parameters
----------
config : Configuration
configuration to calculate objective for
run_history : RunHistory
RunHistory object from which the... | https://github.com/automl/SMAC3/issues/17 | KeyError Traceback (most recent call last)
<ipython-input-10-a9f6024df581> in <module>()
38 smbo = SMBO(scenario=scenario, rng=1, tae_runner=taf)
39 Stats.scenario = scenario
---> 40 smbo.run(max_iters=100)
41
42 print("Final Incumbent: %s" % (smbo.incumbent))
/home/feurerm/virtualenvs... | KeyError |
def _cost(config, run_history, instance_seed_pairs=None):
"""Return array of all costs for the given config for further calculations.
Parameters
----------
config : Configuration
configuration to calculate objective for
run_history : RunHistory
RunHistory object from which the objec... | def _cost(config, run_history, instance_seed_pairs=None):
"""Return array of all costs for the given config for further calculations.
Parameters
----------
config : Configuration
configuration to calculate objective for
run_history : RunHistory
RunHistory object from which the objec... | https://github.com/automl/SMAC3/issues/17 | KeyError Traceback (most recent call last)
<ipython-input-10-a9f6024df581> in <module>()
38 smbo = SMBO(scenario=scenario, rng=1, tae_runner=taf)
39 Stats.scenario = scenario
---> 40 smbo.run(max_iters=100)
41
42 print("Final Incumbent: %s" % (smbo.incumbent))
/home/feurerm/virtualenvs... | KeyError |
def _add_in_old_format(self, train_perf, incumbent_id, incumbent):
"""
adds entries to old SMAC2-like trajectory file
Parameters
----------
train_perf: float
estimated performance on training (sub)set
incumbent_id: int
id of incumbent
incumbent: Configuration()
curre... | def _add_in_old_format(self, train_perf, incumbent_id, incumbent):
"""
adds entries to old SMAC2-like trajectory file
Parameters
----------
train_perf: float
estimated performance on training (sub)set
incumbent_id: int
id of incumbent
incumbent: Configuration()
curre... | https://github.com/automl/SMAC3/issues/17 | KeyError Traceback (most recent call last)
<ipython-input-10-a9f6024df581> in <module>()
38 smbo = SMBO(scenario=scenario, rng=1, tae_runner=taf)
39 Stats.scenario = scenario
---> 40 smbo.run(max_iters=100)
41
42 print("Final Incumbent: %s" % (smbo.incumbent))
/home/feurerm/virtualenvs... | KeyError |
def _add_in_aclib_format(self, train_perf, incumbent_id, incumbent):
"""
adds entries to AClib2-like trajectory file
Parameters
----------
train_perf: float
estimated performance on training (sub)set
incumbent_id: int
id of incumbent
incumbent: Configuration()
curren... | def _add_in_aclib_format(self, train_perf, incumbent_id, incumbent):
"""
adds entries to AClib2-like trajectory file
Parameters
----------
train_perf: float
estimated performance on training (sub)set
incumbent_id: int
id of incumbent
incumbent: Configuration()
curren... | https://github.com/automl/SMAC3/issues/17 | KeyError Traceback (most recent call last)
<ipython-input-10-a9f6024df581> in <module>()
38 smbo = SMBO(scenario=scenario, rng=1, tae_runner=taf)
39 Stats.scenario = scenario
---> 40 smbo.run(max_iters=100)
41
42 print("Final Incumbent: %s" % (smbo.incumbent))
/home/feurerm/virtualenvs... | KeyError |
def _update_package_cache(self):
if (
not self.package_caching
or not config.cache_packages_path
or not config.write_package_cache
or not self.success
):
return
# see PackageCache.add_variants_async
if not system.is_production_rez_install:
return
pkg... | def _update_package_cache(self):
if (
not self.package_caching
or not config.cache_packages_path
or not config.write_package_cache
):
return
# see PackageCache.add_variants_async
if not system.is_production_rez_install:
return
pkgcache = PackageCache(config.... | https://github.com/nerdvegas/rez/issues/905 | Traceback (most recent call last):
File "/library/rez/user_packages/rez-pre-release/rez/2.61.0.pr/os-CentOS-7/python-2.7/bin/rez/rez", line 8, in <module>
sys.exit(run_rez())
File "/library/rez/user_packages/rez-pre-release/rez/2.61.0.pr/os-CentOS-7/python-2.7/lib/python2.7/site-packages/rez/cli/_entry_points.py", line... | TypeError |
def get_function(self):
def equal_scalar(vals):
return pd.Series(vals) == self.value
return equal_scalar
| def get_function(self):
def equal_scalar(vals):
# case to correct pandas type for comparison
return pd.Series(vals).astype(pd.Series([self.value]).dtype) == self.value
return equal_scalar
| https://github.com/alteryx/featuretools/issues/496 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-8bb8b3216cc3> in <module>
6 target_entity=MONTH_ENTITY_NAME,
7 features_only=not RUN_DFS,
----> 8 **dfs_definition
9 )
10
c:\users\jan.hyn... | ValueError |
def equal_scalar(vals):
return pd.Series(vals) == self.value
| def equal_scalar(vals):
# case to correct pandas type for comparison
return pd.Series(vals).astype(pd.Series([self.value]).dtype) == self.value
| https://github.com/alteryx/featuretools/issues/496 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-8bb8b3216cc3> in <module>
6 target_entity=MONTH_ENTITY_NAME,
7 features_only=not RUN_DFS,
----> 8 **dfs_definition
9 )
10
c:\users\jan.hyn... | ValueError |
def get_function(self):
def not_equal_scalar(vals):
return pd.Series(vals) != self.value
return not_equal_scalar
| def get_function(self):
def not_equal_scalar(vals):
# case to correct pandas type for comparison
return pd.Series(vals).astype(pd.Series([self.value]).dtype) != self.value
return not_equal_scalar
| https://github.com/alteryx/featuretools/issues/496 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-8bb8b3216cc3> in <module>
6 target_entity=MONTH_ENTITY_NAME,
7 features_only=not RUN_DFS,
----> 8 **dfs_definition
9 )
10
c:\users\jan.hyn... | ValueError |
def not_equal_scalar(vals):
return pd.Series(vals) != self.value
| def not_equal_scalar(vals):
# case to correct pandas type for comparison
return pd.Series(vals).astype(pd.Series([self.value]).dtype) != self.value
| https://github.com/alteryx/featuretools/issues/496 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-8bb8b3216cc3> in <module>
6 target_entity=MONTH_ENTITY_NAME,
7 features_only=not RUN_DFS,
----> 8 **dfs_definition
9 )
10
c:\users\jan.hyn... | ValueError |
def load_resource(self, item):
resource = super(ConfigTable, self).load_resource(item)
sse_info = resource.pop("Ssedescription", None)
if sse_info is None:
return resource
resource["SSEDescription"] = sse_info
for k, r in (("KmsmasterKeyArn", "KMSMasterKeyArn"), ("Ssetype", "SSEType")):
... | def load_resource(self, item):
resource = super(ConfigTable, self).load_resource(item)
resource["CreationDateTime"] = datetime.fromtimestamp(
resource["CreationDateTime"] / 1000.0
)
if (
"BillingModeSummary" in resource
and "LastUpdateToPayPerRequestDateTime" in resource["Billing... | https://github.com/cloud-custodian/cloud-custodian/issues/6470 | [ERROR] TypeError: unsupported operand type(s) for /: 'datetime.datetime' and 'float'
Traceback (most recent call last):
File "/var/task/custodian_policy.py", line 4, in run
return handler.dispatch_event(event, context)
File "/var/task/c7n/handler.py", line 165, in dispatch_event
p.push(event, context)
File "/var/task/... | TypeError |
def run(self, event, lambda_context):
cfg_event = json.loads(event["invokingEvent"])
resource_type = self.policy.resource_manager.resource_type.cfn_type
resource_id = self.policy.resource_manager.resource_type.id
client = self._get_client()
token = event.get("resultToken")
matched_resources = s... | def run(self, event, lambda_context):
cfg_event = json.loads(event["invokingEvent"])
resource_type = self.policy.resource_manager.resource_type.cfn_type
resource_id = self.policy.resource_manager.resource_type.id
client = self._get_client()
matched_resources = set()
for r in PullMode.run(self):... | https://github.com/cloud-custodian/cloud-custodian/issues/6457 | [ERROR] 2021-02-16T16:23:00.481Z befa31da-95e0-41c6-b47c-c7eb9c0338d7 error during policy execution
Traceback (most recent call last):
File "/var/task/c7n/handler.py", line 165, in dispatch_event
p.push(event, context)
File "/var/task/c7n/policy.py", line 1140, in push
return mode.run(event, lambda_ctx)
File "/var/task... | botocore.errorfactory.ValidationException |
def get_mailer_requirements():
deps = [
"azure-keyvault",
"azure-storage-queue",
"azure-storage-blob",
"sendgrid",
] + list(CORE_DEPS)
requirements = generate_requirements(
deps,
ignore=["boto3", "botocore", "pywin32"],
exclude=["pkg_resources"],
... | def get_mailer_requirements():
deps = [
"azure-keyvault",
"azure-storage-queue",
"azure-storage-blob",
"sendgrid",
] + list(CORE_DEPS)
requirements = generate_requirements(
deps, ignore=["boto3", "botocore", "pywin32"], include_self=True
)
return requirements
| https://github.com/cloud-custodian/cloud-custodian/issues/6012 | root@8b79684d85a3:/# c7n-mailer
Traceback (most recent call last):
File "/usr/local/bin/c7n-mailer", line 5, in <module>
from c7n_mailer.cli import main
File "/usr/local/lib/python3.8/dist-packages/c7n_mailer/cli.py", line 9, in <module>
from c7n_mailer import deploy, utils
File "/usr/local/lib/python3.8/dist-packages/... | ModuleNotFoundError |
def process(self, resources):
client = local_session(self.manager.session_factory).client("iam")
age = self.data.get("age")
disable = self.data.get("disable")
matched = self.data.get("matched")
if age:
threshold_date = datetime.datetime.now(tz=tzutc()) - timedelta(age)
for r in resour... | def process(self, resources):
client = local_session(self.manager.session_factory).client("iam")
age = self.data.get("age")
disable = self.data.get("disable")
matched = self.data.get("matched")
if age:
threshold_date = datetime.datetime.now(tz=tzutc()) - timedelta(age)
for r in resour... | https://github.com/cloud-custodian/cloud-custodian/issues/6419 | [ERROR] 2021-01-29T09:48:39.544Z 9911f614-77a7-465b-8544-743b132ff816 Error while executing policyTraceback (most recent call last): File "/var/task/c7n/policy.py", line 316, in run results = a.process(resources) File "/var/task/c7n/resources/iam.py", line 2211, in process assert m_keys, "shouldn't have gotten ... | AssertionError |
def process(self, resources, event):
if event is None:
return
user_info = self.get_tag_value(event)
# will skip writing their UserName tag and not overwrite pre-existing values
if not self.data.get("update", False):
untagged_resources = []
# iterating over all the resources the... | def process(self, resources, event):
if event is None:
return
event = event["detail"]
utype = event["userIdentity"]["type"]
if utype not in self.data.get(
"user-type", ["AssumedRole", "IAMUser", "FederatedUser"]
):
return
user = None
if utype == "IAMUser":
us... | https://github.com/cloud-custodian/cloud-custodian/issues/6251 | [ERROR] 2020-10-27T18:30:32.480Z ec614241-19ef-4d44-b3a0-400229378905 error during policy execution
Traceback (most recent call last):
File "/var/task/c7n/handler.py", line 166, in dispatch_event
p.push(event, context)
File "/var/task/c7n/policy.py", line 1138, in push
return mode.run(event, lambda_ctx)
File "... | UnboundLocalError |
def process(self, asgs):
tags = self.get_tag_set()
error = None
client = self.get_client()
with self.executor_factory(max_workers=2) as w:
futures = {}
for asg_set in chunks(asgs, self.batch_size):
futures[w.submit(self.process_resource_set, client, asg_set, tags)] = (
... | def process(self, asgs):
tags = self.get_tag_set()
error = None
client = self.get_client()
with self.executor_factory(max_workers=3) as w:
futures = {}
for asg_set in chunks(asgs, self.batch_size):
futures[w.submit(self.process_resource_set, client, asg_set, tags)] = (
... | https://github.com/cloud-custodian/cloud-custodian/issues/6251 | [ERROR] 2020-10-27T18:30:32.480Z ec614241-19ef-4d44-b3a0-400229378905 error during policy execution
Traceback (most recent call last):
File "/var/task/c7n/handler.py", line 166, in dispatch_event
p.push(event, context)
File "/var/task/c7n/policy.py", line 1138, in push
return mode.run(event, lambda_ctx)
File "... | UnboundLocalError |
def process_resource_set(self, client, asgs, tags):
tag_params = []
propagate = self.data.get("propagate", False)
for t in tags:
if "PropagateAtLaunch" not in t:
t["PropagateAtLaunch"] = propagate
for t in tags:
for a in asgs:
atags = dict(t)
atags["Re... | def process_resource_set(self, client, asgs, tags):
tag_params = []
propagate = self.data.get("propagate", False)
for t in tags:
if "PropagateAtLaunch" not in t:
t["PropagateAtLaunch"] = propagate
for t in tags:
for a in asgs:
atags = dict(t)
atags["Re... | https://github.com/cloud-custodian/cloud-custodian/issues/6251 | [ERROR] 2020-10-27T18:30:32.480Z ec614241-19ef-4d44-b3a0-400229378905 error during policy execution
Traceback (most recent call last):
File "/var/task/c7n/handler.py", line 166, in dispatch_event
p.push(event, context)
File "/var/task/c7n/policy.py", line 1138, in push
return mode.run(event, lambda_ctx)
File "... | UnboundLocalError |
def process_asg(self, asg):
instance_ids = [i["InstanceId"] for i in asg["Instances"]]
tag_map = {
t["Key"]: t["Value"]
for t in asg.get("Tags", [])
if t["PropagateAtLaunch"] and not t["Key"].startswith("aws:")
}
if self.data.get("tags"):
tag_map = {k: v for k, v in tag_... | def process_asg(self, asg):
client = local_session(self.manager.session_factory).client("ec2")
instance_ids = [i["InstanceId"] for i in asg["Instances"]]
tag_map = {
t["Key"]: t["Value"]
for t in asg.get("Tags", [])
if t["PropagateAtLaunch"] and not t["Key"].startswith("aws:")
}
... | https://github.com/cloud-custodian/cloud-custodian/issues/6251 | [ERROR] 2020-10-27T18:30:32.480Z ec614241-19ef-4d44-b3a0-400229378905 error during policy execution
Traceback (most recent call last):
File "/var/task/c7n/handler.py", line 166, in dispatch_event
p.push(event, context)
File "/var/task/c7n/policy.py", line 1138, in push
return mode.run(event, lambda_ctx)
File "... | UnboundLocalError |
def __init__(self, policy, data):
self.policy = policy
self.data = data
self.filters = self.data.get("conditions", [])
# for value_from usage / we use the conditions class
# to mimic a resource manager interface. we can't use
# the actual resource manager as we're overriding block
# filters ... | def __init__(self, policy, data):
self.policy = policy
self.data = data
self.filters = self.data.get("conditions", [])
# for value_from usage / we use the conditions class
# to mimic a resource manager interface. we can't use
# the actual resource manager as we're overriding block
# filters ... | https://github.com/cloud-custodian/cloud-custodian/issues/6217 | custodian run ~/Projects/policies/policy.yaml -v -s ~/Projects/policies/.custodian
2020-10-15 16:44:26,694: custodian.commands:DEBUG Loaded file /Users/kevinkessels/Projects/policies/policy.yaml. Contains 1 policies
Traceback (most recent call last):
File "/Users/kevinkessels/Projects/custodian/venv/bin/custodian", lin... | AttributeError |
def validate(self):
if not self.initialized:
self.filters.extend(self.convert_deprecated())
self.filters = self.filter_registry.parse(self.filters, self)
self.initialized = True
| def validate(self):
self.filters.extend(self.convert_deprecated())
self.filters = self.filter_registry.parse(self.filters, self)
| https://github.com/cloud-custodian/cloud-custodian/issues/6217 | custodian run ~/Projects/policies/policy.yaml -v -s ~/Projects/policies/.custodian
2020-10-15 16:44:26,694: custodian.commands:DEBUG Loaded file /Users/kevinkessels/Projects/policies/policy.yaml. Contains 1 policies
Traceback (most recent call last):
File "/Users/kevinkessels/Projects/custodian/venv/bin/custodian", lin... | AttributeError |
def augment(self, resources):
return [r for r in resources if self.manager.resource_type.id in r]
| def augment(self, resources):
for r in resources:
r["Tags"] = r.pop("TagSet", [])
return resources
| https://github.com/cloud-custodian/cloud-custodian/issues/6155 | 2020-09-25 19:37:54,488: custodian.output:ERROR Error while executing policy
Traceback (most recent call last):
File "/Users/rgopala1/custodian/lib/python3.7/site-packages/c7n/policy.py", line 291, in run
resources = self.policy.resource_manager.resources()
File "/Users/rgopala1/custodian/lib/python3.7/site-packages/c7... | KeyError |
def render_event_pattern(self):
event_type = self.data.get("type")
pattern = self.data.get("pattern")
payload = {}
if pattern:
payload.update(pattern)
if event_type == "cloudtrail":
payload["detail-type"] = ["AWS API Call via CloudTrail"]
self.resolve_cloudtrail_payload(pay... | def render_event_pattern(self):
event_type = self.data.get("type")
pattern = self.data.get("pattern")
payload = {}
if pattern:
payload.update(pattern)
if event_type == "cloudtrail":
payload["detail-type"] = ["AWS API Call via CloudTrail"]
self.resolve_cloudtrail_payload(pay... | https://github.com/cloud-custodian/cloud-custodian/issues/6135 | 2020-09-17 09:37:55,669: custodian.policy:INFO Provisioning policy lambda: health-event-notify region: us-east-1
2020-09-17 09:37:55,924: custodian.output:ERROR Error while executing policy
Traceback (most recent call last):
File "/home/kapilt/projects/cloud-custodian/c7n/policy.py", line 508, in provision
return manag... | KeyError |
def process(self, resources):
client = local_session(self.manager.session_factory).client("iam")
error = None
if self.data.get("force", False):
policy_setter = self.manager.action_registry["set-policy"](
{"state": "detached", "arn": "*"}, self.manager
)
policy_setter.proc... | def process(self, resources):
client = local_session(self.manager.session_factory).client("iam")
error = None
if self.data.get("force", False):
policy_setter = self.manager.action_registry["set-policy"](
{"state": "detached", "arn": "*"}, self.manager
)
policy_setter.proc... | https://github.com/cloud-custodian/cloud-custodian/issues/6109 | 2020-09-08 10:48:33,898: custodian.actions:WARNING Role:arn:aws:iam::role cannot be deleted, set force to detach policy and delete
2020-09-08 10:48:34,042: custodian.output:ERROR Error while executing policy
and delete
2020-09-08 10:48:34,042: custodian.output:ERROR Error while executing policy
Traceback (most recent c... | botocore.errorfactory.DeleteConflictException |
def process_resource(self, client, r, related_tags, tag_keys, tag_action):
tags = {}
resource_tags = {
t["Key"]: t["Value"]
for t in r.get("Tags", [])
if not t["Key"].startswith("aws:")
}
if tag_keys == "*":
tags = {
k: v
for k, v in related_tags.... | def process_resource(self, client, r, related_tags, tag_keys, tag_action):
tags = {}
resource_tags = {
t["Key"]: t["Value"]
for t in r.get("Tags", [])
if not t["Key"].startswith("aws:")
}
if tag_keys == "*":
tags = {k: v for k, v in related_tags.items() if resource_tags.... | https://github.com/cloud-custodian/cloud-custodian/issues/5975 | $ custodian run --verbose --cache-period 0 --region us-east-1 -p aws-copy-tags-from-instance-to-ebs-volume -s . daily_policies.yml
2020-07-21 15:46:54,904: custodian.cache:DEBUG Disabling cache
2020-07-21 15:46:54,905: custodian.commands:DEBUG Loaded file daily_policies.yml. Contains 3 policies
2020-07-21 15:46:55,510:... | botocore.exceptions.ClientError |
def __init__(self, policy, data):
self.policy = policy
self.data = data
self.filters = self.data.get("conditions", [])
# for value_from usage / we use the conditions class
# to mimic a resource manager interface. we can't use
# the actual resource manager as we're overriding block
# filters ... | def __init__(self, policy, data):
self.policy = policy
self.data = data
self.filters = self.data.get("conditions", [])
# used by c7n-org to extend evaluation conditions
self.env_vars = {}
| https://github.com/cloud-custodian/cloud-custodian/issues/5941 | Traceback (most recent call last):
File "/root/c7n/lib/python3.8/site-packages/c7n/cli.py", line 362, in main
command(config)
File "/root/c7n/lib/python3.8/site-packages/c7n/commands.py", line 136, in _load_policies
return f(options, list(policies))
File "/root/c7n/lib/python3.8/site-packages/c7n/commands.py", line 282... | AttributeError |
def get_resources(self, resource_ids):
# augment will turn these into resource dictionaries
return resource_ids
| def get_resources(self, resource_ids):
client = local_session(self.manager.session_factory).client("es")
return client.describe_elasticsearch_domains(DomainNames=resource_ids)[
"DomainStatusList"
]
| https://github.com/cloud-custodian/cloud-custodian/issues/5916 | 2020-06-30T07:11:16.082-07:00
START RequestId: <sorry> Version: $LATEST
2020-06-30T07:11:16.731-07:00
[INFO] 2020-06-30T14:11:16.730Z <sorry> Processing event
{
"version": "0",
"id": "<sorry>",
"detail-type": "AWS API Call via CloudTrail",
"source": "aws.es",
"account": "<sorry>",
"time"... | botocore.exceptions.ParamValidationError |
def augment(self, resources):
results = []
client = local_session(self.session_factory).client("ecs")
for task_def_set in resources:
response = self.retry(
client.describe_task_definition,
taskDefinition=task_def_set,
include=["TAGS"],
)
r = respon... | def augment(self, resources):
results = []
client = local_session(self.session_factory).client("ecs")
for task_def_set in resources:
response = client.describe_task_definition(
taskDefinition=task_def_set, include=["TAGS"]
)
r = response["taskDefinition"]
r["tags"... | https://github.com/cloud-custodian/cloud-custodian/issues/5911 | 15:22:29
2020-06-30 15:22:29,380: custodian.commands:ERROR Error while executing policy check-ecs-def, continuing
15:22:29
Traceback (most recent call last):
15:22:29
File "/usr/local/lib/python3.7/dist-packages/c7n/commands.py", line 282, in run
15:22:29
policy()
15:22:29
File "/usr/local/lib/python3.7/dist-packag... | botocore.exceptions.ClientError |
def load_data(
self, policy_data, file_uri, validate=None, session_factory=None, config=None
):
self.structure.validate(policy_data)
# Use passed in policy exec configuration or default on loader
config = config or self.policy_config
# track policy resource types and only load if needed.
rtype... | def load_data(
self, policy_data, file_uri, validate=None, session_factory=None, config=None
):
self.structure.validate(policy_data)
# Use passed in policy exec configuration or default on loader
config = config or self.policy_config
# track policy resource types and only load if needed.
rtype... | https://github.com/cloud-custodian/cloud-custodian/issues/5829 | [ERROR] RuntimeError: missing jsonschema dependency
Traceback (most recent call last):
File "/var/task/custodian_policy.py", line 4, in run
return handler.dispatch_event(event, context)
File "/var/task/c7n/handler.py", line 175, in dispatch_event
p.validate()
File "/var/task/c7n/policy.py", line 1047, in validate
f.val... | RuntimeError |
def process_asg(self, asg):
client = local_session(self.manager.session_factory).client("ec2")
instance_ids = [i["InstanceId"] for i in asg["Instances"]]
tag_map = {
t["Key"]: t["Value"]
for t in asg.get("Tags", [])
if t["PropagateAtLaunch"] and not t["Key"].startswith("aws:")
}
... | def process_asg(self, asg):
client = local_session(self.manager.session_factory).client("ec2")
instance_ids = [i["InstanceId"] for i in asg["Instances"]]
tag_map = {
t["Key"]: t["Value"]
for t in asg.get("Tags", [])
if t["PropagateAtLaunch"] and not t["Key"].startswith("aws:")
}
... | https://github.com/cloud-custodian/cloud-custodian/issues/5086 | [ERROR] 2019-11-19T02:56:38.336Z b1c8af86-d773-412d-b755-638faf7698e8 Error while executing policy
20:56:38 Traceback (most recent call last):
20:56:38 File "/var/task/c7n/policy.py", line 320, in run
20:56:38 results = a.process(resources)
20:56:38 File "/var/task/c7n/resources/asg.py", line 1200, in process
20:56:38 ... | botocore.exceptions.ClientError |
def factory(self, data, manager=None):
"""Factory func for filters.
data - policy config for filters
manager - resource type manager (ec2, s3, etc)
"""
# Make the syntax a little nicer for common cases.
if isinstance(data, dict) and len(data) == 1 and "type" not in data:
op = list(data... | def factory(self, data, manager=None):
"""Factory func for filters.
data - policy config for filters
manager - resource type manager (ec2, s3, etc)
"""
# Make the syntax a little nicer for common cases.
if isinstance(data, dict) and len(data) == 1 and "type" not in data:
op = list(data... | https://github.com/cloud-custodian/cloud-custodian/issues/5724 | $ custodian run -d -v -s out -p run-asg-auto-tag-creator ./auto-tag-creator.yaml
2020-05-06 15:47:07,205: custodian.commands:DEBUG Loaded file ./auto-tag-creator.yaml. Contains 11 policies
2020-05-06 15:47:07,223: custodian.aws:DEBUG using default region:us-west-2 from boto
2020-05-06 15:47:07,778: custodian.commands:E... | KeyError |
def get_block_operator(self):
"""Determine the immediate parent boolean operator for a filter"""
# Top level operator is `and`
block = self.get_block_parent()
if block.type in ("and", "or", "not"):
return block.type
return "and"
| def get_block_operator(self):
"""Determine the immediate parent boolean operator for a filter"""
# Top level operator is `and`
block_stack = ["and"]
for f in self.manager.iter_filters(block_end=True):
if f is None:
block_stack.pop()
continue
if f.type in ("and", "... | https://github.com/cloud-custodian/cloud-custodian/issues/5724 | $ custodian run -d -v -s out -p run-asg-auto-tag-creator ./auto-tag-creator.yaml
2020-05-06 15:47:07,205: custodian.commands:DEBUG Loaded file ./auto-tag-creator.yaml. Contains 11 policies
2020-05-06 15:47:07,223: custodian.aws:DEBUG using default region:us-west-2 from boto
2020-05-06 15:47:07,778: custodian.commands:E... | KeyError |
def process_value_type(self, sentinel, value, resource):
if self.vtype == "normalize" and isinstance(value, str):
return sentinel, value.strip().lower()
elif self.vtype == "expr":
sentinel = self.get_resource_value(sentinel, resource)
return sentinel, value
elif self.vtype == "inte... | def process_value_type(self, sentinel, value, resource):
if self.vtype == "normalize":
return sentinel, value.strip().lower()
elif self.vtype == "expr":
sentinel = self.get_resource_value(sentinel, resource)
return sentinel, value
elif self.vtype == "integer":
try:
... | https://github.com/cloud-custodian/cloud-custodian/issues/5724 | $ custodian run -d -v -s out -p run-asg-auto-tag-creator ./auto-tag-creator.yaml
2020-05-06 15:47:07,205: custodian.commands:DEBUG Loaded file ./auto-tag-creator.yaml. Contains 11 policies
2020-05-06 15:47:07,223: custodian.aws:DEBUG using default region:us-west-2 from boto
2020-05-06 15:47:07,778: custodian.commands:E... | KeyError |
def iter_filters(self, block_end=False):
return iter_filters(self.filters, block_end=block_end)
| def iter_filters(self, block_end=False):
queue = deque(self.filters)
while queue:
f = queue.popleft()
if f and f.type in ("or", "and", "not"):
if block_end:
queue.appendleft(None)
for gf in f.filters:
queue.appendleft(gf)
yield f
| https://github.com/cloud-custodian/cloud-custodian/issues/5724 | $ custodian run -d -v -s out -p run-asg-auto-tag-creator ./auto-tag-creator.yaml
2020-05-06 15:47:07,205: custodian.commands:DEBUG Loaded file ./auto-tag-creator.yaml. Contains 11 policies
2020-05-06 15:47:07,223: custodian.aws:DEBUG using default region:us-west-2 from boto
2020-05-06 15:47:07,778: custodian.commands:E... | KeyError |
def validate(self):
self.filters.extend(self.convert_deprecated())
self.filters = self.filter_registry.parse(self.filters, self)
| def validate(self):
self.filters.extend(self.convert_deprecated())
self.filters = self.filter_registry.parse(
self.filters, self.policy.resource_manager
)
| https://github.com/cloud-custodian/cloud-custodian/issues/5724 | $ custodian run -d -v -s out -p run-asg-auto-tag-creator ./auto-tag-creator.yaml
2020-05-06 15:47:07,205: custodian.commands:DEBUG Loaded file ./auto-tag-creator.yaml. Contains 11 policies
2020-05-06 15:47:07,223: custodian.aws:DEBUG using default region:us-west-2 from boto
2020-05-06 15:47:07,778: custodian.commands:E... | KeyError |
def __call__(self):
"""Run policy in default mode"""
mode = self.get_execution_mode()
if isinstance(mode, ServerlessExecutionMode) or self.options.dryrun:
self._trim_runtime_filters()
if self.options.dryrun:
resources = PullMode(self).run()
elif not self.is_runnable():
resou... | def __call__(self):
"""Run policy in default mode"""
mode = self.get_execution_mode()
if self.options.dryrun:
resources = PullMode(self).run()
elif not self.is_runnable():
resources = []
elif isinstance(mode, ServerlessExecutionMode):
resources = mode.provision()
else:
... | https://github.com/cloud-custodian/cloud-custodian/issues/5724 | $ custodian run -d -v -s out -p run-asg-auto-tag-creator ./auto-tag-creator.yaml
2020-05-06 15:47:07,205: custodian.commands:DEBUG Loaded file ./auto-tag-creator.yaml. Contains 11 policies
2020-05-06 15:47:07,223: custodian.aws:DEBUG using default region:us-west-2 from boto
2020-05-06 15:47:07,778: custodian.commands:E... | KeyError |
def get_resource_date(self, asg):
cfg = self.launch_info.get(asg)
if cfg is None:
cfg = {}
ami = self.images.get(cfg.get("ImageId"), {})
return parse(ami.get(self.date_attribute, "2000-01-01T01:01:01.000Z"))
| def get_resource_date(self, asg):
cfg = self.launch_info.get(asg)
ami = self.images.get(cfg.get("ImageId"), {})
return parse(ami.get(self.date_attribute, "2000-01-01T01:01:01.000Z"))
| https://github.com/cloud-custodian/cloud-custodian/issues/5748 | custodian run --dryrun --profile abc asg-ami.yml --region us-east-1 -s asg-ami --cache-period 0 -v
2020-05-11 16:26:37,495: custodian.cache:DEBUG Disabling cache
2020-05-11 16:26:37,496: custodian.commands:DEBUG Loaded file asg-ami.yml. Contains 1 policies
2020-05-11 16:26:38,023: custodian.output:DEBUG Storing output ... | AttributeError |
def process(self, resources, event=None):
non_account_trails = set()
for r in resources:
region = self.manager.config.region
trail_arn = Arn.parse(r["TrailARN"])
if (
r.get("IsOrganizationTrail")
and self.manager.config.account_id != trail_arn.account_id
... | def process(self, resources, event=None):
for r in resources:
region = self.manager.config.region
trail_arn = Arn.parse(r["TrailARN"])
if (
r.get("IsOrganizationTrail")
and self.manager.config.account_id != trail_arn.account_id
):
continue
... | https://github.com/cloud-custodian/cloud-custodian/issues/5713 | 2020-05-05 09:03:16,332: custodian.commands:ERROR Error while executing policy awslogs-cloudtrail, continuing
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/c7n/commands.py", line 281, in run
policy()
File "/usr/local/lib/python3.7/site-packages/c7n/policy.py", line 1062, in __call__
re... | KeyError |
def get_launch_id(self, asg):
lid = asg.get("LaunchConfigurationName")
if lid is not None:
# We've noticed trailing white space allowed in some asgs
return lid.strip()
lid = asg.get("LaunchTemplate")
if lid is not None:
return (lid["LaunchTemplateId"], lid.get("Version", "$Defau... | def get_launch_id(self, asg):
lid = asg.get("LaunchConfigurationName")
if lid is not None:
# We've noticed trailing white space allowed in some asgs
return lid.strip()
lid = asg.get("LaunchTemplate")
if lid is not None:
return (lid["LaunchTemplateId"], lid["Version"])
if "M... | https://github.com/cloud-custodian/cloud-custodian/issues/5501 | Traceback (most recent call last):
File "/home/cloudcustodian/custodian/bin/c7n-org", line 11, in <module>
sys.exit(cli())
File "/home/cloudcustodian/custodian/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/cloudcustodian/custodian/lib/python3.6/site-pack... | KeyError |
def get_asg_templates(self, asgs):
templates = {}
for a in asgs:
t = None
if "LaunchTemplate" in a:
t = a["LaunchTemplate"]
elif "MixedInstancesPolicy" in a:
t = a["MixedInstancesPolicy"]["LaunchTemplate"][
"LaunchTemplateSpecification"
... | def get_asg_templates(self, asgs):
templates = {}
for a in asgs:
t = None
if "LaunchTemplate" in a:
t = a["LaunchTemplate"]
elif "MixedInstancesPolicy" in a:
t = a["MixedInstancesPolicy"]["LaunchTemplate"][
"LaunchTemplateSpecification"
... | https://github.com/cloud-custodian/cloud-custodian/issues/5501 | Traceback (most recent call last):
File "/home/cloudcustodian/custodian/bin/c7n-org", line 11, in <module>
sys.exit(cli())
File "/home/cloudcustodian/custodian/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/cloudcustodian/custodian/lib/python3.6/site-pack... | KeyError |
def process_resource(self, client, r, related_tags, tag_keys, tag_action):
tags = {}
resource_tags = {
t["Key"]: t["Value"]
for t in r.get("Tags", [])
if not t["Key"].startswith("aws:")
}
if tag_keys == "*":
tags = {k: v for k, v in related_tags.items() if resource_tags.... | def process_resource(self, client, r, related_tags, tag_keys, tag_action):
tags = {}
resource_tags = {
t["Key"]: t["Value"]
for t in r.get("Tags", [])
if not t["Key"].startswith("aws:")
}
if tag_keys == "*":
tags = {k: v for k, v in related_tags.items() if resource_tags.... | https://github.com/cloud-custodian/cloud-custodian/issues/5380 | policies:
- name: copy-tags-from-api-to-stage
resource: rest-stage
actions:
- type: copy-related-tag
resource: rest-api
skip_missing: True
key: restApiId
tags: '*'
(cc) root@ip-10-128-128-174:~# custodian run --assume arn:aws:iam::1234567890:role/Cloud_C... | botocore.exceptions.ParamValidationError |
def process(self, resources, event=None):
client = local_session(self.manager.session_factory).client(
"support", region_name="us-east-1"
)
checks = self.get_check_result(client, self.check_id)
region = self.manager.config.region
checks["flaggedResources"] = [
r
for r in che... | def process(self, resources, event=None):
client = local_session(self.manager.session_factory).client(
"support", region_name="us-east-1"
)
checks = client.describe_trusted_advisor_check_result(
checkId=self.check_id, language="en"
)["result"]
region = self.manager.config.region
... | https://github.com/cloud-custodian/cloud-custodian/issues/2402 | $ export AWS_PROFILE=...
$ custodian run --dryrun --output-dir=. custodian.yml
018-05-15 17:47:25,372: custodian.commands:ERROR Error while executing policy account-service-limits, continuing
Traceback (most recent call last):
File "/Users/9200779/git/bitbucket.org/vmdb/custodian/custodian/lib/python2.7/site-packages/c... | KeyError |
def get_asg_templates(self, asgs):
templates = {}
for a in asgs:
t = None
if "LaunchTemplate" in a:
t = a["LaunchTemplate"]
elif "MixedInstancesPolicy" in a:
t = a["MixedInstancesPolicy"]["LaunchTemplate"][
"LaunchTemplateSpecification"
... | def get_asg_templates(self, asgs):
templates = {}
for a in asgs:
t = None
if "LaunchTemplate" in a:
t = a["LaunchTemplate"]
elif "MixedInstancesPolicy" in a:
t = a["MixedInstancesPolicy"]["LaunchTemplate"][
"LaunchTemplateSpecification"
... | https://github.com/cloud-custodian/cloud-custodian/issues/5457 | 2020-03-17 14:34:01,624: custodian.output:ERROR Error while executing policy
Traceback (most recent call last):
File "/Users/user/.local/share/virtualenvs/cloud_custodian-GAUqGNXp/lib/python3.7/site-packages/c7n/policy.py", line 288, in run
resources = self.policy.resource_manager.resources()
File "/Users/user/.local/s... | KeyError |
def get_resource_tag_targets(resource, target_tag_keys):
if "Tags" not in resource:
return []
if isinstance(resource["Tags"], dict):
tags = resource["Tags"]
else:
tags = {tag["Key"]: tag["Value"] for tag in resource["Tags"]}
targets = []
for target_tag_key in target_tag_keys:... | def get_resource_tag_targets(resource, target_tag_keys):
if "Tags" not in resource:
return []
tags = {tag["Key"]: tag["Value"] for tag in resource["Tags"]}
targets = []
for target_tag_key in target_tag_keys:
if target_tag_key in tags:
targets.append(tags[target_tag_key])
... | https://github.com/cloud-custodian/cloud-custodian/issues/5397 | policies:
- name: msk-enforce-encryption-status
description: |
Deletes Non TLS only in-transit encrypted Kafka clusters and notifies customer.
resource: kafka
mode:
type: periodic
schedule: "rate(30 minutes)"
packages:
- botocore
- boto3
- urllib3
- certifi
... | TypeError |
def watch(limit):
"""watch scan rates across the cluster"""
period = 5.0
prev = db.db()
prev_totals = None
while True:
click.clear()
time.sleep(period)
cur = db.db()
cur.data["gkrate"] = {}
progress = []
prev_buckets = {b.bucket_id: b for b in prev.bu... | def watch(limit):
"""watch scan rates across the cluster"""
period = 5.0
prev = db.db()
prev_totals = None
while True:
click.clear()
time.sleep(period)
cur = db.db()
cur.data["gkrate"] = {}
progress = []
prev_buckets = {b.bucket_id: b for b in prev.bu... | https://github.com/cloud-custodian/cloud-custodian/issues/2624 | Traceback (most recent call last):
File "/usr/bin/c7n-salactus", line 11, in <module>
load_entry_point('c7n-salactus==0.3.0', 'console_scripts', 'c7n-salactus')()
File "/usr/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/click/c... | AttributeError |
def _report_options(p):
"""Add options specific to the report subcommand."""
_default_options(p, blacklist=["cache", "log-group", "quiet"])
p.add_argument(
"--days", type=float, default=1, help="Number of days of history to consider"
)
p.add_argument(
"--raw",
type=argparse.F... | def _report_options(p):
"""Add options specific to the report subcommand."""
_default_options(p, blacklist=["cache", "log-group", "quiet"])
p.add_argument(
"--days", type=float, default=1, help="Number of days of history to consider"
)
p.add_argument(
"--raw",
type=argparse.F... | https://github.com/cloud-custodian/cloud-custodian/issues/5269 | $ custodian report -s output --raw outfile.json list-ec2-instances.yaml
CustodianDate,InstanceId,tag:Name,InstanceType,LaunchTime,VpcId,PrivateIpAddress
Traceback (most recent call last):
File "/home/ec2-user/custodian/bin/custodian", line 8, in <module>
sys.exit(main())
File "/home/ec2-user/custodian/lib/python3.7/sit... | TypeError |
def _process_resource(self, resource):
lock_name = self._get_lock_name(resource)
lock_notes = self._get_lock_notes(resource)
if is_resource_group(resource):
self.client.management_locks.create_or_update_at_resource_group_level(
resource["name"],
lock_name,
Manage... | def _process_resource(self, resource):
lock_name = self._get_lock_name(resource)
lock_notes = self._get_lock_notes(resource)
if is_resource_group(resource):
self.client.management_locks.create_or_update_at_resource_group_level(
resource["name"],
lock_name,
Manage... | https://github.com/cloud-custodian/cloud-custodian/issues/4937 | ====================================================================== FAILURES =======================================================================
________________________________________________________ ActionsMarkForOpTest.test_mark_for_op ________________________________________________________
[gw4] darwin -- ... | AssertionError |
def get_namespace(resource_id):
parsed = parse_resource_id(resource_id)
return parsed.get("namespace")
| def get_namespace(resource_id):
parsed = parse_resource_id(resource_id)
if parsed.get("children"):
return "/".join([parsed.get("namespace"), parsed.get("type")])
return parsed.get("namespace")
| https://github.com/cloud-custodian/cloud-custodian/issues/4937 | ====================================================================== FAILURES =======================================================================
________________________________________________________ ActionsMarkForOpTest.test_mark_for_op ________________________________________________________
[gw4] darwin -- ... | AssertionError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.