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 propagate_to_anomaly(self, value):
"""Propagates an orbit to a specific true anomaly.
Parameters
----------
value : ~astropy.units.Quantity
Returns
-------
Orbit
Resulting orbit after propagation.
"""
# Silently wrap anomaly
nu = (value + np.pi * u.rad) % (2 * np.p... | def propagate_to_anomaly(self, value):
"""Propagates an orbit to a specific true anomaly.
Parameters
----------
value : ~astropy.units.Quantity
Returns
-------
Orbit
Resulting orbit after propagation.
"""
# Compute time of flight for correct epoch
time_of_flight = sel... | https://github.com/poliastro/poliastro/issues/475 | $ NUMBA_DISABLE_JIT=1 ipython --no-banner
In [1]: import numpy as np
In [2]: np.seterr(all="raise")
Out[2]: {'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'}
In [3]: import numpy as np
...: import math
...: from astropy import units as u
...: from poliastro.bodies import Earth, Moon
...: from ... | FloatingPointError |
def _generate_time_values(self, nu_vals):
# Subtract current anomaly to start from the desired point
ecc = self.ecc.value
k = self.attractor.k.to_value(u.km**3 / u.s**2)
q = self.r_p.to_value(u.km)
time_values = [
delta_t_from_nu_fast(nu_val, ecc, k, q) for nu_val in nu_vals.to(u.rad).value... | def _generate_time_values(self, nu_vals):
# Subtract current anomaly to start from the desired point
ecc = self.ecc.value
nu = self.nu.to(u.rad).value
M_vals = [
nu_to_M_fast(nu_val, ecc) - nu_to_M_fast(nu, ecc)
for nu_val in nu_vals.to(u.rad).value
] * u.rad
time_values = (M_v... | https://github.com/poliastro/poliastro/issues/475 | $ NUMBA_DISABLE_JIT=1 ipython --no-banner
In [1]: import numpy as np
In [2]: np.seterr(all="raise")
Out[2]: {'divide': 'warn', 'over': 'warn', 'under': 'ignore', 'invalid': 'warn'}
In [3]: import numpy as np
...: import math
...: from astropy import units as u
...: from poliastro.bodies import Earth, Moon
...: from ... | FloatingPointError |
def from_sbdb(cls, name, **kwargs):
"""Return osculating `Orbit` by using `SBDB` from Astroquery.
Parameters
----------
name: string
Name of the body to make the request.
Returns
-------
ss: poliastro.twobody.orbit.Orbit
Orbit corresponding to body_name
Examples
--... | def from_sbdb(cls, name, **kwargs):
"""Return osculating `Orbit` by using `SBDB` from Astroquery.
Parameters
----------
name: string
Name of the body to make the request.
Returns
-------
ss: poliastro.twobody.orbit.Orbit
Orbit corresponding to body_name
Examples
--... | https://github.com/poliastro/poliastro/issues/916 | In [9]: Orbit.from_sbdb("67/P")
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-9-75d3da3ffd57> in <module>
----> 1 Orbit.from_sbdb("67/P")
~/.pyenv/versions/poliastro37_4/lib/python3.7/site-packages/... | KeyError |
def record_from_name(name):
"""Search `dastcom.idx` and return logical records that match a given string.
Body name, SPK-ID, or alternative designations can be used.
Parameters
----------
name : str
Body name.
Returns
-------
records : list (int)
DASTCOM5 database logi... | def record_from_name(name):
"""Search `dastcom.idx` and return logical records that match a given string.
Body name, SPK-ID, or alternative designations can be used.
Parameters
----------
name : str
Body name.
Returns
-------
records : list (int)
DASTCOM5 database logi... | https://github.com/poliastro/poliastro/issues/902 | ---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-9-3bb5fa7c99be> in <module>
----> 1 halleys = dastcom5.orbit_from_name("1P")
2
3 frame = StaticOrbitPlotter()
4 frame.plot(halleys[0], label="Halley")
5 ... | OSError |
def norm(vec):
r"""Returns the norm of a 3 dimension vector.
.. math::
\left \| \vec{v} \right \| = \sqrt{\sum_{i=1}^{n}v_{i}^2}
Parameters
----------
vec: ndarray
Dimension 3 vector.
Examples
--------
>>> vec = np.array([1, 1, 1])
>>> norm(vec)
1.732050807... | def norm(vec):
r"""Returns the norm of a 3 dimension vector.
.. math::
\left \| \vec{v} \right \| = \sqrt{\sum_{i=1}^{n}v_{i}^2}
Parameters
----------
vec: ndarray
Dimension 3 vector.
Examples
--------
>>> from poliastro.core.util import norm
>>> from astropy i... | https://github.com/poliastro/poliastro/issues/761 | _____________________ [doctest] poliastro.core.util.cross ______________________
143 b : ndarray
144 3 Dimension vector.
145
146 Examples
147 --------
148 >>> from poliastro.core.util import cross
149 >>> from astropy import units as u
150 >>> i = [1, 0, 0] * u.m
151 >>> j = [0, 1, 0... | astropy.units.core.UnitConversionError |
def cross(a, b):
r"""Computes cross product between two vectors.
.. math::
\vec{w} = \vec{u} \times \vec{v} = \begin{vmatrix}
u_{y} & y_{z} \\
v_{y} & v_{z}
\end{vmatrix}\vec{i} - \begin{vmatrix}
u_{x} & u_{z} \\
v_{x} & v_{z}
\en... | def cross(a, b):
r"""Computes cross product between two vectors.
.. math::
\vec{w} = \vec{u} \times \vec{v} = \begin{vmatrix}
u_{y} & y_{z} \\
v_{y} & v_{z}
\end{vmatrix}\vec{i} - \begin{vmatrix}
u_{x} & u_{z} \\
v_{x} & v_{z}
\en... | https://github.com/poliastro/poliastro/issues/761 | _____________________ [doctest] poliastro.core.util.cross ______________________
143 b : ndarray
144 3 Dimension vector.
145
146 Examples
147 --------
148 >>> from poliastro.core.util import cross
149 >>> from astropy import units as u
150 >>> i = [1, 0, 0] * u.m
151 >>> j = [0, 1, 0... | astropy.units.core.UnitConversionError |
def propagate(self, value, method=mean_motion, rtol=1e-10, **kwargs):
"""Propagates an orbit a specified time.
If value is true anomaly, propagate orbit to this anomaly and return the result.
Otherwise, if time is provided, propagate this `Orbit` some `time` and return the result.
Parameters
-----... | def propagate(self, value, method=mean_motion, rtol=1e-10, **kwargs):
"""Propagates an orbit a specified time.
If value is true anomaly, propagate orbit to this anomaly and return the result.
Otherwise, if time is provided, propagate this `Orbit` some `time` and return the result.
Parameters
-----... | https://github.com/poliastro/poliastro/issues/654 | from poliastro.twobody import Orbit
from poliastro.bodies import Moon
from astropy import units as u
orb = Orbit.from_vectors(Moon, [-17621.48704193, 9218.72943252, -10947.19144579] * u.km, [ -6985.91793854, -13970.02807282, -7272.34554685] * u.km / u.day)
orb
2211 x 22792 km x 36.0 deg orbit around Moon (☾) at epoc... | KeyError |
def plot(self, orbit, label=None, color=None):
"""Plots state and osculating orbit in their plane."""
if not self._frame:
self.set_frame(*orbit.pqw())
if (orbit, label) not in self._orbits:
self._orbits.append((orbit, label))
# if new attractor radius is smaller, plot it
new_radius... | def plot(self, orbit, label=None, color=None):
"""Plots state and osculating orbit in their plane."""
if not self._frame:
self.set_frame(*orbit.pqw())
if (orbit, label) not in self._orbits:
self._orbits.append((orbit, label))
# if new attractor radius is smaller, plot it
new_radius... | https://github.com/poliastro/poliastro/issues/326 | /usr/local/lib/python3.6/site-packages/astropy/units/quantity.py:639: RuntimeWarning:
invalid value encountered in log
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/usr/local/lib/python3.6/site-packages/astropy/... | ValueError |
def sample(self, values=None, method=mean_motion):
"""Samples an orbit to some specified time values.
.. versionadded:: 0.8.0
Parameters
----------
values : Multiple options
Number of interval points (default to 100),
True anomaly values,
Time values.
Returns
-----... | def sample(self, values=None, method=mean_motion):
"""Samples an orbit to some specified time values.
.. versionadded:: 0.8.0
Parameters
----------
values : Multiple options
Number of interval points (default to 100),
True anomaly values,
Time values.
Returns
-----... | https://github.com/poliastro/poliastro/issues/326 | /usr/local/lib/python3.6/site-packages/astropy/units/quantity.py:639: RuntimeWarning:
invalid value encountered in log
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/usr/local/lib/python3.6/site-packages/astropy/... | ValueError |
def _generate_time_values(self, nu_vals):
# Subtract current anomaly to start from the desired point
M_vals = nu_to_M(nu_vals, self.ecc) - nu_to_M(self.nu, self.ecc)
time_values = self.epoch + (M_vals / self.n).decompose()
return time_values
| def _generate_time_values(self, nu_vals):
M_vals = nu_to_M(nu_vals, self.ecc)
time_values = self.epoch + (M_vals / self.n).decompose()
return time_values
| https://github.com/poliastro/poliastro/issues/326 | /usr/local/lib/python3.6/site-packages/astropy/units/quantity.py:639: RuntimeWarning:
invalid value encountered in log
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/usr/local/lib/python3.6/site-packages/astropy/... | ValueError |
def get_param_decl(param):
def to_string(node):
"""Convert Doxygen node content to a string."""
result = []
if node is not None:
for p in node.content_:
value = p.value
if not isinstance(value, six.text_type):
value = value.valu... | def get_param_decl(param):
def to_string(node):
"""Convert Doxygen node content to a string."""
result = []
for p in node.content_:
value = p.value
if not isinstance(value, six.text_type):
value = value.valueOf_
result.append(value)
... | https://github.com/michaeljones/breathe/issues/402 | # Sphinx version: 1.8.2
# Python version: 2.7.12 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:
# Running Sphinx v1.8.2
# making output directory...
# building [mo]: targets for 0 po files that are out of date
# building [html]: targets for 2 source files that are out of date
# upd... | AttributeError |
def to_string(node):
"""Convert Doxygen node content to a string."""
result = []
if node is not None:
for p in node.content_:
value = p.value
if not isinstance(value, six.text_type):
value = value.valueOf_
result.append(value)
return " ".join(r... | def to_string(node):
"""Convert Doxygen node content to a string."""
result = []
for p in node.content_:
value = p.value
if not isinstance(value, six.text_type):
value = value.valueOf_
result.append(value)
return " ".join(result)
| https://github.com/michaeljones/breathe/issues/402 | # Sphinx version: 1.8.2
# Python version: 2.7.12 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:
# Running Sphinx v1.8.2
# making output directory...
# building [mo]: targets for 0 po files that are out of date
# building [html]: targets for 2 source files that are out of date
# upd... | AttributeError |
def _wrap_init_error(init_error):
# type: (F) -> F
def sentry_init_error(*args, **kwargs):
# type: (*Any, **Any) -> Any
hub = Hub.current
integration = hub.get_integration(AwsLambdaIntegration)
if integration is None:
return init_error(*args, **kwargs)
# If ... | def _wrap_init_error(init_error):
# type: (F) -> F
def sentry_init_error(*args, **kwargs):
# type: (*Any, **Any) -> Any
hub = Hub.current
integration = hub.get_integration(AwsLambdaIntegration)
if integration is None:
return init_error(*args, **kwargs)
# If ... | https://github.com/getsentry/sentry-python/issues/891 | [ERROR] AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "/var/task/sentry_sdk/integrations/aws_lambda.py", line 106, in sentry_handler
headers = event.get("headers",
{}
) | AttributeError |
def sentry_init_error(*args, **kwargs):
# type: (*Any, **Any) -> Any
hub = Hub.current
integration = hub.get_integration(AwsLambdaIntegration)
if integration is None:
return init_error(*args, **kwargs)
# If an integration is there, a client has to be there.
client = hub.client # type:... | def sentry_init_error(*args, **kwargs):
# type: (*Any, **Any) -> Any
hub = Hub.current
integration = hub.get_integration(AwsLambdaIntegration)
if integration is None:
return init_error(*args, **kwargs)
# If an integration is there, a client has to be there.
client = hub.client # type:... | https://github.com/getsentry/sentry-python/issues/891 | [ERROR] AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "/var/task/sentry_sdk/integrations/aws_lambda.py", line 106, in sentry_handler
headers = event.get("headers",
{}
) | AttributeError |
def _wrap_handler(handler):
# type: (F) -> F
def sentry_handler(aws_event, context, *args, **kwargs):
# type: (Any, Any, *Any, **Any) -> Any
# Per https://docs.aws.amazon.com/lambda/latest/dg/python-handler.html,
# `event` here is *likely* a dictionary, but also might be a number of
... | def _wrap_handler(handler):
# type: (F) -> F
def sentry_handler(event, context, *args, **kwargs):
# type: (Any, Any, *Any, **Any) -> Any
hub = Hub.current
integration = hub.get_integration(AwsLambdaIntegration)
if integration is None:
return handler(event, context, *a... | https://github.com/getsentry/sentry-python/issues/891 | [ERROR] AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "/var/task/sentry_sdk/integrations/aws_lambda.py", line 106, in sentry_handler
headers = event.get("headers",
{}
) | AttributeError |
def sentry_handler(aws_event, context, *args, **kwargs):
# type: (Any, Any, *Any, **Any) -> Any
# Per https://docs.aws.amazon.com/lambda/latest/dg/python-handler.html,
# `event` here is *likely* a dictionary, but also might be a number of
# other types (str, int, float, None).
#
# In some cases... | def sentry_handler(event, context, *args, **kwargs):
# type: (Any, Any, *Any, **Any) -> Any
hub = Hub.current
integration = hub.get_integration(AwsLambdaIntegration)
if integration is None:
return handler(event, context, *args, **kwargs)
# If an integration is there, a client has to be ther... | https://github.com/getsentry/sentry-python/issues/891 | [ERROR] AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "/var/task/sentry_sdk/integrations/aws_lambda.py", line 106, in sentry_handler
headers = event.get("headers",
{}
) | AttributeError |
def _make_request_event_processor(aws_event, aws_context, configured_timeout):
# type: (Any, Any, Any) -> EventProcessor
start_time = datetime.utcnow()
def event_processor(sentry_event, hint, start_time=start_time):
# type: (Event, Hint, datetime) -> Optional[Event]
remaining_time_in_milis ... | def _make_request_event_processor(aws_event, aws_context, configured_timeout):
# type: (Any, Any, Any) -> EventProcessor
start_time = datetime.utcnow()
def event_processor(event, hint, start_time=start_time):
# type: (Event, Hint, datetime) -> Optional[Event]
remaining_time_in_milis = aws_c... | https://github.com/getsentry/sentry-python/issues/891 | [ERROR] AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "/var/task/sentry_sdk/integrations/aws_lambda.py", line 106, in sentry_handler
headers = event.get("headers",
{}
) | AttributeError |
def event_processor(sentry_event, hint, start_time=start_time):
# type: (Event, Hint, datetime) -> Optional[Event]
remaining_time_in_milis = aws_context.get_remaining_time_in_millis()
exec_duration = configured_timeout - remaining_time_in_milis
extra = sentry_event.setdefault("extra", {})
extra["la... | def event_processor(event, hint, start_time=start_time):
# type: (Event, Hint, datetime) -> Optional[Event]
remaining_time_in_milis = aws_context.get_remaining_time_in_millis()
exec_duration = configured_timeout - remaining_time_in_milis
extra = event.setdefault("extra", {})
extra["lambda"] = {
... | https://github.com/getsentry/sentry-python/issues/891 | [ERROR] AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "/var/task/sentry_sdk/integrations/aws_lambda.py", line 106, in sentry_handler
headers = event.get("headers",
{}
) | AttributeError |
def _get_url(aws_event, aws_context):
# type: (Any, Any) -> str
path = aws_event.get("path", None)
headers = aws_event.get("headers", {})
host = headers.get("Host", None)
proto = headers.get("X-Forwarded-Proto", None)
if proto and host and path:
return "{}://{}{}".format(proto, host, pat... | def _get_url(event, context):
# type: (Any, Any) -> str
path = event.get("path", None)
headers = event.get("headers", {})
host = headers.get("Host", None)
proto = headers.get("X-Forwarded-Proto", None)
if proto and host and path:
return "{}://{}{}".format(proto, host, path)
return "a... | https://github.com/getsentry/sentry-python/issues/891 | [ERROR] AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "/var/task/sentry_sdk/integrations/aws_lambda.py", line 106, in sentry_handler
headers = event.get("headers",
{}
) | AttributeError |
def _get_cloudwatch_logs_url(aws_context, start_time):
# type: (Any, datetime) -> str
"""
Generates a CloudWatchLogs console URL based on the context object
Arguments:
aws_context {Any} -- context from lambda handler
Returns:
str -- AWS Console URL to logs.
"""
formatstring... | def _get_cloudwatch_logs_url(context, start_time):
# type: (Any, datetime) -> str
"""
Generates a CloudWatchLogs console URL based on the context object
Arguments:
context {Any} -- context from lambda handler
Returns:
str -- AWS Console URL to logs.
"""
formatstring = "%Y-%... | https://github.com/getsentry/sentry-python/issues/891 | [ERROR] AttributeError: 'list' object has no attribute 'get'
Traceback (most recent call last):
File "/var/task/sentry_sdk/integrations/aws_lambda.py", line 106, in sentry_handler
headers = event.get("headers",
{}
) | AttributeError |
def patch_channels_asgi_handler_impl(cls):
# type: (Any) -> None
import channels # type: ignore
from sentry_sdk.integrations.django import DjangoIntegration
if channels.__version__ < "3.0.0":
old_app = cls.__call__
async def sentry_patched_asgi_handler(self, receive, send):
... | def patch_channels_asgi_handler_impl(cls):
# type: (Any) -> None
from sentry_sdk.integrations.django import DjangoIntegration
old_app = cls.__call__
async def sentry_patched_asgi_handler(self, receive, send):
# type: (Any, Any, Any) -> Any
if Hub.current.get_integration(DjangoIntegrat... | https://github.com/getsentry/sentry-python/issues/911 | Exception inside application: sentry_patched_asgi_handler() takes 3 positional arguments but 4 were given
Traceback (most recent call last):
File "env/lib/python3.8/site-packages/channels/routing.py", line 71, in __call__
return await application(scope, receive, send)
TypeError: sentry_patched_asgi_handler() takes 3 po... | TypeError |
def _emit(self, record):
# type: (LogRecord) -> None
if not _can_record(record):
return
hub = Hub.current
if hub.client is None:
return
client_options = hub.client.options
# exc_info might be None or (None, None, None)
#
# exc_info may also be any falsy value due to Py... | def _emit(self, record):
# type: (LogRecord) -> None
if not _can_record(record):
return
hub = Hub.current
if hub.client is None:
return
client_options = hub.client.options
# exc_info might be None or (None, None, None)
if record.exc_info is not None and record.exc_info[0] ... | https://github.com/getsentry/sentry-python/issues/904 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/sentry_sdk/integrations/logging.py", line 164, in emit
return self._emit(record)
File "/usr/local/lib/python3.7/site-packages/sentry_sdk/integrations/logging.py", line 178, in _emit
if record.exc_info is not None and record.exc_info[0] is n... | TypeError |
def pure_eval_frame(frame):
# type: (FrameType) -> Dict[str, Any]
source = executing.Source.for_frame(frame)
if not source.tree:
return {}
statements = source.statements_at_line(frame.f_lineno)
if not statements:
return {}
scope = stmt = list(statements)[0]
while True:
... | def pure_eval_frame(frame):
# type: (FrameType) -> Dict[str, Any]
source = executing.Source.for_frame(frame)
if not source.tree:
return {}
statements = source.statements_at_line(frame.f_lineno)
if not statements:
return {}
scope = stmt = list(statements)[0]
while True:
... | https://github.com/getsentry/sentry-python/issues/893 | File "/usr/local/lib/python3.8/dist-packages/asyncpg/connection.py", line 443, in fetch
return await self._execute(query, args, 0, timeout)
File "/usr/local/lib/python3.8/dist-packages/asyncpg/connection.py", line 1445, in _execute
result, _ = await self.__execute(
File "/server/athenian/api/db.py", line 191, in _async... | asyncpg.exceptions.ConnectionDoesNotExistError |
def closeness(expression):
# type: (Tuple[List[Any], Any]) -> Tuple[int, int]
# Prioritise expressions with a node closer to the statement executed
# without being after that statement
# A higher return value is better - the expression will appear
# earlier in the list of values and is less likely t... | def closeness(expression):
# type: (Tuple[List[Any], Any]) -> int
# Prioritise expressions with a node closer to the statement executed
# without being after that statement
# A higher return value is better - the expression will appear
# earlier in the list of values and is less likely to be trimmed... | https://github.com/getsentry/sentry-python/issues/893 | File "/usr/local/lib/python3.8/dist-packages/asyncpg/connection.py", line 443, in fetch
return await self._execute(query, args, 0, timeout)
File "/usr/local/lib/python3.8/dist-packages/asyncpg/connection.py", line 1445, in _execute
result, _ = await self.__execute(
File "/server/athenian/api/db.py", line 191, in _async... | asyncpg.exceptions.ConnectionDoesNotExistError |
def _sentry_start_response(
old_start_response, # type: StartResponse
span, # type: Span
status, # type: str
response_headers, # type: WsgiResponseHeaders
exc_info=None, # type: Optional[WsgiExcInfo]
):
# type: (...) -> WsgiResponseIter
with capture_internal_exceptions():
status... | def _sentry_start_response(
old_start_response, span, status, response_headers, exc_info=None
):
# type: (Callable[[str, U, Optional[E]], T], Span, str, U, Optional[E]) -> T
with capture_internal_exceptions():
status_int = int(status.split(" ", 1)[0])
span.set_http_status(status_int)
re... | https://github.com/getsentry/sentry-python/issues/585 | Traceback (most recent call last):
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/apscheduler/executors/base_py3.py", line 29, in run_coroutine_job
retval = await job.func(*job.args, **job.kwargs)
File "/var/www/pixiu.40huo.cn/pixiu/backend/scheduler.py", line 96, in refresh_task
req = await fetch... | TypeError |
def __call__(self, status, response_headers, exc_info=None):
# type: (str, WsgiResponseHeaders, Optional[WsgiExcInfo]) -> WsgiResponseIter
pass
| def __call__(self, environ, start_response):
# type: (Dict[str, str], Callable[..., Any]) -> _ScopedResponse
if _wsgi_middleware_applied.get(False):
return self.app(environ, start_response)
_wsgi_middleware_applied.set(True)
try:
hub = Hub(Hub.current)
with hub:
wit... | https://github.com/getsentry/sentry-python/issues/585 | Traceback (most recent call last):
File "/var/www/pixiu.40huo.cn/pixiu/venv/lib/python3.8/site-packages/apscheduler/executors/base_py3.py", line 29, in run_coroutine_job
retval = await job.func(*job.args, **job.kwargs)
File "/var/www/pixiu.40huo.cn/pixiu/backend/scheduler.py", line 96, in refresh_task
req = await fetch... | TypeError |
def __init__(self, app):
# type: (Any) -> None
self.app = app
if _looks_like_asgi3(app):
self.__call__ = self._run_asgi3 # type: Callable[..., Any]
else:
self.__call__ = self._run_asgi2
| def __init__(self, app):
# type: (Any) -> None
self.app = app
| https://github.com/getsentry/sentry-python/issues/556 | Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
return await se... | TypeError |
def _timed_queue_join(self, timeout):
# type: (float) -> bool
deadline = time() + timeout
queue = self._queue
real_all_tasks_done = getattr(queue, "all_tasks_done", None) # type: Optional[Any]
if real_all_tasks_done is not None:
real_all_tasks_done.acquire()
all_tasks_done = real_a... | def _timed_queue_join(self, timeout):
# type: (float) -> bool
deadline = time() + timeout
queue = self._queue
queue.all_tasks_done.acquire() # type: ignore
try:
while queue.unfinished_tasks: # type: ignore
delay = deadline - time()
if delay <= 0:
ret... | https://github.com/getsentry/sentry-python/issues/471 | Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/Users/jibanez/API/.conda/envs/cimrender/lib/python3.6/site-packages/sentry_sdk/worker.py", line 84, in flush
self._wait_flush(timeout, callback)
File "/Users/jibanez/API/.conda/envs/cimrender/lib/python3.6/site-packages/sentry_sdk/worker.py", lin... | AttributeError |
def setup_once():
# type: () -> None
old_start = Thread.start
def sentry_start(self, *a, **kw):
hub = Hub.current
integration = hub.get_integration(ThreadingIntegration)
if integration is not None:
if not integration.propagate_hub:
hub_ = None
... | def setup_once():
# type: () -> None
old_start = Thread.start
def sentry_start(self, *a, **kw):
hub = Hub.current
integration = hub.get_integration(ThreadingIntegration)
if integration is not None:
if not integration.propagate_hub:
hub_ = None
... | https://github.com/getsentry/sentry-python/issues/423 | Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/Users/tony.li/miniconda3/lib/python3.7/concurrent/futures/process.py", line 101, in _python_exit
thread_wakeup.wakeup()
File "/Users/tony.li/miniconda3/lib/python3.7/concurrent/futures/process.py", line 89, in wakeup
self._writer.send_bytes(b"")
... | OSError |
def sentry_start(self, *a, **kw):
hub = Hub.current
integration = hub.get_integration(ThreadingIntegration)
if integration is not None:
if not integration.propagate_hub:
hub_ = None
else:
hub_ = Hub(hub)
# Patching instance methods in `start()` creates a refer... | def sentry_start(self, *a, **kw):
hub = Hub.current
integration = hub.get_integration(ThreadingIntegration)
if integration is not None:
if not integration.propagate_hub:
hub_ = None
else:
hub_ = Hub(hub)
self.run = _wrap_run(hub_, self.run)
return old_st... | https://github.com/getsentry/sentry-python/issues/423 | Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/Users/tony.li/miniconda3/lib/python3.7/concurrent/futures/process.py", line 101, in _python_exit
thread_wakeup.wakeup()
File "/Users/tony.li/miniconda3/lib/python3.7/concurrent/futures/process.py", line 89, in wakeup
self._writer.send_bytes(b"")
... | OSError |
def _wrap_run(parent_hub, old_run_func):
def run(*a, **kw):
hub = parent_hub or Hub.current
with hub:
try:
self = current_thread()
return old_run_func(self, *a, **kw)
except Exception:
reraise(*_capture_exception())
return ... | def _wrap_run(parent_hub, old_run):
def run(*a, **kw):
hub = parent_hub or Hub.current
with hub:
try:
return old_run(*a, **kw)
except Exception:
reraise(*_capture_exception())
return run
| https://github.com/getsentry/sentry-python/issues/423 | Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/Users/tony.li/miniconda3/lib/python3.7/concurrent/futures/process.py", line 101, in _python_exit
thread_wakeup.wakeup()
File "/Users/tony.li/miniconda3/lib/python3.7/concurrent/futures/process.py", line 89, in wakeup
self._writer.send_bytes(b"")
... | OSError |
def run(*a, **kw):
hub = parent_hub or Hub.current
with hub:
try:
self = current_thread()
return old_run_func(self, *a, **kw)
except Exception:
reraise(*_capture_exception())
| def run(*a, **kw):
hub = parent_hub or Hub.current
with hub:
try:
return old_run(*a, **kw)
except Exception:
reraise(*_capture_exception())
| https://github.com/getsentry/sentry-python/issues/423 | Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/Users/tony.li/miniconda3/lib/python3.7/concurrent/futures/process.py", line 101, in _python_exit
thread_wakeup.wakeup()
File "/Users/tony.li/miniconda3/lib/python3.7/concurrent/futures/process.py", line 89, in wakeup
self._writer.send_bytes(b"")
... | OSError |
def format_sql(sql, params):
# type: (Any, Any) -> Tuple[str, List[str]]
rv = []
if isinstance(params, dict):
# convert sql with named parameters to sql with unnamed parameters
conv = _FormatConverter(params)
if params:
sql = sql % conv
params = conv.params
... | def format_sql(sql, params):
# type: (Any, Any) -> Tuple[str, List[str]]
rv = []
if isinstance(params, dict):
# convert sql with named parameters to sql with unnamed parameters
conv = _FormatConverter(params)
if params:
sql = sql_to_string(sql)
sql = sql % co... | https://github.com/getsentry/sentry-python/issues/201 | $ ./manage.py test-sentry
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-package... | TypeError |
def record_sql(sql, params, cursor=None):
# type: (Any, Any, Any) -> None
hub = Hub.current
if hub.get_integration(DjangoIntegration) is None:
return
with capture_internal_exceptions():
if cursor and hasattr(cursor, "mogrify"): # psycopg2
real_sql = cursor.mogrify(sql, para... | def record_sql(sql, params):
# type: (Any, Any) -> None
hub = Hub.current
if hub.get_integration(DjangoIntegration) is None:
return
real_sql, real_params = format_sql(sql, params)
if real_params:
try:
real_sql = format_and_strip(real_sql, real_params)
except Exce... | https://github.com/getsentry/sentry-python/issues/201 | $ ./manage.py test-sentry
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-package... | TypeError |
def install_sql_hook():
# type: () -> None
"""If installed this causes Django's queries to be captured."""
try:
from django.db.backends.utils import CursorWrapper # type: ignore
except ImportError:
from django.db.backends.util import CursorWrapper # type: ignore
try:
real_... | def install_sql_hook():
# type: () -> None
"""If installed this causes Django's queries to be captured."""
try:
from django.db.backends.utils import CursorWrapper # type: ignore
except ImportError:
from django.db.backends.util import CursorWrapper # type: ignore
try:
real_... | https://github.com/getsentry/sentry-python/issues/201 | $ ./manage.py test-sentry
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-package... | TypeError |
def record_many_sql(sql, param_list, cursor):
for params in param_list:
record_sql(sql, params, cursor)
| def record_many_sql(sql, param_list):
for params in param_list:
record_sql(sql, params)
| https://github.com/getsentry/sentry-python/issues/201 | $ ./manage.py test-sentry
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-package... | TypeError |
def execute(self, sql, params=None):
try:
return real_execute(self, sql, params)
finally:
record_sql(sql, params, self.cursor)
| def execute(self, sql, params=None):
try:
return real_execute(self, sql, params)
finally:
record_sql(sql, params)
| https://github.com/getsentry/sentry-python/issues/201 | $ ./manage.py test-sentry
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-package... | TypeError |
def executemany(self, sql, param_list):
try:
return real_executemany(self, sql, param_list)
finally:
record_many_sql(sql, param_list, self.cursor)
| def executemany(self, sql, param_list):
try:
return real_executemany(self, sql, param_list)
finally:
record_many_sql(sql, param_list)
| https://github.com/getsentry/sentry-python/issues/201 | $ ./manage.py test-sentry
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-package... | TypeError |
def setup_once():
import celery.app.trace as trace # type: ignore
old_build_tracer = trace.build_tracer
def sentry_build_tracer(name, task, *args, **kwargs):
# Need to patch both methods because older celery sometimes
# short-circuits to task.run if it thinks it's safe.
task.__cal... | def setup_once():
import celery.app.trace as trace # type: ignore
old_build_tracer = trace.build_tracer
def sentry_build_tracer(name, task, *args, **kwargs):
# Need to patch both methods because older celery sometimes
# short-circuits to task.run if it thinks it's safe.
task.__cal... | https://github.com/getsentry/sentry-python/issues/285 | [2019-03-08 21:24:21,117: ERROR/ForkPoolWorker-31] Task simple_task[d6e959b1-7253-4e55-861d-c1968ae14e1c] raised unexpected: RuntimeError('No active exception to reraise')
Traceback (most recent call last):
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_tas... | RuntimeError |
def sentry_build_tracer(name, task, *args, **kwargs):
# Need to patch both methods because older celery sometimes
# short-circuits to task.run if it thinks it's safe.
task.__call__ = _wrap_task_call(task, task.__call__)
task.run = _wrap_task_call(task, task.run)
return _wrap_tracer(task, old_build_t... | def sentry_build_tracer(name, task, *args, **kwargs):
# Need to patch both methods because older celery sometimes
# short-circuits to task.run if it thinks it's safe.
task.__call__ = _wrap_task_call(task.__call__)
task.run = _wrap_task_call(task.run)
return _wrap_tracer(task, old_build_tracer(name, ... | https://github.com/getsentry/sentry-python/issues/285 | [2019-03-08 21:24:21,117: ERROR/ForkPoolWorker-31] Task simple_task[d6e959b1-7253-4e55-861d-c1968ae14e1c] raised unexpected: RuntimeError('No active exception to reraise')
Traceback (most recent call last):
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_tas... | RuntimeError |
def _wrap_task_call(task, f):
# Need to wrap task call because the exception is caught before we get to
# see it. Also celery's reported stacktrace is untrustworthy.
def _inner(*args, **kwargs):
try:
return f(*args, **kwargs)
except Exception:
exc_info = sys.exc_info(... | def _wrap_task_call(f):
# Need to wrap task call because the exception is caught before we get to
# see it. Also celery's reported stacktrace is untrustworthy.
def _inner(*args, **kwargs):
try:
return f(*args, **kwargs)
except Exception:
reraise(*_capture_exception())... | https://github.com/getsentry/sentry-python/issues/285 | [2019-03-08 21:24:21,117: ERROR/ForkPoolWorker-31] Task simple_task[d6e959b1-7253-4e55-861d-c1968ae14e1c] raised unexpected: RuntimeError('No active exception to reraise')
Traceback (most recent call last):
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_tas... | RuntimeError |
def _inner(*args, **kwargs):
try:
return f(*args, **kwargs)
except Exception:
exc_info = sys.exc_info()
with capture_internal_exceptions():
_capture_exception(task, exc_info)
reraise(*exc_info)
| def _inner(*args, **kwargs):
try:
return f(*args, **kwargs)
except Exception:
reraise(*_capture_exception())
| https://github.com/getsentry/sentry-python/issues/285 | [2019-03-08 21:24:21,117: ERROR/ForkPoolWorker-31] Task simple_task[d6e959b1-7253-4e55-861d-c1968ae14e1c] raised unexpected: RuntimeError('No active exception to reraise')
Traceback (most recent call last):
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_tas... | RuntimeError |
def _make_event_processor(task, uuid, args, kwargs, request=None):
def event_processor(event, hint):
with capture_internal_exceptions():
event["transaction"] = task.name
with capture_internal_exceptions():
extra = event.setdefault("extra", {})
extra["celery-job"]... | def _make_event_processor(task, uuid, args, kwargs, request=None):
def event_processor(event, hint):
with capture_internal_exceptions():
event["transaction"] = task.name
with capture_internal_exceptions():
extra = event.setdefault("extra", {})
extra["celery-job"]... | https://github.com/getsentry/sentry-python/issues/285 | [2019-03-08 21:24:21,117: ERROR/ForkPoolWorker-31] Task simple_task[d6e959b1-7253-4e55-861d-c1968ae14e1c] raised unexpected: RuntimeError('No active exception to reraise')
Traceback (most recent call last):
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_tas... | RuntimeError |
def event_processor(event, hint):
with capture_internal_exceptions():
event["transaction"] = task.name
with capture_internal_exceptions():
extra = event.setdefault("extra", {})
extra["celery-job"] = {
"task_name": task.name,
"args": args,
"kwargs": kw... | def event_processor(event, hint):
with capture_internal_exceptions():
event["transaction"] = task.name
with capture_internal_exceptions():
extra = event.setdefault("extra", {})
extra["celery-job"] = {
"task_name": task.name,
"args": args,
"kwargs": kw... | https://github.com/getsentry/sentry-python/issues/285 | [2019-03-08 21:24:21,117: ERROR/ForkPoolWorker-31] Task simple_task[d6e959b1-7253-4e55-861d-c1968ae14e1c] raised unexpected: RuntimeError('No active exception to reraise')
Traceback (most recent call last):
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_tas... | RuntimeError |
def _capture_exception(task, exc_info):
hub = Hub.current
if hub.get_integration(CeleryIntegration) is None:
return
if isinstance(exc_info[1], Retry):
return
if hasattr(task, "throws") and isinstance(exc_info[1], task.throws):
return
event, hint = event_from_exception(
... | def _capture_exception():
hub = Hub.current
exc_info = sys.exc_info()
if hub.get_integration(CeleryIntegration) is not None:
event, hint = event_from_exception(
exc_info,
client_options=hub.client.options,
mechanism={"type": "celery", "handled": False},
)... | https://github.com/getsentry/sentry-python/issues/285 | [2019-03-08 21:24:21,117: ERROR/ForkPoolWorker-31] Task simple_task[d6e959b1-7253-4e55-861d-c1968ae14e1c] raised unexpected: RuntimeError('No active exception to reraise')
Traceback (most recent call last):
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_tas... | RuntimeError |
def get_by_scope_and_name(cls, scope, name):
"""
Get a key value store given a scope and name.
:param scope: Scope which the key belongs to.
:type scope: ``str``
:param name: Name of the key.
:type key: ``str``
:rtype: :class:`KeyValuePairDB` or ``None``
"""
query_result = cls.imp... | def get_by_scope_and_name(cls, scope, name):
"""
Get a key value store given a scope and name.
:param scope: Scope which the key belongs to.
:type scope: ``str``
:param name: Name of the key.
:type key: ``str``
:rtype: :class:`KeyValuePairDB` or ``None``
"""
query_result = cls.imp... | https://github.com/StackStorm/st2/issues/4979 | Jun 26 18:27:35 ip-10-15-1-121 gunicorn[184385]: 2020-06-26 18:27:35,134 ERROR [-] Failed to call controller function "get_one" for operation "st2api.controllers.v1.keyvalue:key_value_pair_controller.get_one": The key "aws_inspector.AWSInspector:us-east-2.last_start_time_" does not exist in the StackStorm datastore.
Ju... | StackStormDBObjectNotFoundError |
def __call__(self, req):
"""
The method is invoked on every request and shows the lifecycle of the request received from
the middleware.
Although some middleware may use parts of the API spec, it is safe to assume that if you're
looking for the particular spec property handler, it's most likely a p... | def __call__(self, req):
"""
The method is invoked on every request and shows the lifecycle of the request received from
the middleware.
Although some middleware may use parts of the API spec, it is safe to assume that if you're
looking for the particular spec property handler, it's most likely a p... | https://github.com/StackStorm/st2/issues/4979 | Jun 26 18:27:35 ip-10-15-1-121 gunicorn[184385]: 2020-06-26 18:27:35,134 ERROR [-] Failed to call controller function "get_one" for operation "st2api.controllers.v1.keyvalue:key_value_pair_controller.get_one": The key "aws_inspector.AWSInspector:us-east-2.last_start_time_" does not exist in the StackStorm datastore.
Ju... | StackStormDBObjectNotFoundError |
def to_serializable_dict(self, mask_secrets=False):
"""
Serialize database model to a dictionary.
:param mask_secrets: True to mask secrets in the resulting dict.
:type mask_secrets: ``boolean``
:rtype: ``dict``
"""
serializable_dict = {}
for k in sorted(six.iterkeys(self._fields)):
... | def to_serializable_dict(self, mask_secrets=False):
"""
Serialize database model to a dictionary.
:param mask_secrets: True to mask secrets in the resulting dict.
:type mask_secrets: ``boolean``
:rtype: ``dict``
"""
serializable_dict = {}
for k in sorted(six.iterkeys(self._fields)):
... | https://github.com/StackStorm/st2/issues/4934 | 2020-05-04 14:18:49,473 140709056184880 INFO engine [-] Found 1 rules defined for trigger core.38d1bbdd-a659-4038-b3f4-ce250eb79db8
2020-05-04 14:18:49,475 140709056184880 ERROR traceback [-] Traceback (most recent call last):
2020-05-04 14:18:49,476 140709056184880 ERROR traceback [-] File "/usr/lib64/python2.7/log... | AttributeError |
def close(self):
if self.socket:
self.socket.close()
if self.client:
self.client.close()
if self.sftp_client:
self.sftp_client.close()
if self.bastion_socket:
self.bastion_socket.close()
if self.bastion_client:
self.bastion_client.close()
return True
| def close(self):
self.logger.debug("Closing server connection")
self.client.close()
if self.socket:
self.logger.debug("Closing proxycommand socket connection")
# https://github.com/paramiko/paramiko/issues/789 Avoid zombie ssh processes
self.socket.process.kill()
self.sock... | https://github.com/StackStorm/st2/issues/4973 | st2actionrunner-59c47ddcc8-9jjbl r1 2020-06-25 15:30:17,009 ERROR [-] Failed shutting down SSH connection to host: rndcas402
st2actionrunner-59c47ddcc8-9jjbl r1 Traceback (most recent call last):
st2actionrunner-59c47ddcc8-9jjbl r1 File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/runners/parallel... | AttributeError |
def process(self, message):
handler_function = self.message_types.get(type(message), None)
if not handler_function:
msg = 'Handler function for message type "%s" is not defined.' % type(message)
raise ValueError(msg)
try:
handler_function(message)
except Exception as e:
... | def process(self, message):
handler_function = self.message_types.get(type(message), None)
if not handler_function:
msg = 'Handler function for message type "%s" is not defined.' % type(message)
raise ValueError(msg)
handler_function(message)
| https://github.com/StackStorm/st2/issues/4704 | 2019-06-04 17:08:05,405 139749901439856 ERROR consumers [-] VariableMessageQueueConsumer failed to process message: ActionExecutionDB(action={u'notify': {}, u'description': u'This executes a task in the net-task library', u'runner_type': u'python-script', u'tags': [], u'enabled': True, u'name': u'net-task', u'entry_poi... | ToozConnectionError |
def register_opts(ignore_errors=False):
rbac_opts = [
cfg.BoolOpt("enable", default=False, help="Enable RBAC."),
cfg.StrOpt("backend", default="noop", help="RBAC backend to use."),
cfg.BoolOpt(
"sync_remote_groups",
default=False,
help="True to synchronize... | def register_opts(ignore_errors=False):
rbac_opts = [
cfg.BoolOpt("enable", default=False, help="Enable RBAC."),
cfg.StrOpt("backend", default="noop", help="RBAC backend to use."),
cfg.BoolOpt(
"sync_remote_groups",
default=False,
help="True to synchronize... | https://github.com/StackStorm/st2/issues/4704 | 2019-06-04 17:08:05,405 139749901439856 ERROR consumers [-] VariableMessageQueueConsumer failed to process message: ActionExecutionDB(action={u'notify': {}, u'description': u'This executes a task in the net-task library', u'runner_type': u'python-script', u'tags': [], u'enabled': True, u'name': u'net-task', u'entry_poi... | ToozConnectionError |
def __init__(
self,
collection_interval=DEFAULT_COLLECTION_INTERVAL,
sleep_delay=DEFAULT_SLEEP_DELAY,
):
"""
:param collection_interval: How often to check database for old data and perform garbage
collection.
:type collection_interval: ``int``
:param sleep_delay: How long to sle... | def __init__(
self,
collection_interval=DEFAULT_COLLECTION_INTERVAL,
sleep_delay=DEFAULT_SLEEP_DELAY,
):
"""
:param collection_interval: How often to check database for old data and perform garbage
collection.
:type collection_interval: ``int``
:param sleep_delay: How long to sle... | https://github.com/StackStorm/st2/issues/4704 | 2019-06-04 17:08:05,405 139749901439856 ERROR consumers [-] VariableMessageQueueConsumer failed to process message: ActionExecutionDB(action={u'notify': {}, u'description': u'This executes a task in the net-task library', u'runner_type': u'python-script', u'tags': [], u'enabled': True, u'name': u'net-task', u'entry_poi... | ToozConnectionError |
def _perform_garbage_collection(self):
LOG.info("Performing garbage collection...")
proc_message = "Performing garbage collection for %s."
skip_message = "Skipping garbage collection for %s since it's not configured."
# Note: We sleep for a bit between garbage collection of each object type to prevent... | def _perform_garbage_collection(self):
LOG.info("Performing garbage collection...")
# Note: We sleep for a bit between garbage collection of each object type to prevent busy
# waiting
if self._action_executions_ttl and self._action_executions_ttl >= MINIMUM_TTL_DAYS:
self._purge_action_executio... | https://github.com/StackStorm/st2/issues/4704 | 2019-06-04 17:08:05,405 139749901439856 ERROR consumers [-] VariableMessageQueueConsumer failed to process message: ActionExecutionDB(action={u'notify': {}, u'description': u'This executes a task in the net-task library', u'runner_type': u'python-script', u'tags': [], u'enabled': True, u'name': u'net-task', u'entry_poi... | ToozConnectionError |
def _purge_action_executions(self):
"""
Purge action executions and corresponding live action, stdout and stderr object which match
the criteria defined in the config.
"""
utc_now = get_datetime_utc_now()
timestamp = utc_now - datetime.timedelta(days=self._action_executions_ttl)
# Another s... | def _purge_action_executions(self):
"""
Purge action executions and corresponding live action, stdout and stderr object which match
the criteria defined in the config.
"""
LOG.info("Performing garbage collection for action executions and related objects")
utc_now = get_datetime_utc_now()
ti... | https://github.com/StackStorm/st2/issues/4704 | 2019-06-04 17:08:05,405 139749901439856 ERROR consumers [-] VariableMessageQueueConsumer failed to process message: ActionExecutionDB(action={u'notify': {}, u'description': u'This executes a task in the net-task library', u'runner_type': u'python-script', u'tags': [], u'enabled': True, u'name': u'net-task', u'entry_poi... | ToozConnectionError |
def _purge_action_executions_output(self):
utc_now = get_datetime_utc_now()
timestamp = utc_now - datetime.timedelta(days=self._action_executions_output_ttl)
# Another sanity check to make sure we don't delete new objects
if timestamp > (
utc_now - datetime.timedelta(days=MINIMUM_TTL_DAYS_EXECU... | def _purge_action_executions_output(self):
LOG.info("Performing garbage collection for action executions output objects")
utc_now = get_datetime_utc_now()
timestamp = utc_now - datetime.timedelta(days=self._action_executions_output_ttl)
# Another sanity check to make sure we don't delete new objects
... | https://github.com/StackStorm/st2/issues/4704 | 2019-06-04 17:08:05,405 139749901439856 ERROR consumers [-] VariableMessageQueueConsumer failed to process message: ActionExecutionDB(action={u'notify': {}, u'description': u'This executes a task in the net-task library', u'runner_type': u'python-script', u'tags': [], u'enabled': True, u'name': u'net-task', u'entry_poi... | ToozConnectionError |
def _purge_trigger_instances(self):
"""
Purge trigger instances which match the criteria defined in the config.
"""
utc_now = get_datetime_utc_now()
timestamp = utc_now - datetime.timedelta(days=self._trigger_instances_ttl)
# Another sanity check to make sure we don't delete new executions
... | def _purge_trigger_instances(self):
"""
Purge trigger instances which match the criteria defined in the config.
"""
LOG.info("Performing garbage collection for trigger instances")
utc_now = get_datetime_utc_now()
timestamp = utc_now - datetime.timedelta(days=self._trigger_instances_ttl)
# ... | https://github.com/StackStorm/st2/issues/4704 | 2019-06-04 17:08:05,405 139749901439856 ERROR consumers [-] VariableMessageQueueConsumer failed to process message: ActionExecutionDB(action={u'notify': {}, u'description': u'This executes a task in the net-task library', u'runner_type': u'python-script', u'tags': [], u'enabled': True, u'name': u'net-task', u'entry_poi... | ToozConnectionError |
def _timeout_inquiries(self):
"""Mark Inquiries as "timeout" that have exceeded their TTL"""
try:
purge_inquiries(logger=LOG)
except Exception as e:
LOG.exception("Failed to purge inquiries: %s" % (six.text_type(e)))
return True
| def _timeout_inquiries(self):
"""Mark Inquiries as "timeout" that have exceeded their TTL"""
LOG.info("Performing garbage collection for Inquiries")
try:
purge_inquiries(logger=LOG)
except Exception as e:
LOG.exception("Failed to purge inquiries: %s" % (six.text_type(e)))
return Tr... | https://github.com/StackStorm/st2/issues/4704 | 2019-06-04 17:08:05,405 139749901439856 ERROR consumers [-] VariableMessageQueueConsumer failed to process message: ActionExecutionDB(action={u'notify': {}, u'description': u'This executes a task in the net-task library', u'runner_type': u'python-script', u'tags': [], u'enabled': True, u'name': u'net-task', u'entry_poi... | ToozConnectionError |
def create_or_update_trigger_db(trigger, log_not_unique_error_as_debug=False):
"""
Create a new TriggerDB model if one doesn't exist yet or update existing
one.
:param trigger: Trigger info.
:type trigger: ``dict``
"""
assert isinstance(trigger, dict)
existing_trigger_db = _get_trigger... | def create_or_update_trigger_db(trigger):
"""
Create a new TriggerDB model if one doesn't exist yet or update existing
one.
:param trigger: Trigger info.
:type trigger: ``dict``
"""
assert isinstance(trigger, dict)
existing_trigger_db = _get_trigger_db(trigger)
if existing_trigger... | https://github.com/StackStorm/st2/issues/3933 | Registering content...[flags = --config-file /etc/st2/st2.conf --register-all]
2017-11-10 16:04:14,401 INFO [-] Connecting to database "st2" @ "127.0.0.1:27017" as user "stackstorm".
2017-11-10 16:04:20,355 ERROR [-] Conflict while trying to save in DB.
Traceback (most recent call last):
File "/opt/stackstorm/st2/local... | NotUniqueError |
def create_trigger_type_db(trigger_type, log_not_unique_error_as_debug=False):
"""
Creates a trigger type db object in the db given trigger_type definition as dict.
:param trigger_type: Trigger type model.
:type trigger_type: ``dict``
:param log_not_unique_error_as_debug: True to lot NotUnique err... | def create_trigger_type_db(trigger_type):
"""
Creates a trigger type db object in the db given trigger_type definition as dict.
:param trigger_type: Trigger type model.
:type trigger_type: ``dict``
:rtype: ``object``
"""
trigger_type_api = TriggerTypeAPI(**trigger_type)
trigger_type_ap... | https://github.com/StackStorm/st2/issues/3933 | Registering content...[flags = --config-file /etc/st2/st2.conf --register-all]
2017-11-10 16:04:14,401 INFO [-] Connecting to database "st2" @ "127.0.0.1:27017" as user "stackstorm".
2017-11-10 16:04:20,355 ERROR [-] Conflict while trying to save in DB.
Traceback (most recent call last):
File "/opt/stackstorm/st2/local... | NotUniqueError |
def create_shadow_trigger(trigger_type_db, log_not_unique_error_as_debug=False):
"""
Create a shadow trigger for TriggerType with no parameters.
:param log_not_unique_error_as_debug: True to lot NotUnique errors under debug instead of
error log level. This is to be... | def create_shadow_trigger(trigger_type_db):
"""
Create a shadow trigger for TriggerType with no parameters.
"""
trigger_type_ref = trigger_type_db.get_reference().ref
if trigger_type_db.parameters_schema:
LOG.debug(
"Skip shadow trigger for TriggerType with parameters %s.", trig... | https://github.com/StackStorm/st2/issues/3933 | Registering content...[flags = --config-file /etc/st2/st2.conf --register-all]
2017-11-10 16:04:14,401 INFO [-] Connecting to database "st2" @ "127.0.0.1:27017" as user "stackstorm".
2017-11-10 16:04:20,355 ERROR [-] Conflict while trying to save in DB.
Traceback (most recent call last):
File "/opt/stackstorm/st2/local... | NotUniqueError |
def create_or_update_trigger_type_db(trigger_type, log_not_unique_error_as_debug=False):
"""
Create or update a trigger type db object in the db given trigger_type definition as dict.
:param trigger_type: Trigger type model.
:type trigger_type: ``dict``
:param log_not_unique_error_as_debug: True t... | def create_or_update_trigger_type_db(trigger_type):
"""
Create or update a trigger type db object in the db given trigger_type definition as dict.
:param trigger_type: Trigger type model.
:type trigger_type: ``dict``
:rtype: ``object``
"""
assert isinstance(trigger_type, dict)
trigger... | https://github.com/StackStorm/st2/issues/3933 | Registering content...[flags = --config-file /etc/st2/st2.conf --register-all]
2017-11-10 16:04:14,401 INFO [-] Connecting to database "st2" @ "127.0.0.1:27017" as user "stackstorm".
2017-11-10 16:04:20,355 ERROR [-] Conflict while trying to save in DB.
Traceback (most recent call last):
File "/opt/stackstorm/st2/local... | NotUniqueError |
def _register_internal_trigger_type(trigger_definition):
try:
trigger_type_db = create_trigger_type_db(
trigger_type=trigger_definition, log_not_unique_error_as_debug=True
)
except (NotUniqueError, StackStormDBObjectConflictError):
# We ignore conflict error since this operat... | def _register_internal_trigger_type(trigger_definition):
try:
trigger_type_db = create_trigger_type_db(trigger_type=trigger_definition)
except (NotUniqueError, StackStormDBObjectConflictError):
# We ignore conflict error since this operation is idempotent and race is not an issue
LOG.deb... | https://github.com/StackStorm/st2/issues/3933 | Registering content...[flags = --config-file /etc/st2/st2.conf --register-all]
2017-11-10 16:04:14,401 INFO [-] Connecting to database "st2" @ "127.0.0.1:27017" as user "stackstorm".
2017-11-10 16:04:20,355 ERROR [-] Conflict while trying to save in DB.
Traceback (most recent call last):
File "/opt/stackstorm/st2/local... | NotUniqueError |
def register_internal_trigger_types():
"""
Register internal trigger types.
NOTE 1: This method blocks until all the trigger types have been registered.
NOTE 2: We log "NotUniqueError" errors under debug and not error. Those errors are not fatal
because this operation is idempotent and NotUniqueEr... | def register_internal_trigger_types():
"""
Register internal trigger types.
Note: This method blocks until all the trigger types have been registered.
"""
action_sensor_enabled = cfg.CONF.action_sensor.enable
registered_trigger_types_db = []
for _, trigger_definitions in six.iteritems(INT... | https://github.com/StackStorm/st2/issues/3933 | Registering content...[flags = --config-file /etc/st2/st2.conf --register-all]
2017-11-10 16:04:14,401 INFO [-] Connecting to database "st2" @ "127.0.0.1:27017" as user "stackstorm".
2017-11-10 16:04:20,355 ERROR [-] Conflict while trying to save in DB.
Traceback (most recent call last):
File "/opt/stackstorm/st2/local... | NotUniqueError |
def main():
try:
_setup()
return _run_scheduler()
except SystemExit as exit_code:
sys.exit(exit_code)
except:
LOG.exception("(PID=%s) Scheduler quit due to exception.", os.getpid())
return 1
finally:
_teardown()
| def main():
try:
_setup()
return _run_queuer()
except SystemExit as exit_code:
sys.exit(exit_code)
except:
LOG.exception("(PID=%s) Scheduler quit due to exception.", os.getpid())
return 1
finally:
_teardown()
| https://github.com/StackStorm/st2/issues/4539 | 2019-02-04 14:48:45,229 140516293681552 INFO scheduler [-] (PID=8536) Scheduler started.
2019-02-04 14:48:45,418 140516293681552 INFO consumers [-] Starting SchedulerEntrypoint...
2019-02-04 14:48:45,429 140516109106224 INFO mixins [-] Connected to amqp://xxx:**@127.0.0.1:5672//
2019-02-04 14:51:05,599 140516198248688 ... | NotMasterError |
def _register_service_opts():
scheduler_opts = [
cfg.StrOpt(
"logging",
default="/etc/st2/logging.scheduler.conf",
help="Location of the logging configuration file.",
),
cfg.IntOpt(
"pool_size",
default=10,
help="The siz... | def _register_service_opts():
scheduler_opts = [
cfg.StrOpt(
"logging",
default="/etc/st2/logging.scheduler.conf",
help="Location of the logging configuration file.",
),
cfg.IntOpt(
"pool_size",
default=10,
help="The siz... | https://github.com/StackStorm/st2/issues/4539 | 2019-02-04 14:48:45,229 140516293681552 INFO scheduler [-] (PID=8536) Scheduler started.
2019-02-04 14:48:45,418 140516293681552 INFO consumers [-] Starting SchedulerEntrypoint...
2019-02-04 14:48:45,429 140516109106224 INFO mixins [-] Connected to amqp://xxx:**@127.0.0.1:5672//
2019-02-04 14:51:05,599 140516198248688 ... | NotMasterError |
def __init__(self):
self.message_type = LiveActionDB
self._shutdown = False
self._pool = eventlet.GreenPool(size=cfg.CONF.scheduler.pool_size)
self._coordinator = coordination_service.get_coordinator()
self._main_thread = None
self._cleanup_thread = None
| def __init__(self):
self.message_type = LiveActionDB
self._shutdown = False
self._pool = eventlet.GreenPool(size=cfg.CONF.scheduler.pool_size)
self._coordinator = coordination_service.get_coordinator()
| https://github.com/StackStorm/st2/issues/4539 | 2019-02-04 14:48:45,229 140516293681552 INFO scheduler [-] (PID=8536) Scheduler started.
2019-02-04 14:48:45,418 140516293681552 INFO consumers [-] Starting SchedulerEntrypoint...
2019-02-04 14:48:45,429 140516109106224 INFO mixins [-] Connected to amqp://xxx:**@127.0.0.1:5672//
2019-02-04 14:51:05,599 140516198248688 ... | NotMasterError |
def run(self):
LOG.debug("Starting scheduler handler...")
while not self._shutdown:
eventlet.greenthread.sleep(cfg.CONF.scheduler.sleep_interval)
self.process()
| def run(self):
LOG.debug("Entering scheduler loop")
while not self._shutdown:
eventlet.greenthread.sleep(cfg.CONF.scheduler.sleep_interval)
execution_queue_item_db = self._get_next_execution()
if execution_queue_item_db:
self._pool.spawn(self._handle_execution, execution_q... | https://github.com/StackStorm/st2/issues/4539 | 2019-02-04 14:48:45,229 140516293681552 INFO scheduler [-] (PID=8536) Scheduler started.
2019-02-04 14:48:45,418 140516293681552 INFO consumers [-] Starting SchedulerEntrypoint...
2019-02-04 14:48:45,429 140516109106224 INFO mixins [-] Connected to amqp://xxx:**@127.0.0.1:5672//
2019-02-04 14:51:05,599 140516198248688 ... | NotMasterError |
def cleanup(self):
LOG.debug("Starting scheduler garbage collection...")
while not self._shutdown:
eventlet.greenthread.sleep(cfg.CONF.scheduler.gc_interval)
self._handle_garbage_collection()
| def cleanup(self):
LOG.debug("Starting scheduler garbage collection")
while not self._shutdown:
eventlet.greenthread.sleep(cfg.CONF.scheduler.gc_interval)
self._handle_garbage_collection()
| https://github.com/StackStorm/st2/issues/4539 | 2019-02-04 14:48:45,229 140516293681552 INFO scheduler [-] (PID=8536) Scheduler started.
2019-02-04 14:48:45,418 140516293681552 INFO consumers [-] Starting SchedulerEntrypoint...
2019-02-04 14:48:45,429 140516109106224 INFO mixins [-] Connected to amqp://xxx:**@127.0.0.1:5672//
2019-02-04 14:51:05,599 140516198248688 ... | NotMasterError |
def start(self):
self._shutdown = False
# Spawn the worker threads.
self._main_thread = eventlet.spawn(self.run)
self._cleanup_thread = eventlet.spawn(self.cleanup)
# Link the threads to the shutdown function. If either of the threads exited with error,
# then initiate shutdown which will allo... | def start(self):
self._shutdown = False
eventlet.spawn(self.run)
eventlet.spawn(self.cleanup)
| https://github.com/StackStorm/st2/issues/4539 | 2019-02-04 14:48:45,229 140516293681552 INFO scheduler [-] (PID=8536) Scheduler started.
2019-02-04 14:48:45,418 140516293681552 INFO consumers [-] Starting SchedulerEntrypoint...
2019-02-04 14:48:45,429 140516109106224 INFO mixins [-] Connected to amqp://xxx:**@127.0.0.1:5672//
2019-02-04 14:51:05,599 140516198248688 ... | NotMasterError |
def shutdown(self, *args, **kwargs):
if not self._shutdown:
self._shutdown = True
| def shutdown(self):
self._shutdown = True
| https://github.com/StackStorm/st2/issues/4539 | 2019-02-04 14:48:45,229 140516293681552 INFO scheduler [-] (PID=8536) Scheduler started.
2019-02-04 14:48:45,418 140516293681552 INFO consumers [-] Starting SchedulerEntrypoint...
2019-02-04 14:48:45,429 140516109106224 INFO mixins [-] Connected to amqp://xxx:**@127.0.0.1:5672//
2019-02-04 14:51:05,599 140516198248688 ... | NotMasterError |
def __init__(self, endpoint, cacert=None, debug=False):
self._url = httpclient.get_url_without_trailing_slash(endpoint) + "/stream"
self.debug = debug
self.cacert = cacert
| def __init__(self, endpoint, cacert, debug):
self._url = httpclient.get_url_without_trailing_slash(endpoint) + "/stream"
self.debug = debug
self.cacert = cacert
| https://github.com/StackStorm/st2/issues/4361 | 2018-09-25 09:01:02,475 DEBUG - Using cached token from file "/home/ubuntu/.st2/token-st2admin"
Traceback (most recent call last):
File "/home/ubuntu/st2/st2client/st2client/shell.py", line 402, in run
func(args)
File "/home/ubuntu/st2/st2client/st2client/commands/resource.py", line 47, in decorate
return ... | SSLError |
def listen(self, events=None, **kwargs):
# Late import to avoid very expensive in-direct import (~1 second) when this function is
# not called / used
from sseclient import SSEClient
url = self._url
query_params = {}
request_params = {}
if events and isinstance(events, six.string_types):
... | def listen(self, events=None, **kwargs):
# Late import to avoid very expensive in-direct import (~1 second) when this function is
# not called / used
from sseclient import SSEClient
url = self._url
query_params = {}
if events and isinstance(events, six.string_types):
events = [events]
... | https://github.com/StackStorm/st2/issues/4361 | 2018-09-25 09:01:02,475 DEBUG - Using cached token from file "/home/ubuntu/.st2/token-st2admin"
Traceback (most recent call last):
File "/home/ubuntu/st2/st2client/st2client/shell.py", line 402, in run
func(args)
File "/home/ubuntu/st2/st2client/st2client/commands/resource.py", line 47, in decorate
return ... | SSLError |
def setup_app(config={}):
LOG.info("Creating st2api: %s as OpenAPI app.", VERSION_STRING)
is_gunicorn = config.get("is_gunicorn", False)
if is_gunicorn:
# Note: We need to perform monkey patching in the worker. If we do it in
# the master process (gunicorn_config.py), it breaks tons of thin... | def setup_app(config={}):
LOG.info("Creating st2api: %s as OpenAPI app.", VERSION_STRING)
is_gunicorn = config.get("is_gunicorn", False)
if is_gunicorn:
# Note: We need to perform monkey patching in the worker. If we do it in
# the master process (gunicorn_config.py), it breaks tons of thin... | https://github.com/StackStorm/st2/issues/4254 | 2018-07-19 18:31:46,668 INFO [-] f590ed84-3e54-4634-89f2-120eb3f956e5 - POST /tokens with query={} (remote_addr='127.0.0.1',method='POST',request_id='f590ed84-3e54-4634-89f2-120eb3f956e5',query={},path='/tokens')
2018-07-19 18:31:46,669 DEBUG [-] Recieved call with WebOb: POST /tokens HTTP/1.0
Accept: */*
Authorization... | ValidationError |
def setup_app(config={}):
LOG.info("Creating st2auth: %s as OpenAPI app.", VERSION_STRING)
is_gunicorn = config.get("is_gunicorn", False)
if is_gunicorn:
# Note: We need to perform monkey patching in the worker. If we do it in
# the master process (gunicorn_config.py), it breaks tons of thi... | def setup_app(config={}):
LOG.info("Creating st2auth: %s as OpenAPI app.", VERSION_STRING)
is_gunicorn = config.get("is_gunicorn", False)
if is_gunicorn:
# Note: We need to perform monkey patching in the worker. If we do it in
# the master process (gunicorn_config.py), it breaks tons of thi... | https://github.com/StackStorm/st2/issues/4254 | 2018-07-19 18:31:46,668 INFO [-] f590ed84-3e54-4634-89f2-120eb3f956e5 - POST /tokens with query={} (remote_addr='127.0.0.1',method='POST',request_id='f590ed84-3e54-4634-89f2-120eb3f956e5',query={},path='/tokens')
2018-07-19 18:31:46,669 DEBUG [-] Recieved call with WebOb: POST /tokens HTTP/1.0
Accept: */*
Authorization... | ValidationError |
def __call__(self, req):
"""
The method is invoked on every request and shows the lifecycle of the request received from
the middleware.
Although some middleware may use parts of the API spec, it is safe to assume that if you're
looking for the particular spec property handler, it's most likely a p... | def __call__(self, req):
"""
The method is invoked on every request and shows the lifecycle of the request received from
the middleware.
Although some middleware may use parts of the API spec, it is safe to assume that if you're
looking for the particular spec property handler, it's most likely a p... | https://github.com/StackStorm/st2/issues/4254 | 2018-07-19 18:31:46,668 INFO [-] f590ed84-3e54-4634-89f2-120eb3f956e5 - POST /tokens with query={} (remote_addr='127.0.0.1',method='POST',request_id='f590ed84-3e54-4634-89f2-120eb3f956e5',query={},path='/tokens')
2018-07-19 18:31:46,669 DEBUG [-] Recieved call with WebOb: POST /tokens HTTP/1.0
Accept: */*
Authorization... | ValidationError |
def setup_app(config={}):
LOG.info("Creating st2stream: %s as OpenAPI app.", VERSION_STRING)
is_gunicorn = config.get("is_gunicorn", False)
if is_gunicorn:
# Note: We need to perform monkey patching in the worker. If we do it in
# the master process (gunicorn_config.py), it breaks tons of t... | def setup_app(config={}):
LOG.info("Creating st2stream: %s as OpenAPI app.", VERSION_STRING)
is_gunicorn = config.get("is_gunicorn", False)
if is_gunicorn:
# Note: We need to perform monkey patching in the worker. If we do it in
# the master process (gunicorn_config.py), it breaks tons of t... | https://github.com/StackStorm/st2/issues/4254 | 2018-07-19 18:31:46,668 INFO [-] f590ed84-3e54-4634-89f2-120eb3f956e5 - POST /tokens with query={} (remote_addr='127.0.0.1',method='POST',request_id='f590ed84-3e54-4634-89f2-120eb3f956e5',query={},path='/tokens')
2018-07-19 18:31:46,669 DEBUG [-] Recieved call with WebOb: POST /tokens HTTP/1.0
Accept: */*
Authorization... | ValidationError |
def validate_config_against_schema(
config_schema, config_object, config_path, pack_name=None
):
"""
Validate provided config dictionary against the provided config schema
dictionary.
"""
# NOTE: Lazy improt to avoid performance overhead of importing this module when it's not used
import jso... | def validate_config_against_schema(
config_schema, config_object, config_path, pack_name=None
):
"""
Validate provided config dictionary against the provided config schema
dictionary.
"""
# NOTE: Lazy improt to avoid performance overhead of importing this module when it's not used
import jso... | https://github.com/StackStorm/st2/issues/4166 | Traceback (most recent call last):
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/router.py", line 472, in __call__
resp = func(**kw)
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2api/controllers/v1/pack_configs.py", line 107, in put
config_api.validate(validate_against_schema=Tr... | TypeError |
def post(self, api_key_api, requester_user):
"""
Create a new entry.
"""
permission_type = PermissionType.API_KEY_CREATE
rbac_utils.assert_user_has_resource_api_permission(
user_db=requester_user,
resource_api=api_key_api,
permission_type=permission_type,
)
api_key_... | def post(self, api_key_api, requester_user):
"""
Create a new entry.
"""
permission_type = PermissionType.API_KEY_CREATE
rbac_utils.assert_user_has_resource_api_permission(
user_db=requester_user,
resource_api=api_key_api,
permission_type=permission_type,
)
api_key_... | https://github.com/StackStorm/st2/issues/3578 | 2017-07-18 05:36:03,099 140399285519696 ERROR router [-] Failed to call controller function "post" for operation "st2api.controllers.v1.auth:api_key_controller.post": 'NoneType' object has no attribute 'name'
Traceback (most recent call last):
File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/router... | AttributeError |
def _eval_repo_url(repo_url):
"""Allow passing short GitHub style URLs"""
if not repo_url:
raise Exception("No valid repo_url provided or could be inferred.")
if repo_url.startswith("file://"):
return repo_url
else:
if len(repo_url.split("/")) == 2 and "git@" not in repo_url:
... | def _eval_repo_url(repo_url):
"""Allow passing short GitHub style URLs"""
if not repo_url:
raise Exception("No valid repo_url provided or could be inferred.")
if repo_url.startswith("file://"):
return repo_url
else:
if len(repo_url.split("/")) == 2 and "git@" not in repo_url:
... | https://github.com/StackStorm/st2/issues/3534 | ubuntu@st2-local:~$ st2 pack install ssh://<user@host>/AutomationStackStorm
[ failed ] download pack
id: 595525a6a5fb1d0755645a1e
action.ref: packs.install
parameters:
packs:
- ssh://<user@host>/AutomationStackStorm
status: failed
error: Traceback (most recent call last):
File "/opt/stackstorm/st2/local/l... | git.exc.GitCommandError |
def post(self, pack_search_request):
if hasattr(pack_search_request, "query"):
packs = packs_service.search_pack_index(
pack_search_request.query, case_sensitive=False
)
return [PackAPI(**pack) for pack in packs]
else:
pack = packs_service.get_pack_from_index(pack_sea... | def post(self, pack_search_request):
if hasattr(pack_search_request, "query"):
packs = packs_service.search_pack_index(
pack_search_request.query, case_sensitive=False
)
return [PackAPI(**pack) for pack in packs]
else:
pack = packs_service.get_pack_from_index(pack_sea... | https://github.com/StackStorm/st2/issues/3377 | (virtualenv)vagrant@st2dev /m/s/s/st2 ❯❯❯ st2 --debug pack show core ⏎ master ✭ ◼
# -------- begin 139705409745296 request ----------
curl -X POST -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-request... | OperationFailureException |
def __init__(self, tables, shift_zeros=False):
if isinstance(tables, np.ndarray):
sp = tables.shape
if (len(sp) != 3) or (sp[0] != 2) or (sp[1] != 2):
raise ValueError("If an ndarray, argument must be 2x2xn")
table = tables * 1.0 # use atleast float dtype
else:
if an... | def __init__(self, tables, shift_zeros=False):
if isinstance(tables, np.ndarray):
sp = tables.shape
if (len(sp) != 3) or (sp[0] != 2) or (sp[1] != 2):
raise ValueError("If an ndarray, argument must be 2x2xn")
table = tables
else:
if any([np.asarray(x).shape != (2, 2) ... | https://github.com/statsmodels/statsmodels/issues/6670 | st.summary()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-49-bf722b7cb8e1> in <module>
----> 1 st.summary()
...\statsmodels\stats\contingency_tables.py in summary(self, alpha, float_format, method)... | TypeError |
def __init__(
self,
endog,
exog,
offset=None,
exposure=None,
missing="none",
check_rank=True,
**kwargs,
):
super().__init__(
endog,
exog,
check_rank,
missing=missing,
offset=offset,
exposure=exposure,
**kwargs,
)
if expo... | def __init__(
self,
endog,
exog,
offset=None,
exposure=None,
missing="none",
check_rank=True,
**kwargs,
):
super().__init__(
endog,
exog,
check_rank,
missing=missing,
offset=offset,
exposure=exposure,
**kwargs,
)
if expo... | https://github.com/statsmodels/statsmodels/issues/7015 | ValueError Traceback (most recent call last)
<ipython-input-8-623bd13d22ad> in <module>
----> 1 Pmodel2 = sm.Poisson(endog=y_mat, exog=X_mat, exposure=data['PERSONS']).fit() # this gives an error
~/miniconda3/envs/stdsci/lib/python3.6/site-packages/statsmodels/discrete/discrete_model.py ... | ValueError |
def _wrap_data(self, data, start_idx, end_idx, names=None):
# TODO: check if this is reasonable for statespace
# squeezing data: data may be:
# - m x n: m dates, n simulations -> squeeze does nothing
# - m x 1: m dates, 1 simulation -> squeeze removes last dimension
# - 1 x n: don't squeeze, already... | def _wrap_data(self, data, start_idx, end_idx, names=None):
# TODO: check if this is reasonable for statespace
# squeezing data: data may be:
# - m x n: m dates, n simulations -> squeeze does nothing
# - m x 1: m dates, 1 simulation -> squeeze removes last dimension
# - 1 x n: don't squeeze, already... | https://github.com/statsmodels/statsmodels/issues/7175 | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
%matplotlib inline
from statsmodels.tsa.exponential_smoothing.ets import ETSModel
austourists_data = [
30.05251300, 19.14849600, 25.31769200, 27.59143700,
32.07645600, 23.48796100, 28.47594000, 35.12375300,
36.83848500, 25.00701700, 30.72223000, 28... | TypeError |
def _autolag(
mod,
endog,
exog,
startlag,
maxlag,
method,
modargs=(),
fitargs=(),
regresults=False,
):
"""
Returns the results for the lag length that maximizes the info criterion.
Parameters
----------
mod : Model class
Model estimator class
endog : ... | def _autolag(
mod,
endog,
exog,
startlag,
maxlag,
method,
modargs=(),
fitargs=(),
regresults=False,
):
"""
Returns the results for the lag length that maximizes the info criterion.
Parameters
----------
mod : Model class
Model estimator class
endog : ... | https://github.com/statsmodels/statsmodels/issues/7014 | coint(
arr[:sdp, i, ch],
arr[:sdp, j, ch],
trend='c', method='aeg', maxlag=0, autolag='t-stat', return_results=False)
Traceback (most recent call last):
File "E:\projects\Jan Medical\software\corr_surface\segment_2_34.py", line 961, in <module>
main()
File "E:\projects\Jan Medical\software\corr_surface\segment_2_34.py... | nboundLocalError |
def pacf(x, nlags=None, method="ywadjusted", alpha=None):
"""
Partial autocorrelation estimate.
Parameters
----------
x : array_like
Observations of time series for which pacf is calculated.
nlags : int
The largest lag for which the pacf is returned. The default
is curre... | def pacf(x, nlags=None, method="ywadjusted", alpha=None):
"""
Partial autocorrelation estimate.
Parameters
----------
x : array_like
Observations of time series for which pacf is calculated.
nlags : int
The largest lag for which the pacf is returned. The default
is curre... | https://github.com/statsmodels/statsmodels/issues/7014 | coint(
arr[:sdp, i, ch],
arr[:sdp, j, ch],
trend='c', method='aeg', maxlag=0, autolag='t-stat', return_results=False)
Traceback (most recent call last):
File "E:\projects\Jan Medical\software\corr_surface\segment_2_34.py", line 961, in <module>
main()
File "E:\projects\Jan Medical\software\corr_surface\segment_2_34.py... | nboundLocalError |
def plot_diagnostics(
self, variable=0, lags=10, fig=None, figsize=None, truncate_endog_names=24
):
"""
Diagnostic plots for standardized residuals of one endogenous variable
Parameters
----------
variable : int, optional
Index of the endogenous variable for which the diagnostic plots
... | def plot_diagnostics(
self, variable=0, lags=10, fig=None, figsize=None, truncate_endog_names=24
):
"""
Diagnostic plots for standardized residuals of one endogenous variable
Parameters
----------
variable : int, optional
Index of the endogenous variable for which the diagnostic plots
... | https://github.com/statsmodels/statsmodels/issues/6173 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-312-be24090d9a69> in <module>
1 mod = sm.tsa.statespace.SARIMAX(np.random.normal(size=10), order=(10, 0, 0))
2 results = mod.fit()
----> 3 results.plot_d... | ValueError |
def acf(
x,
adjusted=False,
nlags=None,
qstat=False,
fft=None,
alpha=None,
missing="none",
):
"""
Calculate the autocorrelation function.
Parameters
----------
x : array_like
The time series data.
adjusted : bool, default False
If True, then denominator... | def acf(
x,
adjusted=False,
nlags=None,
qstat=False,
fft=None,
alpha=None,
missing="none",
):
"""
Calculate the autocorrelation function.
Parameters
----------
x : array_like
The time series data.
adjusted : bool, default False
If True, then denominator... | https://github.com/statsmodels/statsmodels/issues/6173 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-312-be24090d9a69> in <module>
1 mod = sm.tsa.statespace.SARIMAX(np.random.normal(size=10), order=(10, 0, 0))
2 results = mod.fit()
----> 3 results.plot_d... | ValueError |
def gls(
endog,
exog=None,
order=(0, 0, 0),
seasonal_order=(0, 0, 0, 0),
include_constant=None,
n_iter=None,
max_iter=50,
tolerance=1e-8,
arma_estimator="innovations_mle",
arma_estimator_kwargs=None,
):
"""
Estimate ARMAX parameters by GLS.
Parameters
----------
... | def gls(
endog,
exog=None,
order=(0, 0, 0),
seasonal_order=(0, 0, 0, 0),
include_constant=None,
n_iter=None,
max_iter=50,
tolerance=1e-8,
arma_estimator="innovations_mle",
arma_estimator_kwargs=None,
):
"""
Estimate ARMAX parameters by GLS.
Parameters
----------
... | https://github.com/statsmodels/statsmodels/issues/6540 | /my_path/test.py
/my_path2/anaconda3/envs/vision/lib/python3.7/site-packages/statsmodels/tsa/innovations/arma_innovations.py:83: RuntimeWarning: invalid value encountered in sqrt
v05 = v**0.5
Traceback (most recent call last):
File "/my_path/test.py", line 19, in <module>
cov_type="none")
File "/my_path2/anaconda3/envs... | statsmodels.tools.sm_exceptions.MissingDataError |
def arma_acovf(ar, ma, nobs=10, sigma2=1, dtype=None):
"""
Theoretical autocovariances of stationary ARMA processes
Parameters
----------
ar : array_like, 1d
The coefficients for autoregressive lag polynomial, including zero lag.
ma : array_like, 1d
The coefficients for moving-a... | def arma_acovf(ar, ma, nobs=10, sigma2=1, dtype=None):
"""
Theoretical autocovariance function of ARMA process.
Parameters
----------
ar : array_like, 1d
The coefficients for autoregressive lag polynomial, including zero lag.
ma : array_like, 1d
The coefficients for moving-avera... | https://github.com/statsmodels/statsmodels/issues/6540 | /my_path/test.py
/my_path2/anaconda3/envs/vision/lib/python3.7/site-packages/statsmodels/tsa/innovations/arma_innovations.py:83: RuntimeWarning: invalid value encountered in sqrt
v05 = v**0.5
Traceback (most recent call last):
File "/my_path/test.py", line 19, in <module>
cov_type="none")
File "/my_path2/anaconda3/envs... | statsmodels.tools.sm_exceptions.MissingDataError |
def arma_innovations(
endog, ar_params=None, ma_params=None, sigma2=1, normalize=False, prefix=None
):
"""
Compute innovations using a given ARMA process.
Parameters
----------
endog : ndarray
The observed time-series process, may be univariate or multivariate.
ar_params : ndarray, ... | def arma_innovations(
endog, ar_params=None, ma_params=None, sigma2=1, normalize=False, prefix=None
):
"""
Compute innovations using a given ARMA process.
Parameters
----------
endog : ndarray
The observed time-series process, may be univariate or multivariate.
ar_params : ndarray, ... | https://github.com/statsmodels/statsmodels/issues/6540 | /my_path/test.py
/my_path2/anaconda3/envs/vision/lib/python3.7/site-packages/statsmodels/tsa/innovations/arma_innovations.py:83: RuntimeWarning: invalid value encountered in sqrt
v05 = v**0.5
Traceback (most recent call last):
File "/my_path/test.py", line 19, in <module>
cov_type="none")
File "/my_path2/anaconda3/envs... | statsmodels.tools.sm_exceptions.MissingDataError |
def _select_sigma(x, percentile=25):
"""
Returns the smaller of std(X, ddof=1) or normalized IQR(X) over axis 0.
References
----------
Silverman (1986) p.47
"""
# normalize = norm.ppf(.75) - norm.ppf(.25)
normalize = 1.349
IQR = (scoreatpercentile(x, 75) - scoreatpercentile(x, 25)) ... | def _select_sigma(X):
"""
Returns the smaller of std(X, ddof=1) or normalized IQR(X) over axis 0.
References
----------
Silverman (1986) p.47
"""
# normalize = norm.ppf(.75) - norm.ppf(.25)
normalize = 1.349
# IQR = np.subtract.reduce(percentile(X, [75,25],
# ... | https://github.com/statsmodels/statsmodels/issues/6679 | Numpy: 1.18.3
Statsmodels: 0.11.1
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/statsmodels/nonparametric/kde.py", line 451, in kdensityfft
bw = float(bw)
ValueError: could not convert string to float: 'normal_reference'
During handling of the above exception, another exception occur... | ValueError |
def select_bandwidth(x, bw, kernel):
"""
Selects bandwidth for a selection rule bw
this is a wrapper around existing bandwidth selection rules
Parameters
----------
x : array_like
Array for which to get the bandwidth
bw : str
name of bandwidth selection rule, currently supp... | def select_bandwidth(x, bw, kernel):
"""
Selects bandwidth for a selection rule bw
this is a wrapper around existing bandwidth selection rules
Parameters
----------
x : array_like
Array for which to get the bandwidth
bw : str
name of bandwidth selection rule, currently supp... | https://github.com/statsmodels/statsmodels/issues/6679 | Numpy: 1.18.3
Statsmodels: 0.11.1
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/statsmodels/nonparametric/kde.py", line 451, in kdensityfft
bw = float(bw)
ValueError: could not convert string to float: 'normal_reference'
During handling of the above exception, another exception occur... | ValueError |
def __init__(self, endog):
self.endog = array_like(endog, "endog", ndim=1, contiguous=True)
| def __init__(self, endog):
self.endog = np.asarray(endog)
| https://github.com/statsmodels/statsmodels/issues/1915 | Traceback (most recent call last):
File "./statsmodels_01.py", line 40, in <module>
kde_.fit()
File "/home/kian/.local/lib/python2.7/site-packages/statsmodels/nonparametric/kde.py", line 142, in fit
clip=clip, cut=cut)
File "/home/kian/.local/lib/python2.7/site-packages/statsmodels/nonparametric/kde.py", line 484, in k... | ValueError |
def __init__(self, x, kernel=None):
x = array_like(x, "x", maxdim=2, contiguous=True)
if x.ndim == 1:
x = x[:, None]
nobs, n_series = x.shape
if kernel is None:
kernel = kernels.Gaussian() # no meaningful bandwidth yet
if n_series > 1:
if isinstance(kernel, kernels.Custom... | def __init__(self, x, kernel=None):
x = np.asarray(x)
if x.ndim == 1:
x = x[:, None]
nobs, n_series = x.shape
if kernel is None:
kernel = kernels.Gaussian() # no meaningful bandwidth yet
if n_series > 1:
if isinstance(kernel, kernels.CustomKernel):
kernel = ke... | https://github.com/statsmodels/statsmodels/issues/1915 | Traceback (most recent call last):
File "./statsmodels_01.py", line 40, in <module>
kde_.fit()
File "/home/kian/.local/lib/python2.7/site-packages/statsmodels/nonparametric/kde.py", line 142, in fit
clip=clip, cut=cut)
File "/home/kian/.local/lib/python2.7/site-packages/statsmodels/nonparametric/kde.py", line 484, in k... | ValueError |
def conf_int(self, method="endpoint", alpha=0.05, **kwds):
# TODO: this performs metadata wrapping, and that should be handled
# by attach_* methods. However, they do not currently support
# this use case.
conf_int = super(PredictionResults, self).conf_int(method, alpha, **kwds)
# Creat... | def conf_int(self, method="endpoint", alpha=0.05, **kwds):
# TODO: this performs metadata wrapping, and that should be handled
# by attach_* methods. However, they do not currently support
# this use case.
conf_int = super(PredictionResults, self).conf_int(method, alpha, **kwds)
# Creat... | https://github.com/statsmodels/statsmodels/issues/6296 | Traceback (most recent call last):
File "/home/user/Projects/subfolder/my_project/test1.py", line 42, in <module>
pred_ci = pred_res.conf_int(alpha=0.01)
File "/home/user/Programs/anaconda3/envs/vision/lib/python3.7/site-packages/statsmodels/tsa/statespace/mlemodel.py", line 3707, in conf_int
names = (['lower %s' % nam... | TypeError |
def __init__(
self,
endog,
exog=None,
order=(0, 0, 0),
seasonal_order=(0, 0, 0, 0),
trend=None,
enforce_stationarity=True,
enforce_invertibility=True,
concentrate_scale=False,
dates=None,
freq=None,
missing="none",
):
# Default for trend
# 'c' if there is no integ... | def __init__(
self,
endog,
exog=None,
order=(0, 0, 0),
seasonal_order=(0, 0, 0, 0),
trend=None,
enforce_stationarity=True,
enforce_invertibility=True,
concentrate_scale=False,
dates=None,
freq=None,
missing="none",
):
# Default for trend
# 'c' if there is no integ... | https://github.com/statsmodels/statsmodels/issues/6244 | c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:914: RuntimeWarning: overflow encountered in square
params_variance = (residuals[k_params_ma:]**2).mean()
c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:976: UserWarning: Non-stationary starting autoregressive parameters found. Using zeros as starting p... | IndexError |
def fit(
self,
start_params=None,
transformed=True,
includes_fixed=False,
method=None,
method_kwargs=None,
gls=None,
gls_kwargs=None,
cov_type=None,
cov_kwds=None,
return_params=False,
low_memory=False,
):
"""
Fit (estimate) the parameters of the model.
Param... | def fit(
self,
start_params=None,
transformed=True,
includes_fixed=False,
method=None,
method_kwargs=None,
gls=None,
gls_kwargs=None,
cov_type=None,
cov_kwds=None,
return_params=False,
low_memory=False,
):
"""
Fit (estimate) the parameters of the model.
Param... | https://github.com/statsmodels/statsmodels/issues/6244 | c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:914: RuntimeWarning: overflow encountered in square
params_variance = (residuals[k_params_ma:]**2).mean()
c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:976: UserWarning: Non-stationary starting autoregressive parameters found. Using zeros as starting p... | IndexError |
def __init__(
self,
endog=None,
exog=None,
order=None,
seasonal_order=None,
ar_order=None,
diff=None,
ma_order=None,
seasonal_ar_order=None,
seasonal_diff=None,
seasonal_ma_order=None,
seasonal_periods=None,
trend=None,
enforce_stationarity=None,
enforce_inver... | def __init__(
self,
endog=None,
exog=None,
order=None,
seasonal_order=None,
ar_order=None,
diff=None,
ma_order=None,
seasonal_ar_order=None,
seasonal_diff=None,
seasonal_ma_order=None,
seasonal_periods=None,
trend=None,
enforce_stationarity=None,
enforce_inver... | https://github.com/statsmodels/statsmodels/issues/6244 | c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:914: RuntimeWarning: overflow encountered in square
params_variance = (residuals[k_params_ma:]**2).mean()
c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:976: UserWarning: Non-stationary starting autoregressive parameters found. Using zeros as starting p... | IndexError |
def standardize_lag_order(order, title=None):
"""
Standardize lag order input.
Parameters
----------
order : int or array_like
Maximum lag order (if integer) or iterable of specific lag orders.
title : str, optional
Description of the order (e.g. "autoregressive") to use in erro... | def standardize_lag_order(order, title=None):
"""
Standardize lag order input.
Parameters
----------
order : int or array_like
Maximum lag order (if integer) or iterable of specific lag orders.
title : str, optional
Description of the order (e.g. "autoregressive") to use in erro... | https://github.com/statsmodels/statsmodels/issues/6244 | c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:914: RuntimeWarning: overflow encountered in square
params_variance = (residuals[k_params_ma:]**2).mean()
c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:976: UserWarning: Non-stationary starting autoregressive parameters found. Using zeros as starting p... | IndexError |
def __init__(
self,
endog,
exog=None,
order=(1, 0, 0),
seasonal_order=(0, 0, 0, 0),
trend=None,
measurement_error=False,
time_varying_regression=False,
mle_regression=True,
simple_differencing=False,
enforce_stationarity=True,
enforce_invertibility=True,
hamilton_repr... | def __init__(
self,
endog,
exog=None,
order=(1, 0, 0),
seasonal_order=(0, 0, 0, 0),
trend=None,
measurement_error=False,
time_varying_regression=False,
mle_regression=True,
simple_differencing=False,
enforce_stationarity=True,
enforce_invertibility=True,
hamilton_repr... | https://github.com/statsmodels/statsmodels/issues/6244 | c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:914: RuntimeWarning: overflow encountered in square
params_variance = (residuals[k_params_ma:]**2).mean()
c:\git\statsmodels\statsmodels\tsa\statespace\sarimax.py:976: UserWarning: Non-stationary starting autoregressive parameters found. Using zeros as starting p... | IndexError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.