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 iter_native(self, result, no_ack=True, **kwargs):
self._ensure_not_eager()
results = result.results
if not results:
raise StopIteration()
# we tell the result consumer to put consumed results
# into these buckets.
bucket = deque()
for node in results:
if not hasattr(nod... | def iter_native(self, result, no_ack=True, **kwargs):
self._ensure_not_eager()
results = result.results
if not results:
raise StopIteration()
# we tell the result consumer to put consumed results
# into these buckets.
bucket = deque()
for node in results:
if node._cache:
... | https://github.com/celery/celery/issues/5496 | Steps to Reproduce
Minimally Reproducible Test Case
from celery import group, chain
from tasks import task as t
# failing sequence
task = group([ t.si(),t.si(), chain( t.si(), group([ t.si(), t.si()]))])
# working sequence
task = group([ t.si(),t.si(), chain( t.si(), group([ t.si(), t.si()]), t.si())])
async_res... | AttributeError |
def join_native(
self,
timeout=None,
propagate=True,
interval=0.5,
callback=None,
no_ack=True,
on_message=None,
on_interval=None,
disable_sync_subtasks=True,
):
"""Backend optimized version of :meth:`join`.
.. versionadded:: 2.2
Note that this does not support collectin... | def join_native(
self,
timeout=None,
propagate=True,
interval=0.5,
callback=None,
no_ack=True,
on_message=None,
on_interval=None,
disable_sync_subtasks=True,
):
"""Backend optimized version of :meth:`join`.
.. versionadded:: 2.2
Note that this does not support collectin... | https://github.com/celery/celery/issues/5496 | Steps to Reproduce
Minimally Reproducible Test Case
from celery import group, chain
from tasks import task as t
# failing sequence
task = group([ t.si(),t.si(), chain( t.si(), group([ t.si(), t.si()]))])
# working sequence
task = group([ t.si(),t.si(), chain( t.si(), group([ t.si(), t.si()]), t.si())])
async_res... | AttributeError |
def get(
self,
timeout=None,
propagate=True,
interval=0.5,
no_ack=True,
follow_parents=True,
callback=None,
on_message=None,
on_interval=None,
disable_sync_subtasks=True,
EXCEPTION_STATES=states.EXCEPTION_STATES,
PROPAGATE_STATES=states.PROPAGATE_STATES,
):
"""Wait un... | def get(
self,
timeout=None,
propagate=True,
interval=0.5,
no_ack=True,
follow_parents=True,
callback=None,
on_message=None,
on_interval=None,
disable_sync_subtasks=True,
EXCEPTION_STATES=states.EXCEPTION_STATES,
PROPAGATE_STATES=states.PROPAGATE_STATES,
):
"""Wait un... | https://github.com/celery/celery/issues/3810 | Traceback (most recent call last):
File "test.py", line 15, in <module>
raise ex
celery.backends.base.RuntimeError: BLAH | celery.backends.base.RuntimeError |
def __call__(self, *args, **kwargs):
logger = get_logger(__name__)
handle_sigterm = lambda signum, frame: logger.info(
"SIGTERM received, waiting till the task finished"
)
signal.signal(signal.SIGTERM, handle_sigterm)
_task_stack.push(self)
self.push_request(args=args, kwargs=kwargs)
... | def __call__(self, *args, **kwargs):
_task_stack.push(self)
self.push_request(args=args, kwargs=kwargs)
try:
return self.run(*args, **kwargs)
finally:
self.pop_request()
_task_stack.pop()
| https://github.com/celery/celery/issues/2700 | Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/billiard/pool.py", line 1171, in mark_as_worker_lost
human_status(exitcode)),
WorkerLostError: Worker exited prematurely: signal 15 (SIGTERM). | WorkerLostError |
def register_with_event_loop(self, hub):
"""Register the async pool with the current event loop."""
self._result_handler.register_with_event_loop(hub)
self.handle_result_event = self._result_handler.handle_event
self._create_timelimit_handlers(hub)
self._create_process_handlers(hub)
self._create... | def register_with_event_loop(self, hub):
"""Register the async pool with the current event loop."""
self._result_handler.register_with_event_loop(hub)
self.handle_result_event = self._result_handler.handle_event
self._create_timelimit_handlers(hub)
self._create_process_handlers(hub)
self._create... | https://github.com/celery/celery/issues/4457 | [user] celery.worker.consumer.consumer WARNING 2017-12-18 00:38:27,078 consumer:
Connection to broker lost. Trying to re-establish the connection...
Traceback (most recent call last):
File "/home/user/.envs/user/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 320, in start
blueprint.start(self)
Fi... | OSError |
def on_process_alive(self, pid):
"""Called when receiving the :const:`WORKER_UP` message.
Marks the process as ready to receive work.
"""
try:
proc = next(w for w in self._pool if w.pid == pid)
except StopIteration:
return logger.warning("process with pid=%s already exited", pid)
... | def on_process_alive(self, pid):
"""Called when reciving the :const:`WORKER_UP` message.
Marks the process as ready to receive work.
"""
try:
proc = next(w for w in self._pool if w.pid == pid)
except StopIteration:
return logger.warning("process with pid=%s already exited", pid)
... | https://github.com/celery/celery/issues/4457 | [user] celery.worker.consumer.consumer WARNING 2017-12-18 00:38:27,078 consumer:
Connection to broker lost. Trying to re-establish the connection...
Traceback (most recent call last):
File "/home/user/.envs/user/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 320, in start
blueprint.start(self)
Fi... | OSError |
def update_state(self, task_id=None, state=None, meta=None, **kwargs):
"""Update task state.
Arguments:
task_id (str): Id of the task to update.
Defaults to the id of the current task.
state (str): New state.
meta (Dict): State meta-data.
"""
if task_id is None:
... | def update_state(self, task_id=None, state=None, meta=None, **kwargs):
"""Update task state.
Arguments:
task_id (str): Id of the task to update.
Defaults to the id of the current task.
state (str): New state.
meta (Dict): State meta-data.
"""
if task_id is None:
... | https://github.com/celery/celery/issues/5470 | Traceback (most recent call last):
worker_1_e608e69813d9 | File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 385, in trace_task
worker_1_e608e69813d9 | R = retval = fun(*args, **kwargs)
worker_1_e608e69813d9 | File "/data/alaya/api/common/celery_app.py", line 113, in __call__
worker_1_e608... | AttributeError |
def _call_task_errbacks(self, request, exc, traceback):
old_signature = []
for errback in request.errbacks:
errback = self.app.signature(errback)
if not errback._app:
# Ensure all signatures have an application
errback._app = self.app
try:
if (
... | def _call_task_errbacks(self, request, exc, traceback):
old_signature = []
for errback in request.errbacks:
errback = self.app.signature(errback)
if (
# Celery tasks type created with the @task decorator have
# the __header__ property, but Celery task created from
... | https://github.com/celery/celery/issues/4022 | # TaskProducer:
from celery import Signature
Signature(
'export.hello', args=['homer'],
link_error=Signature('msg.err', queue='msg')
).apply_async()
# ExportWorker:
[2017-05-09 00:14:53,458: INFO/MainProcess] Received task: export.hello[ad4ef3ea-06e8-4980-8d9c-91ae68c2305a]
[2017-05-09 00:14:53,506: INFO/PoolWorker-1]... | KeyError |
def link_error(self, sig):
try:
sig = sig.clone().set(immutable=True)
except AttributeError:
# See issue #5265. I don't use isinstance because current tests
# pass a Mock object as argument.
sig["immutable"] = True
sig = Signature.from_dict(sig)
return self.tasks[0].... | def link_error(self, sig):
sig = sig.clone().set(immutable=True)
return self.tasks[0].link_error(sig)
| https://github.com/celery/celery/issues/5265 | Traceback (most recent call last):
File "eggs/celery-4.2.1-py2.7.egg/celery/app/trace.py", line 439, in trace_task
parent_id=uuid, root_id=root_id,
File "eggs/celery-4.2.1-py2.7.egg/celery/canvas.py", line 1232, in apply_async
return self.run(tasks, body, args, task_id=task_id, **options)
File "eggs/celery-4.2.1-py2.7.... | AttributeError |
def setup_security(
self,
allowed_serializers=None,
key=None,
cert=None,
store=None,
digest=DEFAULT_SECURITY_DIGEST,
serializer="json",
):
"""Setup the message-signing serializer.
This will affect all application instances (a global operation).
Disables untrusted serializers an... | def setup_security(
self,
allowed_serializers=None,
key=None,
cert=None,
store=None,
digest="sha1",
serializer="json",
):
"""Setup the message-signing serializer.
This will affect all application instances (a global operation).
Disables untrusted serializers and if configured t... | https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def setup_security(
allowed_serializers=None,
key=None,
cert=None,
store=None,
digest=None,
serializer="json",
app=None,
):
"""See :meth:`@Celery.setup_security`."""
if app is None:
from celery import current_app
app = current_app._get_current_object()
_disable_... | def setup_security(
allowed_serializers=None,
key=None,
cert=None,
store=None,
digest="sha1",
serializer="json",
app=None,
):
"""See :meth:`@Celery.setup_security`."""
if app is None:
from celery import current_app
app = current_app._get_current_object()
_disabl... | https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def __init__(self, cert):
with reraise_errors("Invalid certificate: {0!r}", errors=(ValueError,)):
self._cert = load_pem_x509_certificate(
ensure_bytes(cert), backend=default_backend()
)
| def __init__(self, cert):
assert crypto is not None
with reraise_errors("Invalid certificate: {0!r}"):
self._cert = crypto.load_certificate(crypto.FILETYPE_PEM, cert)
| https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def has_expired(self):
"""Check if the certificate has expired."""
return datetime.datetime.now() > self._cert.not_valid_after
| def has_expired(self):
"""Check if the certificate has expired."""
return self._cert.has_expired()
| https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def get_serial_number(self):
"""Return the serial number in the certificate."""
return self._cert.serial_number
| def get_serial_number(self):
"""Return the serial number in the certificate."""
return bytes_to_str(self._cert.get_serial_number())
| https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def get_issuer(self):
"""Return issuer (CA) as a string."""
return " ".join(x.value for x in self._cert.issuer)
| def get_issuer(self):
"""Return issuer (CA) as a string."""
return " ".join(
bytes_to_str(x[1]) for x in self._cert.get_issuer().get_components()
)
| https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def verify(self, data, signature, digest):
"""Verify signature for string containing data."""
with reraise_errors("Bad signature: {0!r}"):
padd = padding.PSS(mgf=padding.MGF1(digest), salt_length=padding.PSS.MAX_LENGTH)
self.get_pubkey().verify(signature, ensure_bytes(data), padd, digest)
| def verify(self, data, signature, digest):
"""Verify signature for string containing data."""
with reraise_errors("Bad signature: {0!r}"):
crypto.verify(self._cert, signature, data, digest)
| https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def __init__(self, key, password=None):
with reraise_errors("Invalid private key: {0!r}", errors=(ValueError,)):
self._key = serialization.load_pem_private_key(
ensure_bytes(key), password=password, backend=default_backend()
)
| def __init__(self, key):
with reraise_errors("Invalid private key: {0!r}"):
self._key = crypto.load_privatekey(crypto.FILETYPE_PEM, key)
| https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def sign(self, data, digest):
"""Sign string containing data."""
with reraise_errors("Unable to sign data: {0!r}"):
padd = padding.PSS(mgf=padding.MGF1(digest), salt_length=padding.PSS.MAX_LENGTH)
return self._key.sign(ensure_bytes(data), padd, digest)
| def sign(self, data, digest):
"""Sign string containing data."""
with reraise_errors("Unable to sign data: {0!r}"):
return crypto.sign(self._key, ensure_bytes(data), digest)
| https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def __init__(
self,
key=None,
cert=None,
cert_store=None,
digest=DEFAULT_SECURITY_DIGEST,
serializer="json",
):
self._key = key
self._cert = cert
self._cert_store = cert_store
self._digest = get_digest_algorithm(digest)
self._serializer = serializer
| def __init__(
self, key=None, cert=None, cert_store=None, digest="sha1", serializer="json"
):
self._key = key
self._cert = cert
self._cert_store = cert_store
self._digest = bytes_if_py2(digest)
self._serializer = serializer
| https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def _unpack(self, payload, sep=str_to_bytes("\x00\x01")):
raw_payload = b64decode(ensure_bytes(payload))
first_sep = raw_payload.find(sep)
signer = raw_payload[:first_sep]
signer_cert = self._cert_store[signer]
# shift 3 bits right to get signature length
# 2048bit rsa key has a signature leng... | def _unpack(self, payload, sep=str_to_bytes("\x00\x01")):
raw_payload = b64decode(ensure_bytes(payload))
first_sep = raw_payload.find(sep)
signer = raw_payload[:first_sep]
signer_cert = self._cert_store[signer]
sig_len = signer_cert._cert.get_pubkey().bits() >> 3
signature = raw_payload[first_... | https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def register_auth(
key=None, cert=None, store=None, digest=DEFAULT_SECURITY_DIGEST, serializer="json"
):
"""Register security serializer."""
s = SecureSerializer(
key and PrivateKey(key),
cert and Certificate(cert),
store and FSCertStore(store),
digest,
serializer=ser... | def register_auth(key=None, cert=None, store=None, digest="sha1", serializer="json"):
"""Register security serializer."""
s = SecureSerializer(
key and PrivateKey(key),
cert and Certificate(cert),
store and FSCertStore(store),
digest=digest,
serializer=serializer,
)
... | https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def reraise_errors(msg="{0!r}", errors=None):
"""Context reraising crypto errors as :exc:`SecurityError`."""
errors = (cryptography.exceptions,) if errors is None else errors
try:
yield
except errors as exc:
reraise(SecurityError, SecurityError(msg.format(exc)), sys.exc_info()[2])
| def reraise_errors(msg="{0!r}", errors=None):
"""Context reraising crypto errors as :exc:`SecurityError`."""
assert crypto is not None
errors = (crypto.Error,) if errors is None else errors
try:
yield
except errors as exc:
reraise(SecurityError, SecurityError(msg.format(exc)), sys.ex... | https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def create_task_handler(self, promise=promise):
strategies = self.strategies
on_unknown_message = self.on_unknown_message
on_unknown_task = self.on_unknown_task
on_invalid_task = self.on_invalid_task
callbacks = self.on_task_message
call_soon = self.call_soon
def on_task_received(message):
... | def create_task_handler(self, promise=promise):
strategies = self.strategies
on_unknown_message = self.on_unknown_message
on_unknown_task = self.on_unknown_task
on_invalid_task = self.on_invalid_task
callbacks = self.on_task_message
call_soon = self.call_soon
def on_task_received(message):
... | https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def on_task_received(message):
# payload will only be set for v1 protocol, since v2
# will defer deserializing the message body to the pool.
payload = None
try:
type_ = message.headers["task"] # protocol v2
except TypeError:
return on_unknown_message(None, message)
except KeyErr... | def on_task_received(message):
# payload will only be set for v1 protocol, since v2
# will defer deserializing the message body to the pool.
payload = None
try:
type_ = message.headers["task"] # protocol v2
except TypeError:
return on_unknown_message(None, message)
except KeyErr... | https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def on_message(self, prepare, message):
_type = message.delivery_info["routing_key"]
# For redis when `fanout_patterns=False` (See Issue #1882)
if _type.split(".", 1)[0] == "task":
return
try:
handler = self.event_handlers[_type]
except KeyError:
pass
else:
retur... | def on_message(self, prepare, message):
_type = message.delivery_info["routing_key"]
# For redis when `fanout_patterns=False` (See Issue #1882)
if _type.split(".", 1)[0] == "task":
return
try:
handler = self.event_handlers[_type]
except KeyError:
pass
else:
retur... | https://github.com/celery/celery/issues/5056 | [2018-09-10 02:33:07,446: CRITICAL/MainProcess] Unrecoverable error: ContentDisallowed('Refusing to deserialize disabled content of type json (application/json)',)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr... | kombu.exceptions.ContentDisallowed |
def apply(self, args=(), kwargs={}, **options):
last, (fargs, fkwargs) = None, (args, kwargs)
for task in self.tasks:
res = task.clone(fargs, fkwargs).apply(
last and (last.get(),), **dict(self.options, **options)
)
res.parent, last, (fargs, fkwargs) = last, res, (None, None)... | def apply(self, args=(), kwargs={}, **options):
last, fargs = None, args
for task in self.tasks:
res = task.clone(fargs).apply(
last and (last.get(),), **dict(self.options, **options)
)
res.parent, last, fargs = last, res, None
return last
| https://github.com/celery/celery/issues/4951 | ―――――――――――――――――――――――――――――――――――――――――――――――――― test_chain.test_kwargs_apply ―――――――――――――――――――――――――――――――――――――――――――――――――――
self = <t.unit.tasks.test_canvas.test_chain instance at 0x7f2725208560>
def test_kwargs_apply(self):
x = chain(self.add.s(), self.add.s(8), self.add.s(10))
res = x.apply(kwargs={'x': 1, ... | TypeError |
def __init__(
self,
message,
on_ack=noop,
hostname=None,
eventer=None,
app=None,
connection_errors=None,
request_dict=None,
task=None,
on_reject=noop,
body=None,
headers=None,
decoded=False,
utc=True,
maybe_make_aware=maybe_make_aware,
maybe_iso8601=maybe_... | def __init__(
self,
message,
on_ack=noop,
hostname=None,
eventer=None,
app=None,
connection_errors=None,
request_dict=None,
task=None,
on_reject=noop,
body=None,
headers=None,
decoded=False,
utc=True,
maybe_make_aware=maybe_make_aware,
maybe_iso8601=maybe_... | https://github.com/celery/celery/issues/4906 | [2018-07-16 06:09:46,229: CRITICAL/MainProcess] Unrecoverable error: TypeError("'NoneType' object is not iterable",)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/celery/worker/worker.py", line 205, in start
self.blueprint.start(self)
File "/usr/lib/python2.7/site-packages/celery/bootsteps.p... | TypeError |
def exception_to_python(self, exc):
"""Convert serialized exception to Python exception."""
if exc:
if not isinstance(exc, BaseException):
exc_module = exc.get("exc_module")
if exc_module is None:
cls = create_exception_cls(from_utf8(exc["exc_type"]), __name__)
... | def exception_to_python(self, exc):
"""Convert serialized exception to Python exception."""
if exc:
if not isinstance(exc, BaseException):
exc_module = exc.get("exc_module")
if exc_module is None:
cls = create_exception_cls(from_utf8(exc["exc_type"]), __name__)
... | https://github.com/celery/celery/issues/4835 | Jun 21 01:23:24 netdocker1-eastus2 daemon INFO 94e57cb12059[92630]: Traceback (most recent call last):
Jun 21 01:23:24 netdocker1-eastus2 daemon INFO 94e57cb12059[92630]: File "/usr/local/lib/python3.5/dist-packages/tornado/web.py", line 1541, in _execute
Jun 21 01:23:24 netdocker1-eastus2 daemon INFO 94e57... | KeyError |
def __eq__(self, other):
if isinstance(other, GroupResult):
return (
other.id == self.id
and other.results == self.results
and other.parent == self.parent
)
elif isinstance(other, string_t):
return other == self.id
return NotImplemented
| def __eq__(self, other):
if isinstance(other, GroupResult):
return (
other.id == self.id
and other.results == self.results
and other.parent == self.parent
)
return NotImplemented
| https://github.com/celery/celery/issues/4739 | Traceback (most recent call last):
File "/Users/user/.pyenv/versions/3.6.1/envs/3.6.1-celery-poc/lib/python3.6/site-packages/kombu/utils/objects.py", line 42, in __get__
return obj.__dict__[self.__name__]
KeyError: 'graph'
During handling of the above exception, another exception occurred:
Traceback (most recent call... | KeyError |
def __new__(cls, *tasks, **kwargs):
# This forces `chain(X, Y, Z)` to work the same way as `X | Y | Z`
if not kwargs and tasks:
if len(tasks) != 1 or is_list(tasks[0]):
tasks = tasks[0] if len(tasks) == 1 else tasks
return reduce(operator.or_, tasks)
return super(chain, cls).... | def __new__(cls, *tasks, **kwargs):
# This forces `chain(X, Y, Z)` to work the same way as `X | Y | Z`
if not kwargs and tasks:
if len(tasks) == 1 and is_list(tasks[0]):
# ensure chain(generator_expression) works.
tasks = tasks[0]
return reduce(operator.or_, tasks)
re... | https://github.com/celery/celery/issues/4498 | (celery) ➜ myapp git:(master) ./manage.py test_cmd
Traceback (most recent call last):
File "./manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/Users/admin/Envs/celery/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
Fil... | TypeError |
def as_task_v2(
self,
task_id,
name,
args=None,
kwargs=None,
countdown=None,
eta=None,
group_id=None,
expires=None,
retries=0,
chord=None,
callbacks=None,
errbacks=None,
reply_to=None,
time_limit=None,
soft_time_limit=None,
create_sent_event=False,
... | def as_task_v2(
self,
task_id,
name,
args=None,
kwargs=None,
countdown=None,
eta=None,
group_id=None,
expires=None,
retries=0,
chord=None,
callbacks=None,
errbacks=None,
reply_to=None,
time_limit=None,
soft_time_limit=None,
create_sent_event=False,
... | https://github.com/celery/celery/issues/4560 | [2018-02-26 16:29:44,350: INFO/ForkPoolWorker-5] Task tasks.add[4ecc6d45-40cc-40bc-ba79-b7efad956383] succeeded in 0.00307657103986s: 3
[2018-02-26 16:29:44,351: INFO/ForkPoolWorker-7] Task celery.chord_unlock[d17aa171-1b48-49b0-bcfa-bf961c65d0ea] retry: Retry in 1s
[2018-02-26 16:29:44,352: INFO/MainProcess] Received ... | AttributeError |
def _call_task_errbacks(self, request, exc, traceback):
old_signature = []
for errback in request.errbacks:
errback = self.app.signature(errback)
if (
# workaround to support tasks with bind=True executed as
# link errors. Otherwise retries can't be used
not i... | def _call_task_errbacks(self, request, exc, traceback):
old_signature = []
for errback in request.errbacks:
errback = self.app.signature(errback)
if arity_greater(errback.type.__header__, 1):
errback(request, exc, traceback)
else:
old_signature.append(errback)
... | https://github.com/celery/celery/issues/3723 | [2016-12-28 07:36:12,692: INFO/MainProcess] Received task: raise_exception[b10b8451-3f4d-4cf0-b4b0-f964105cf849]
[2016-12-28 07:36:12,847: INFO/PoolWorker-5] /usr/local/lib/python2.7/dist-packages/celery/app/trace.py:542: RuntimeWarning: Exception raised outside body: TypeError('<functools.partial object at 0x7f74848df... | TypeError |
def _index(self, id, body, **kwargs):
return self.server.index(
index=self.index, doc_type=self.doc_type, body=body, **kwargs
)
| def _index(self, id, body, **kwargs):
return self.server.index(index=self.index, doc_type=self.doc_type, **kwargs)
| https://github.com/celery/celery/issues/3556 | [2016-11-07 12:16:12,380: ERROR/MainProcess] Pool callback raised exception: TypeError("index() missing 1 required positional argument: 'body'",)
Traceback (most recent call last):
File "project/lib/python3.5/site-packages/billiard/pool.py", line 1748, in safe_apply_callback
fun(*args, **kwargs)
File "project/lib/pytho... | TypeError |
def __or__(self, other):
# These could be implemented in each individual class,
# I'm sure, but for now we have this.
if isinstance(self, group):
if isinstance(other, group):
# group() | group() -> single group
return group(itertools.chain(self.tasks, other.tasks), app=self.a... | def __or__(self, other):
# These could be implemented in each individual class,
# I'm sure, but for now we have this.
if isinstance(other, chord) and len(other.tasks) == 1:
# chord with one header -> header[0] | body
other = other.tasks[0] | other.body
if isinstance(self, group):
... | https://github.com/celery/celery/issues/3885 | Traceback (most recent call last):
File "<console>", line 6, in <module>
File "/home/maksym/projects/python_ve/lib/python3.4/site-packages/celery/canvas.py", line 182, in delay
return self.apply_async(partial_args, partial_kwargs)
File "/home/maksym/projects/python_ve/lib/python3.4/site-packages/celery/canvas.py", line... | KeyError |
def apply_async(
self,
args=(),
kwargs={},
task_id=None,
producer=None,
publisher=None,
connection=None,
router=None,
result_cls=None,
**options,
):
kwargs = kwargs or {}
args = tuple(args) + tuple(self.args) if args and not self.immutable else self.args
body = kwargs... | def apply_async(
self,
args=(),
kwargs={},
task_id=None,
producer=None,
publisher=None,
connection=None,
router=None,
result_cls=None,
**options,
):
kwargs = kwargs or {}
args = tuple(args) + tuple(self.args) if args and not self.immutable else self.args
body = kwargs... | https://github.com/celery/celery/issues/3885 | Traceback (most recent call last):
File "<console>", line 6, in <module>
File "/home/maksym/projects/python_ve/lib/python3.4/site-packages/celery/canvas.py", line 182, in delay
return self.apply_async(partial_args, partial_kwargs)
File "/home/maksym/projects/python_ve/lib/python3.4/site-packages/celery/canvas.py", line... | KeyError |
def run(
self,
header,
body,
partial_args,
app=None,
interval=None,
countdown=1,
max_retries=None,
eager=False,
task_id=None,
**options,
):
app = app or self._get_app(body)
group_id = header.options.get("task_id") or uuid()
root_id = body.options.get("root_id")
... | def run(
self,
header,
body,
partial_args,
app=None,
interval=None,
countdown=1,
max_retries=None,
eager=False,
task_id=None,
**options,
):
app = app or self._get_app(body)
group_id = header.options.get("task_id") or uuid()
root_id = body.options.get("root_id")
... | https://github.com/celery/celery/issues/3885 | Traceback (most recent call last):
File "<console>", line 6, in <module>
File "/home/maksym/projects/python_ve/lib/python3.4/site-packages/celery/canvas.py", line 182, in delay
return self.apply_async(partial_args, partial_kwargs)
File "/home/maksym/projects/python_ve/lib/python3.4/site-packages/celery/canvas.py", line... | KeyError |
def get(
self,
timeout=None,
propagate=True,
interval=0.5,
callback=None,
no_ack=True,
on_message=None,
disable_sync_subtasks=True,
on_interval=None,
):
"""See :meth:`join`.
This is here for API compatibility with :class:`AsyncResult`,
in addition it uses :meth:`join_nat... | def get(
self,
timeout=None,
propagate=True,
interval=0.5,
callback=None,
no_ack=True,
on_message=None,
disable_sync_subtasks=True,
):
"""See :meth:`join`.
This is here for API compatibility with :class:`AsyncResult`,
in addition it uses :meth:`join_native` if available for ... | https://github.com/celery/celery/issues/4274 | ERROR:celery.app.builtins:Chord '70cb9fbe-4843-49ba-879e-6ffd76d63226' raised: TypeError("get() got an unexpected keyword argument 'on_interval'",)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/celery/app/builtins.py", line 80, in unlock_chord
ret = j(timeout=3.0, propagate=True)
File ... | TypeError |
def from_dict(cls, d, app=None):
options = d.copy()
args, options["kwargs"] = cls._unpack_args(**options["kwargs"])
return _upgrade(d, cls(*args, app=app, **options))
| def from_dict(cls, d, app=None):
args, d["kwargs"] = cls._unpack_args(**d["kwargs"])
return _upgrade(d, cls(*args, app=app, **d))
| https://github.com/celery/celery/issues/4223 | celery worker -A tasks --loglevel INFO -c 10
-------------- celery@rbn-box v4.1.0 (latentcall)
---- **** -----
--- * *** * -- Linux-4.8.0-51-generic-x86_64-with-Ubuntu-16.10-yakkety 2017-08-22 21:47:22
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> app: tasks:0x7f2bd97f73d0
- ** ---------- .> tra... | TypeError |
def _apply_callback(args, parser_error):
logger = get_logger()
patch_bin_path = None
if args.patch_bin is not None:
patch_bin_path = Path(args.patch_bin)
if not patch_bin_path.exists():
patch_bin_path = shutil.which(args.patch_bin)
if patch_bin_path:
p... | def _apply_callback(args, parser_error):
logger = get_logger()
patch_bin_path = None
if args.patch_bin is not None:
patch_bin_path = Path(args.patch_bin)
if not patch_bin_path.exists():
patch_bin_path = shutil.which(args.patch_bin)
if patch_bin_path:
p... | https://github.com/Eloston/ungoogled-chromium/issues/971 | ERROR: 18 files could not be pruned.
some errors
INFO: Applying patches from /nix/store/i2ky6jiphp98mlxcc7z7ayr7rgi20z8b-ungoogled-chromium-80.0.3987.149-1/patches
Traceback (most recent call last):
File "/nix/store/i2ky6jiphp98mlxcc7z7ayr7rgi20z8b-ungoogled-chromium-80.0.3987.149-1/utils/.patches.py-wrapped", line 236... | AttributeError |
def _apply_callback(args):
logger = get_logger()
for patch_dir in args.patches:
logger.info("Applying patches from %s", patch_dir)
apply_patches(
generate_patches_from_series(patch_dir, resolve=True),
args.target,
patch_bin_path=args.patch_bin,
)
| def _apply_callback(args):
logger = get_logger()
for patch_dir in args.patches:
logger.info("Applying patches from %s", patch_dir)
apply_patches(
generate_patches_from_series(patch_dir, resolve=True),
args.directory,
patch_bin_path=args.patch_bin,
)
| https://github.com/Eloston/ungoogled-chromium/issues/717 | [/tmp/download]: rm -rf *
[/tmp/download]: git clone https://github.com/Eloston/ungoogled-chromium.git
Cloning into 'ungoogled-chromium'...
remote: Enumerating objects: 189, done.
remote: Counting objects: 100% (189/189), done.
remote: Compressing objects: 100% (146/146), done.
remote: Total 11664 (delta 67), reused 12... | FileNotFoundError |
def main():
"""CLI Entrypoint"""
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
apply_parser = subparsers.add_parser(
"apply",
help="Applies patches (in GNU Quilt format) to the specified source tree",
)
apply_parser.add_argument(
"--patch-bin",
... | def main():
"""CLI Entrypoint"""
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
apply_parser = subparsers.add_parser(
"apply", help="Applies a config bundle's patches to the specified source tree"
)
apply_parser.add_argument(
"--patch-bin",
help=... | https://github.com/Eloston/ungoogled-chromium/issues/717 | [/tmp/download]: rm -rf *
[/tmp/download]: git clone https://github.com/Eloston/ungoogled-chromium.git
Cloning into 'ungoogled-chromium'...
remote: Enumerating objects: 189, done.
remote: Counting objects: 100% (189/189), done.
remote: Compressing objects: 100% (146/146), done.
remote: Total 11664 (delta 67), reused 12... | FileNotFoundError |
def main():
"""CLI Entrypoint"""
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--downloads-cache",
type=Path,
metavar="PATH",
default="../../downloads_cache",
help="The path to the downloads cache",
)
parser.add_argument(
... | def main():
"""CLI Entrypoint"""
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--downloads-cache",
type=Path,
metavar="PATH",
default="../../downloads_cache",
help="The path to the downloads cache",
)
parser.add_argument(
... | https://github.com/Eloston/ungoogled-chromium/issues/494 | osuse-leap-42-3-2018:/home/intika/chromlast/ungoogled-chromium/build/src # ./tools/gn/bootstrap/bootstrap.py -o out/Default/gn
ninja: Entering directory `/home/intika/chromlast/ungoogled-chromium/build/src/out/Release/gn_build'
[171/171] LINK gn
ERROR at //build/config/sysroot.gni:57:5: Assertion failed.
assert(
^-----... | subprocess.CalledProcessError |
def get_builder(*args, **kwargs):
"""Intelligently returns an appropriate builder instance"""
if sys.platform == "win32":
from .windows import WindowsBuilder
cls = WindowsBuilder
elif sys.platform == "darwin":
from .macos import MacOSBuilder
cls = MacOSBuilder
elif sys... | def get_builder(*args, **kwargs):
"""Intelligently returns an appropriate builder instance"""
if sys.platform == "win32":
from .windows import WindowsBuilder
cls = WindowsBuilder
elif sys.platform == "darwin":
from .macos import MacOSBuilder
cls = MacOSBuilder
elif sys... | https://github.com/Eloston/ungoogled-chromium/issues/68 | Now at patch ../patches/ungoogled-chromium/remove-get-help-button.patch
2016-09-29 16:58:58,672 - INFO: Running gyp command...
2016-09-29 16:58:58,673 - DEBUG: Appending resources/common/gyp_flags
2016-09-29 16:58:58,673 - DEBUG: Appending resources/linux_static/gyp_flags
2016-09-29 16:58:58,673 - DEBUG: GYP command: b... | NameError |
def generate_package(self):
build_file_subs = dict(
changelog_version="{}-{}".format(self.chromium_version, self.release_revision),
changelog_datetime=self._get_dpkg_changelog_datetime(),
build_output=str(self.build_output),
distribution_version=self._distro_version,
)
self.l... | def generate_package(self):
build_file_subs = dict(
changelog_version="{}-{}".format(self.chromium_version, self.release_revision),
changelog_datetime=self._get_dpkg_changelog_datetime(),
build_output=str(self.build_output),
)
self.logger.info("Building Debian package...")
# TODO... | https://github.com/Eloston/ungoogled-chromium/issues/68 | Now at patch ../patches/ungoogled-chromium/remove-get-help-button.patch
2016-09-29 16:58:58,672 - INFO: Running gyp command...
2016-09-29 16:58:58,673 - DEBUG: Appending resources/common/gyp_flags
2016-09-29 16:58:58,673 - DEBUG: Appending resources/linux_static/gyp_flags
2016-09-29 16:58:58,673 - DEBUG: GYP command: b... | NameError |
def _run_subprocess(self, *args, append_environ=None, **kwargs):
new_env = dict(os.environ)
if "PATH" not in new_env:
new_env["PATH"] = os.defpath
if len(new_env["PATH"]) > 0 and not new_env["PATH"].startswith(os.pathsep):
new_env["PATH"] = os.pathsep + new_env["PATH"]
new_env["PATH"] = ... | def _run_subprocess(self, *args, append_environ=None, **kwargs):
new_env = dict(os.environ)
if "PATH" not in new_env:
new_env["PATH"] = os.defpath
if len(new_env["PATH"]) > 0 and not new_env["PATH"].startswith(os.pathsep):
new_env["PATH"] = os.pathsep + new_env["PATH"]
new_env["PATH"] = ... | https://github.com/Eloston/ungoogled-chromium/issues/68 | Now at patch ../patches/ungoogled-chromium/remove-get-help-button.patch
2016-09-29 16:58:58,672 - INFO: Running gyp command...
2016-09-29 16:58:58,673 - DEBUG: Appending resources/common/gyp_flags
2016-09-29 16:58:58,673 - DEBUG: Appending resources/linux_static/gyp_flags
2016-09-29 16:58:58,673 - DEBUG: GYP command: b... | NameError |
def setup_environment_overrides(self):
"""Sets up overrides of the build environment"""
self.logger.info("Setting up environment overrides...")
for command_name in self.path_overrides:
self.logger.debug(
"Setting command '{}' as '{}'".format(
command_name, self.path_ove... | def setup_environment_overrides(self):
"""Sets up overrides of the build environment"""
for command_name in self.path_overrides:
self._write_path_override(command_name, self.path_overrides[command_name])
| https://github.com/Eloston/ungoogled-chromium/issues/68 | Now at patch ../patches/ungoogled-chromium/remove-get-help-button.patch
2016-09-29 16:58:58,672 - INFO: Running gyp command...
2016-09-29 16:58:58,673 - DEBUG: Appending resources/common/gyp_flags
2016-09-29 16:58:58,673 - DEBUG: Appending resources/linux_static/gyp_flags
2016-09-29 16:58:58,673 - DEBUG: GYP command: b... | NameError |
def search_exists(self, index=None, doc_type=None, body=None, params=None):
"""
The exists API allows to easily determine if any matching documents
exist for a provided query.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/search-exists.html>`_
:arg index: A comma-separated list o... | def search_exists(self, index=None, doc_type=None, body=None, params=None):
"""
The exists API allows to easily determine if any matching documents
exist for a provided query.
`<http://www.elastic.co/guide/en/elasticsearch/reference/current/search-exists.html>`_
:arg index: A comma-separated list o... | https://github.com/elastic/elasticsearch-py/issues/230 | es.search_exists('my_index', 'my_type', params={'q': 'my_field:bar'})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/elasticsearch/client/utils.py", line 68, in _wrapped
return func(*args, params=params, **kwargs)
File "/usr/local/lib/python2.7/dist-p... | elasticsearch.exceptions.NotFoundError |
def perform_request(self, method, url, params=None, body=None):
"""
Perform the actual request. Retrieve a connection from the connection
pool, pass all the information to it's perform_request method and
return the data.
If an exception was raised, mark the connection as failed and retry (up
to... | def perform_request(self, method, url, params=None, body=None):
"""
Perform the actual request. Retrieve a connection from the connection
pool, pass all the information to it's perform_request method and
return the data.
If an exception was raised, mark the connection as failed and retry (up
to... | https://github.com/elastic/elasticsearch-py/issues/230 | es.search_exists('my_index', 'my_type', params={'q': 'my_field:bar'})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/elasticsearch/client/utils.py", line 68, in _wrapped
return func(*args, params=params, **kwargs)
File "/usr/local/lib/python2.7/dist-p... | elasticsearch.exceptions.NotFoundError |
def effect(self): # noqa: C901
if not self.selected:
inkex.errormsg(_("Please select one or more fill areas to break apart."))
return
elements = []
nodes = self.get_nodes()
for node in nodes:
if node.tag in SVG_PATH_TAG:
elements.append(EmbroideryElement(node))
... | def effect(self):
if not self.selected:
inkex.errormsg(_("Please select one or more fill areas to break apart."))
return
elements = []
nodes = self.get_nodes()
for node in nodes:
if node.tag in SVG_PATH_TAG:
elements.append(EmbroideryElement(node))
for element i... | https://github.com/inkstitch/inkstitch/issues/731 | Ink/Stitch experienced an unexpected error.
If you'd like to help, please file an issue at https://github.com/inkstitch/inkstitch/issues and include the entire error description below:
Traceback (most recent call last):
File "/Users/runner/runners/2.169.1/work/inkstitch/inkstitch/inkstitch.py", line 44, in <module>
Fi... | ValueError |
def break_apart_paths(self, paths):
polygons = []
for path in paths:
if len(path) < 3:
continue
linestring = LineString(path)
if not linestring.is_simple:
linestring = unary_union(linestring)
for polygon in polygonize(linestring):
polyg... | def break_apart_paths(self, paths):
polygons = []
for path in paths:
linestring = LineString(path)
polygon = Polygon(path).buffer(0)
if not linestring.is_simple:
linestring = unary_union(linestring)
for polygon in polygonize(linestring):
polygons.a... | https://github.com/inkstitch/inkstitch/issues/731 | Ink/Stitch experienced an unexpected error.
If you'd like to help, please file an issue at https://github.com/inkstitch/inkstitch/issues and include the entire error description below:
Traceback (most recent call last):
File "/Users/runner/runners/2.169.1/work/inkstitch/inkstitch/inkstitch.py", line 44, in <module>
Fi... | ValueError |
def get_doc_size(svg):
width = svg.get("width")
height = svg.get("height")
if width == "100%" and height == "100%":
# Some SVG editors set width and height to "100%". I can't find any
# solid documentation on how one is supposed to interpret that, so
# just ignore it and use the vi... | def get_doc_size(svg):
width = svg.get("width")
height = svg.get("height")
if width is None or height is None:
# fall back to the dimensions from the viewBox
viewbox = get_viewbox(svg)
width = viewbox[2]
height = viewbox[3]
doc_width = convert_length(width)
doc_heig... | https://github.com/inkstitch/inkstitch/issues/476 | Traceback (most recent call last):
File "lib\elements\auto_fill.py", line 200, in to_patches
File "lib\elements\auto_fill.py", line 161, in fill_shape
File "lib\elements\auto_fill.py", line 153, in shrink_or_grow_shape
File "site-packages\backports\functools_lru_cache.py", line 113, in wrapper
File "lib\elements\fill.p... | ValueError |
def write_embroidery_file(file_path, stitch_plan, svg):
origin = get_origin(svg)
pattern = pyembroidery.EmbPattern()
for color_block in stitch_plan:
pattern.add_thread(color_block.color.pyembroidery_thread)
for stitch in color_block:
if stitch.stop:
jump_to_sto... | def write_embroidery_file(file_path, stitch_plan, svg):
origin = get_origin(svg)
pattern = pyembroidery.EmbPattern()
for color_block in stitch_plan:
pattern.add_thread(color_block.color.pyembroidery_thread)
for stitch in color_block:
if stitch.stop:
jump_to_sto... | https://github.com/inkstitch/inkstitch/issues/279 | Traceback (most recent call last):
File "inkstitch.py", line 24, in <module>
binary_name = script_name
File "inkscape-0.92.3\share\extensions\inkex.py", line 283, in affect
File "lib\extensions\embroider.py", line 85, in effect
File "lib\output.py", line 114, in write_embroidery_file
File "site-packages\pyembroid... | IOError |
def get_output_path(self):
if self.options.output_file:
output_path = os.path.join(
os.path.expanduser(os.path.expandvars(self.options.path)),
self.options.output_file,
)
else:
csv_filename = "%s.%s" % (self.get_base_file_name(), self.options.output_format)
... | def get_output_path(self):
if self.options.output_file:
output_path = os.path.join(self.options.path, self.options.output_file)
else:
csv_filename = "%s.%s" % (self.get_base_file_name(), self.options.output_format)
output_path = os.path.join(self.options.path, csv_filename)
def add_... | https://github.com/inkstitch/inkstitch/issues/279 | Traceback (most recent call last):
File "inkstitch.py", line 24, in <module>
binary_name = script_name
File "inkscape-0.92.3\share\extensions\inkex.py", line 283, in affect
File "lib\extensions\embroider.py", line 85, in effect
File "lib\output.py", line 114, in write_embroidery_file
File "site-packages\pyembroid... | IOError |
def url_to_destination(url, service_type="external"):
parts = compat.urlparse.urlsplit(url)
hostname = parts.hostname
# preserve brackets for IPv6 URLs
if "://[" in url:
hostname = "[%s]" % hostname
try:
port = parts.port
except ValueError:
# Malformed port, just use None... | def url_to_destination(url, service_type="external"):
parts = compat.urlparse.urlsplit(url)
hostname = parts.hostname
# preserve brackets for IPv6 URLs
if "://[" in url:
hostname = "[%s]" % hostname
port = parts.port
default_port = default_ports.get(parts.scheme, None)
name = "%s://%... | https://github.com/elastic/apm-agent-python/issues/798 | Traceback (most recent call last):
File "project\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "project\venv\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "... | ValueError |
def _process_queue(self):
def init_buffer():
buffer = gzip.GzipFile(
fileobj=compat.BytesIO(), mode="w", compresslevel=self._compress_level
)
data = (self._json_serializer({"metadata": self._metadata}) + "\n").encode(
"utf-8"
)
buffer.write(data)
... | def _process_queue(self):
def init_buffer():
buffer = gzip.GzipFile(
fileobj=compat.BytesIO(), mode="w", compresslevel=self._compress_level
)
data = (self._json_serializer({"metadata": self._metadata}) + "\n").encode(
"utf-8"
)
buffer.write(data)
... | https://github.com/elastic/apm-agent-python/issues/409 | web_1 | Failed to submit message: "Unable to reach APM Server: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) (url: http://192.168.16.100:8200/intake/v2/events)"
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.7/site-packages... | urllib3.exceptions.ProtocolError |
def get_data_from_request(request, capture_body=False):
result = {
"env": dict(get_environ(request.environ)),
"headers": dict(get_headers(request.environ)),
"method": request.method,
"socket": {
"remote_address": request.environ.get("REMOTE_ADDR"),
"encrypted"... | def get_data_from_request(request, capture_body=False):
result = {
"env": dict(get_environ(request.environ)),
"headers": dict(get_headers(request.environ)),
"method": request.method,
"socket": {
"remote_address": request.environ.get("REMOTE_ADDR"),
"encrypted"... | https://github.com/elastic/apm-agent-python/issues/286 | Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1816, in full_dispatch_request
return self.finalize_request(rv)
File "/usr/local/lib/python3.6/si... | flask_api.exceptions.ParseError |
def get_name_from_func(func):
# partials don't have `__module__` or `__name__`, so we use the values from the "inner" function
if isinstance(func, partial_types):
return "partial({})".format(get_name_from_func(func.func))
elif hasattr(func, "_partialmethod") and hasattr(func._partialmethod, "func"):... | def get_name_from_func(func):
# If no view was set we ignore the request
module = func.__module__
if hasattr(func, "__name__"):
view_name = func.__name__
else: # Fall back if there's no __name__
view_name = func.__class__.__name__
return "{0}.{1}".format(module, view_name)
| https://github.com/elastic/apm-agent-python/issues/293 | Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/elasticapm/contrib/django/middleware/__init__.py", line 154, in process_response
transaction_name = get_name_from_func(request._elasticapm_view_func)
File "/usr/local/lib/python3.6/site-packages/elasticapm/utils/__init__.py", line 42, in ge... | AttributeError |
def __init__(self, config=None, **defaults):
# configure loggers first
cls = self.__class__
self.logger = logging.getLogger("%s.%s" % (cls.__module__, cls.__name__))
self.error_logger = logging.getLogger("elasticapm.errors")
self.state = ClientState()
self.instrumentation_store = None
self.... | def __init__(self, config=None, **defaults):
# configure loggers first
cls = self.__class__
self.logger = logging.getLogger("%s.%s" % (cls.__module__, cls.__name__))
self.error_logger = logging.getLogger("elasticapm.errors")
self.state = ClientState()
self.instrumentation_store = None
self.... | https://github.com/elastic/apm-agent-python/issues/48 | Unable to process log entry: 'DjangoClient' object has no attribute 'filter_exception_types_dict'
Traceback (most recent call last):
File "/Users/simitt/.pyenv/versions/django-test-3.6.2/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/Users/simit... | AttributeError |
def handle_check(self, command, **options):
"""Check your settings for common misconfigurations"""
passed = True
client = DjangoClient()
# check if org/app and token are set:
is_set = lambda x: x and x != "None"
values = [client.config.service_name, client.config.secret_token]
if all(map(is_... | def handle_check(self, command, **options):
"""Check your settings for common misconfigurations"""
passed = True
client = DjangoClient()
# check if org/app and token are set:
is_set = lambda x: x and x != "None"
values = [client.config.service_name, client.config.secret_token]
if all(map(is_... | https://github.com/elastic/apm-agent-python/issues/188 | $ python manage.py elasticapm check
Service name and secret token are set, good job!
DEBUG mode is disabled! Looking good!
Traceback (most recent call last):
File "manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "/home/ubuntu/.virtualenvs/backend/lib/python3.5/site-packages/django/core/manag... | TypeError |
def get_data_from_response(self, response):
result = {"status_code": response.status_code}
# Django does not expose a public API to iterate over the headers of a response.
# Unfortunately, we have to access the private _headers dictionary here, which is
# a mapping of the form lower-case-header: (Origi... | def get_data_from_response(self, response):
result = {"status_code": str(response.status_code)}
# Django does not expose a public API to iterate over the headers of a response.
# Unfortunately, we have to access the private _headers dictionary here, which is
# a mapping of the form lower-case-header: (... | https://github.com/elastic/apm-agent-python/issues/47 | HTTP 400:
Failed to submit message: '<no message value>'
Traceback (most recent call last):
File "/Users/simitt/.pyenv/versions/django-test-3.6.2/lib/python3.6/site-packages/elasticapm/transport/http_urllib3.py", line 75, in send_sync
url = Urllib3Transport.send(self, data, headers)
File "/Users/simitt/.pyenv/versions/... | elasticapm.transport.base.TransportException |
def __init__(self, *args):
"""
Creates a new MetaDict instance.
"""
# Store all keys as lower-case to allow for case-insensitive indexing
# OrderedDict can be instantiated from a list of lists or a tuple of tuples
tags = dict()
if args:
args = list(args)
adict = args[0]
... | def __init__(self, *args):
"""
Creates a new MetaDict instance.
"""
# Store all keys as lower-case to allow for case-insensitive indexing
# OrderedDict can be instantiated from a list of lists or a tuple of tuples
tags = dict()
if args:
args = list(args)
adict = args[0]
... | https://github.com/sunpy/sunpy/issues/5043 | In [1]: from astropy.io import fits
...: from sunpy.map.sources import SUVIMap
...: hdu = fits.open('dr_suvi-l2-ci195_g16_s20200220T180000Z_e20200220T180400Z_v1-0-0.fits')
...: suvimap = SUVIMap(hdu[1].data, hdu[1].header)
---------------------------------------------------------------------------
TypeError ... | TypeError |
def world_to_pixel(self, coordinate, origin=None):
"""
Convert a world (data) coordinate to a pixel coordinate.
Parameters
----------
coordinate : `~astropy.coordinates.SkyCoord` or `~astropy.coordinates.BaseFrame`
The coordinate object to convert to pixel coordinates.
origin : int
... | def world_to_pixel(self, coordinate, origin=0):
"""
Convert a world (data) coordinate to a pixel coordinate by using
`~astropy.wcs.WCS.wcs_world2pix`.
Parameters
----------
coordinate : `~astropy.coordinates.SkyCoord` or `~astropy.coordinates.BaseFrame`
The coordinate object to convert ... | https://github.com/sunpy/sunpy/issues/4699 | Traceback (most recent call last):
File "/Users/dstansby/github/sunpy/test.py", line 27, in <module>
print(m.bottom_left_coord)
File "/Users/dstansby/github/sunpy/sunpy/map/mapbase.py", line 719, in bottom_left_coord
return self.pixel_to_world(0*u.pix, 0*u.pix)
File "/Users/dstansby/miniconda3/envs/dev/lib/python3.9/si... | ValueError |
def pixel_to_world(self, x: u.pixel, y: u.pixel, origin=None):
"""
Convert a pixel coordinate to a data (world) coordinate.
Parameters
----------
x : `~astropy.units.Quantity`
Pixel coordinate of the CTYPE1 axis. (Normally solar-x).
y : `~astropy.units.Quantity`
Pixel coordinat... | def pixel_to_world(self, x: u.pixel, y: u.pixel, origin=0):
"""
Convert a pixel coordinate to a data (world) coordinate by using
`~astropy.wcs.WCS.wcs_pix2world`.
Parameters
----------
x : `~astropy.units.Quantity`
Pixel coordinate of the CTYPE1 axis. (Normally solar-x).
y : `~ast... | https://github.com/sunpy/sunpy/issues/4699 | Traceback (most recent call last):
File "/Users/dstansby/github/sunpy/test.py", line 27, in <module>
print(m.bottom_left_coord)
File "/Users/dstansby/github/sunpy/sunpy/map/mapbase.py", line 719, in bottom_left_coord
return self.pixel_to_world(0*u.pix, 0*u.pix)
File "/Users/dstansby/miniconda3/envs/dev/lib/python3.9/si... | ValueError |
def rotate(
self,
angle: u.deg = None,
rmatrix=None,
order=4,
scale=1.0,
recenter=False,
missing=0.0,
use_scipy=False,
):
"""
Returns a new rotated and rescaled map.
Specify either a rotation angle or a rotation matrix, but not both. If
neither an angle or a rotation mat... | def rotate(
self,
angle: u.deg = None,
rmatrix=None,
order=4,
scale=1.0,
recenter=False,
missing=0.0,
use_scipy=False,
):
"""
Returns a new rotated and rescaled map.
Specify either a rotation angle or a rotation matrix, but not both. If
neither an angle or a rotation mat... | https://github.com/sunpy/sunpy/issues/4699 | Traceback (most recent call last):
File "/Users/dstansby/github/sunpy/test.py", line 27, in <module>
print(m.bottom_left_coord)
File "/Users/dstansby/github/sunpy/sunpy/map/mapbase.py", line 719, in bottom_left_coord
return self.pixel_to_world(0*u.pix, 0*u.pix)
File "/Users/dstansby/miniconda3/envs/dev/lib/python3.9/si... | ValueError |
def convert_input(self, value):
# Keep string here.
if isinstance(value, str):
return value, False
else:
# Upgrade the coordinate to a `SkyCoord` so that frame attributes will be merged
if isinstance(value, BaseCoordinateFrame) and not isinstance(
value, self._frame
... | def convert_input(self, value):
# Keep string here.
if isinstance(value, str):
return value, False
else:
return super().convert_input(value)
| https://github.com/sunpy/sunpy/issues/4237 | ---------------------------------------------------------------------------
ConvertError Traceback (most recent call last)
<ipython-input-39-8ab95e21b2a5> in <module>
1 hee = HeliocentricEarthEcliptic(45*u.deg, 35*u.deg, 17*u.km, obstime="2020-01-01")
----> 2 hee.transform_to(HeliographicSt... | ConvertError |
def _download(self, data):
"""Download all data, even if paginated."""
page = 1
results = []
while True:
data["page"] = page
fd = urllib.request.urlopen(self.url + urllib.parse.urlencode(data))
try:
result = codecs.decode(fd.read(), encoding="utf-8", errors="replace"... | def _download(self, data):
"""Download all data, even if paginated."""
page = 1
results = []
while True:
data["page"] = page
fd = urllib.request.urlopen(self.url + urllib.parse.urlencode(data))
try:
result = json.load(fd)
except Exception as e:
ra... | https://github.com/sunpy/sunpy/issues/4087 | Traceback (most recent call last):
File "/home/user/anaconda3/envs/pytorch/lib/python3.8/site-packages/sunpy/net/hek/hek.py", line 69, in _download
result = json.load(fd)
File "/home/user/anaconda3/envs/pytorch/lib/python3.8/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/home/user/anaconda3/envs/py... | UnicodeDecodeError |
def download(url):
path = self._cache_dir / get_filename(urlopen(url), url)
# replacement_filename returns a string and we want a Path object
path = Path(replacement_filename(path))
self._downloader.download(url, path)
shahash = hash_file(path)
return path, shahash, url
| def download(url):
path = self._cache_dir / get_filename(urlopen(url), url)
path = replacement_filename(path)
self._downloader.download(url, path)
shahash = hash_file(path)
return path, shahash, url
| https://github.com/sunpy/sunpy/issues/4006 | AttributeError Traceback (most recent call last)
<ipython-input-23-1a0872c98bf5> in <module>
----> 1 maps = Map(urls)
~/anaconda3/lib/python3.7/site-packages/sunpy/map/map_factory.py in __call__(self, composite, sequence, silence_errors, *args, **kwargs)
274 """
275
--> 276 d... | AttributeError |
def _download_and_hash(self, urls):
"""
Downloads the file and returns the path, hash and url it used to download.
Parameters
----------
urls: `list`
List of urls.
Returns
-------
`str`, `str`, `str`
Path, hash and URL of the file.
"""
def download(url):
... | def _download_and_hash(self, urls):
"""
Downloads the file and returns the path, hash and url it used to download.
Parameters
----------
urls: `list`
List of urls.
Returns
-------
`str`, `str`, `str`
Path, hash and URL of the file.
"""
def download(url):
... | https://github.com/sunpy/sunpy/issues/4006 | AttributeError Traceback (most recent call last)
<ipython-input-23-1a0872c98bf5> in <module>
----> 1 maps = Map(urls)
~/anaconda3/lib/python3.7/site-packages/sunpy/map/map_factory.py in __call__(self, composite, sequence, silence_errors, *args, **kwargs)
274 """
275
--> 276 d... | AttributeError |
def __init__(self, table=None, client=None):
"""
table : `astropy.table.Table`
"""
super().__init__()
self.table = table or astropy.table.QTable()
self.query_args = getattr(table, "query_args", None)
self.requests = getattr(table, "requests", None)
self._client = client
| def __init__(self, table=None, client=None):
"""
table : `astropy.table.Table`
"""
super().__init__()
self.table = table or astropy.table.QTable()
self.query_args = None
self.requests = None
self._client = client
| https://github.com/sunpy/sunpy/issues/2781 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-488027c4a327> in <module>
----> 1 Fido.fetch(res[0,0])
~/Git/sunpy/sunpy/net/fido_factory.py in fetch(self, *query_results, **kwargs)
360 for ... | TypeError |
def __getitem__(self, item):
if isinstance(item, int):
item = slice(item, item + 1)
ret = type(self)(self.table[item])
ret.query_args = self.query_args
ret.requests = self.requests
ret.client = self._client
warnings.warn(
"Downloading of sliced JSOC results is not supported. "
... | def __getitem__(self, item):
return type(self)(self.table[item])
| https://github.com/sunpy/sunpy/issues/2781 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-488027c4a327> in <module>
----> 1 Fido.fetch(res[0,0])
~/Git/sunpy/sunpy/net/fido_factory.py in fetch(self, *query_results, **kwargs)
360 for ... | TypeError |
def fetch(
self,
query_response,
path=None,
methods=None,
site=None,
progress=True,
overwrite=False,
downloader=None,
wait=True,
):
"""
Download data specified in the query_response.
Parameters
----------
query_response : sunpy.net.vso.QueryResponse
Query... | def fetch(
self,
query_response,
path=None,
methods=None,
site=None,
progress=True,
overwrite=False,
downloader=None,
wait=True,
):
"""
Download data specified in the query_response.
Parameters
----------
query_response : sunpy.net.vso.QueryResponse
Query... | https://github.com/sunpy/sunpy/issues/3292 | Results from 2 Providers:
0 Results from the VSOClient:
Start Time End Time Source Instrument Type
float64 float64 float64 float64 float64
---------- -------- ------- ---------- -------
1 Results from the VSOClient:
Start Time [1] End Time [1] Source Instrument Type Wavelength [2]
Angstrom
str19... | RuntimeError |
def fetch(
self,
*query_results,
path=None,
max_conn=5,
progress=True,
overwrite=False,
downloader=None,
**kwargs,
):
"""
Download the records represented by
`~sunpy.net.fido_factory.UnifiedResponse` objects.
Parameters
----------
query_results : `sunpy.net.fido_... | def fetch(
self,
*query_results,
path=None,
max_conn=5,
progress=True,
overwrite=False,
downloader=None,
**kwargs,
):
"""
Download the records represented by
`~sunpy.net.fido_factory.UnifiedResponse` objects.
Parameters
----------
query_results : `sunpy.net.fido_... | https://github.com/sunpy/sunpy/issues/3292 | Results from 2 Providers:
0 Results from the VSOClient:
Start Time End Time Source Instrument Type
float64 float64 float64 float64 float64
---------- -------- ------- ---------- -------
1 Results from the VSOClient:
Start Time [1] End Time [1] Source Instrument Type Wavelength [2]
Angstrom
str19... | RuntimeError |
def _get_goes_sat_num(start, end):
"""Parses the query time to determine which GOES satellite to use."""
goes_operational = {
2: TimeRange("1980-01-04", "1983-05-01"),
5: TimeRange("1983-05-02", "1984-08-01"),
6: TimeRange("1983-06-01", "1994-08-19"),
7: TimeRange("1994-01-01", ... | def _get_goes_sat_num(self, start, end):
"""Parses the query time to determine which GOES satellite to use."""
goes_operational = {
2: TimeRange("1980-01-04", "1983-05-01"),
5: TimeRange("1983-05-02", "1984-08-01"),
6: TimeRange("1983-06-01", "1994-08-19"),
7: TimeRange("1994-01... | https://github.com/sunpy/sunpy/issues/3078 | In [3]: g = TimeSeries('../flarenet/data/goes/go06860129.fits')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-686c02e70652> in <module>()
----> 1 g = TimeSeries('../flarenet/data/goes/go06860129.fi... | ValueError |
def _parse_hdus(cls, hdulist):
header = MetaDict(OrderedDict(hdulist[0].header))
if len(hdulist) == 4:
if is_time_in_given_format(hdulist[0].header["DATE-OBS"], "%d/%m/%Y"):
start_time = Time.strptime(hdulist[0].header["DATE-OBS"], "%d/%m/%Y")
elif is_time_in_given_format(hdulist[0].... | def _parse_hdus(cls, hdulist):
header = MetaDict(OrderedDict(hdulist[0].header))
if len(hdulist) == 4:
if is_time_in_given_format(hdulist[0].header["DATE-OBS"], "%d/%m/%Y"):
start_time = Time.strptime(hdulist[0].header["DATE-OBS"], "%d/%m/%Y")
elif is_time_in_given_format(hdulist[0].... | https://github.com/sunpy/sunpy/issues/3078 | In [3]: g = TimeSeries('../flarenet/data/goes/go06860129.fits')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-686c02e70652> in <module>()
----> 1 g = TimeSeries('../flarenet/data/goes/go06860129.fi... | ValueError |
def _read_file(fname, **kwargs):
"""
Test reading a file with sunpy.io for automatic source detection.
Parameters
----------
fname : filename
kwargs
Returns
-------
parsed : bool
True if file has been reading
pairs : list or str
List of (data, header) pairs... | def _read_file(self, fname, **kwargs):
"""
Test reading a file with sunpy.io for automatic source detection.
Parameters
----------
fname : filename
kwargs
Returns
-------
parsed : bool
True if file has been reading
pairs : list or str
List of (data, header)... | https://github.com/sunpy/sunpy/issues/3078 | In [3]: g = TimeSeries('../flarenet/data/goes/go06860129.fits')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-686c02e70652> in <module>()
----> 1 g = TimeSeries('../flarenet/data/goes/go06860129.fi... | ValueError |
def _validate_meta(meta):
"""
Validate a meta argument for use as metadata.
Currently only validates by class.
"""
if isinstance(meta, astropy.io.fits.header.Header):
return True
elif isinstance(meta, sunpy.io.header.FileHeader):
return True
elif isinstance(meta, dict):
... | def _validate_meta(self, meta):
"""
Validate a meta argument for use as metadata.
Currently only validates by class.
"""
if isinstance(meta, astropy.io.fits.header.Header):
return True
elif isinstance(meta, sunpy.io.header.FileHeader):
return True
elif isinstance(meta, dict):... | https://github.com/sunpy/sunpy/issues/3078 | In [3]: g = TimeSeries('../flarenet/data/goes/go06860129.fits')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-686c02e70652> in <module>()
----> 1 g = TimeSeries('../flarenet/data/goes/go06860129.fi... | ValueError |
def _validate_units(units):
"""
Validates the astropy unit-information associated with a TimeSeries.
Should be a dictionary of some form (but not MetaDict) with only
astropy units for values.
"""
warnings.simplefilter("always", Warning)
result = True
# It must be a dictionary
if no... | def _validate_units(self, units):
"""
Validates the astropy unit-information associated with a TimeSeries.
Should be a dictionary of some form (but not MetaDict) with only
astropy units for values.
"""
warnings.simplefilter("always", Warning)
result = True
# It must be a dictionary
... | https://github.com/sunpy/sunpy/issues/3078 | In [3]: g = TimeSeries('../flarenet/data/goes/go06860129.fits')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-686c02e70652> in <module>()
----> 1 g = TimeSeries('../flarenet/data/goes/go06860129.fi... | ValueError |
def _from_table(t):
"""
Extract the data, metadata and units from an astropy table for use in
constructing a TimeSeries.
Parameters
----------
t: `~astropy.table.table.Table`
The input table. The datetime column must be the first column or the
(single) primary key index.
Re... | def _from_table(self, t):
"""
Extract the data, metadata and units from an astropy table for use in
constructing a TimeSeries.
Parameters
----------
t: `~astropy.table.table.Table`
The input table. The datetime column must be the first column or the
(single) primary key index.
... | https://github.com/sunpy/sunpy/issues/3078 | In [3]: g = TimeSeries('../flarenet/data/goes/go06860129.fits')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-686c02e70652> in <module>()
----> 1 g = TimeSeries('../flarenet/data/goes/go06860129.fi... | ValueError |
def _parse_args(self, *args, **kwargs):
"""
Parses an args list for data-header pairs. args can contain any
mixture of the following entries:
* tuples of (data, header, unit) (1)
* data, header not in a tuple (1)
* filename, which will be read
* directory, from which all files will be read
... | def _parse_args(self, *args, **kwargs):
"""
Parses an args list for data-header pairs. args can contain any
mixture of the following entries:
* tuples of (data, header, unit) (1)
* data, header not in a tuple (1)
* filename, which will be read
* directory, from which all files will be read
... | https://github.com/sunpy/sunpy/issues/3078 | In [3]: g = TimeSeries('../flarenet/data/goes/go06860129.fits')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-686c02e70652> in <module>()
----> 1 g = TimeSeries('../flarenet/data/goes/go06860129.fi... | ValueError |
def __call__(self, *args, **kwargs):
"""Method for running the factory. Takes arbitrary arguments and
keyword arguments and passes them to a sequence of pre-registered types
to determine which is the correct TimeSeries source type to build.
Arguments args and kwargs are passed through to the validation... | def __call__(self, *args, **kwargs):
"""Method for running the factory. Takes arbitrary arguments and
keyword arguments and passes them to a sequence of pre-registered types
to determine which is the correct TimeSeries source type to build.
Arguments args and kwargs are passed through to the validation... | https://github.com/sunpy/sunpy/issues/3078 | In [3]: g = TimeSeries('../flarenet/data/goes/go06860129.fits')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-686c02e70652> in <module>()
----> 1 g = TimeSeries('../flarenet/data/goes/go06860129.fi... | ValueError |
def write(fname, data, header, **kwargs):
"""
Take a data header pair and write a FITS file.
Parameters
----------
fname : `str`
File name, with extension
data : `numpy.ndarray`
n-dimensional data array
header : `dict`
A header dictionary
"""
# Copy header ... | def write(fname, data, header, **kwargs):
"""
Take a data header pair and write a FITS file.
Parameters
----------
fname : `str`
File name, with extension
data : `numpy.ndarray`
n-dimensional data array
header : `dict`
A header dictionary
"""
# Copy header ... | https://github.com/sunpy/sunpy/issues/2738 | ---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-260-752b35ded2b2> in <module>()
----> 1 aia_sub.save("test.fits")
~/miniconda/lib/python3.6/site-packages/sunpy/map/mapbase.py in save(self, filepath, f... | KeyError |
def hgs_to_hgc(hgscoord, hgcframe):
"""
Transform from Heliographic Stonyhurst to Heliograpic Carrington.
"""
if hgcframe.obstime is None or np.any(hgcframe.obstime != hgscoord.obstime):
raise ValueError(
"Can not transform from Heliographic Stonyhurst to "
"Heliographic ... | def hgs_to_hgc(hgscoord, hgcframe):
"""
Transform from Heliographic Stonyhurst to Heliograpic Carrington.
"""
if hgcframe.obstime is None or np.any(hgcframe.obstime != hgscoord.obstime):
raise ValueError(
"Can not transform from Heliographic Stonyhurst to "
"Heliographic ... | https://github.com/sunpy/sunpy/issues/2632 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-46-77d08794e7f4> in <module>()
----> 1 foo.transform_to(sunpy.coordinates.Helioprojective(observer=obs))
~/anaconda/envs/synthesizar/lib/python3.6/site-... | AttributeError |
def hgc_to_hgs(hgccoord, hgsframe):
"""
Convert from Heliograpic Carrington to Heliographic Stonyhurst.
"""
if hgsframe.obstime is None or np.any(hgsframe.obstime != hgccoord.obstime):
raise ValueError(
"Can not transform from Heliographic Carrington to "
"Heliographic St... | def hgc_to_hgs(hgccoord, hgsframe):
"""
Convert from Heliograpic Carrington to Heliographic Stonyhurst.
"""
if hgsframe.obstime is None or np.any(hgsframe.obstime != hgccoord.obstime):
raise ValueError(
"Can not transform from Heliographic Carrington to "
"Heliographic St... | https://github.com/sunpy/sunpy/issues/2632 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-46-77d08794e7f4> in <module>()
----> 1 foo.transform_to(sunpy.coordinates.Helioprojective(observer=obs))
~/anaconda/envs/synthesizar/lib/python3.6/site-... | AttributeError |
def hgs_to_hcc(heliogcoord, heliocframe):
"""
Convert from Heliographic Stonyhurst to Heliocentric Cartesian.
"""
hglon = heliogcoord.spherical.lon
hglat = heliogcoord.spherical.lat
r = heliogcoord.spherical.distance
if r.unit is u.one and quantity_allclose(r, 1 * u.one):
r = np.ones... | def hgs_to_hcc(heliogcoord, heliocframe):
"""
Convert from Heliographic Stonyhurst to Heliocentric Cartesian.
"""
hglon = heliogcoord.lon
hglat = heliogcoord.lat
r = heliogcoord.radius
if r.unit is u.one and quantity_allclose(r, 1 * u.one):
r = np.ones_like(r)
r *= RSUN_METER... | https://github.com/sunpy/sunpy/issues/2632 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-46-77d08794e7f4> in <module>()
----> 1 foo.transform_to(sunpy.coordinates.Helioprojective(observer=obs))
~/anaconda/envs/synthesizar/lib/python3.6/site-... | AttributeError |
def plot(
self,
axes=None,
resample=None,
annotate=True,
interval=200,
plot_function=None,
**kwargs,
):
"""
A animation plotting routine that animates each element in the
MapCube
Parameters
----------
axes: mpl axes
axes to plot the animation on, if none uses... | def plot(
self,
axes=None,
resample=None,
annotate=True,
interval=200,
plot_function=None,
**kwargs,
):
"""
A animation plotting routine that animates each element in the
MapCube
Parameters
----------
axes: mpl axes
axes to plot the animation on, if none uses... | https://github.com/sunpy/sunpy/issues/2626 | TypeError Traceback (most recent call last)
<ipython-input-18-ab15991fbba2> in <module>()
12 ani = map_cube.plot()
13 #ani = map_cube.peek().get_animation() # This works but have progress bars cover axis
---> 14 ani.save('test.mp4')
~/.virtualenvs/gen/lib/python3.6/site-packages/matplot... | TypeError |
def updatefig(i, im, annotate, ani_data, removes):
while removes:
removes.pop(0).remove()
im.set_array(ani_data[i].data)
im.set_cmap(ani_data[i].plot_settings["cmap"])
norm = deepcopy(ani_data[i].plot_settings["norm"])
# The following explicit call is for bugged versions of Astropy's
#... | def updatefig(i, im, annotate, ani_data, removes):
while removes:
removes.pop(0).remove()
im.set_array(ani_data[i].data)
im.set_cmap(ani_data[i].plot_settings["cmap"])
norm = deepcopy(ani_data[i].plot_settings["norm"])
# The following explicit call is for bugged versions of Astropy's
#... | https://github.com/sunpy/sunpy/issues/2626 | TypeError Traceback (most recent call last)
<ipython-input-18-ab15991fbba2> in <module>()
12 ani = map_cube.plot()
13 #ani = map_cube.peek().get_animation() # This works but have progress bars cover axis
---> 14 ani.save('test.mp4')
~/.virtualenvs/gen/lib/python3.6/site-packages/matplot... | TypeError |
def plot(
self,
axes=None,
resample=None,
annotate=True,
interval=200,
plot_function=None,
**kwargs,
):
"""
A animation plotting routine that animates each element in the
MapCube
Parameters
----------
gamma: float
Gamma value to use for the color map
axe... | def plot(
self,
axes=None,
resample=None,
annotate=True,
interval=200,
plot_function=None,
**kwargs,
):
"""
A animation plotting routine that animates each element in the
MapCube
Parameters
----------
gamma: float
Gamma value to use for the color map
axe... | https://github.com/sunpy/sunpy/issues/2295 | Traceback (most recent call last):
File "/media/solar1/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 197, in __draw_idle_agg
FigureCanvasAgg.draw(self)
File "/media/solar1/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 464, in draw
self.figure.draw... | AttributeError |
def annotate_frame(i):
axes.set_title("{s.name}".format(s=self[i]))
axes.set_xlabel(
axis_labels_from_ctype(self[i].coordinate_system[0], self[i].spatial_units[0])
)
axes.set_ylabel(
axis_labels_from_ctype(self[i].coordinate_system[1], self[i].spatial_units[1])
)
| def annotate_frame(i):
axes.set_title("{s.name}".format(s=self[i]))
# x-axis label
if self[0].coordinate_system.x == "HG":
xlabel = "Longitude [{lon}".format(lon=self[i].spatial_units.x)
else:
xlabel = "X-position [{xpos}]".format(xpos=self[i].spatial_units.x)
# y-axis label
if... | https://github.com/sunpy/sunpy/issues/2295 | Traceback (most recent call last):
File "/media/solar1/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 197, in __draw_idle_agg
FigureCanvasAgg.draw(self)
File "/media/solar1/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 464, in draw
self.figure.draw... | AttributeError |
def __init__(self, lst):
"""
Input to this constructor can be one of a few things:
1. A ``QueryResponse`` object
2. A list of tuples ``(QueryResponse, client)``
"""
tmplst = []
# numfile is the number of files not the number of results.
self._numfile = 0
if isinstance(lst, (QueryRe... | def __init__(self, lst):
"""
Input to this constructor can be one of a few things:
1. A list of one UnifiedResponse object
2. A list of tuples (QueryResponse, client)
"""
tmplst = []
# numfile is the number of files not the number of results.
self._numfile = 0
if isinstance(lst, Qu... | https://github.com/sunpy/sunpy/issues/2140 | from sunpy.net import Fido, attrs as a
res = Fido.search(a.Time("2016-06-07", "2016-06-08"), a.Instrument('eve') | a.Instrument('goes'))
res[0]
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 15472, in default
run_compiled_code(code, self.ctx, None, 'single')
File "... | Exception |
def __getitem__(self, aslice):
"""
Support slicing the UnifiedResponse as a 2D object.
The first index is to the client and the second index is the records
returned from those clients.
"""
# Just a single int as a slice, we are just indexing client.
if isinstance(aslice, (int, slice)):
... | def __getitem__(self, aslice):
ret = self._list[aslice]
if ret:
return type(self)(ret)
return ret
| https://github.com/sunpy/sunpy/issues/2140 | from sunpy.net import Fido, attrs as a
res = Fido.search(a.Time("2016-06-07", "2016-06-08"), a.Instrument('eve') | a.Instrument('goes'))
res[0]
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 15472, in default
run_compiled_code(code, self.ctx, None, 'single')
File "... | Exception |
def _repr_html_(self):
nprov = len(self)
if nprov == 1:
ret = "Results from {} Provider:</br></br>".format(len(self))
else:
ret = "Results from {} Providers:</br></br>".format(len(self))
for block in self.responses:
ret += "{} Results from the {}:</br>".format(
len(bl... | def _repr_html_(self):
ret = ""
for block in self.responses:
ret += "Results from the {}:\n".format(block.client.__class__.__name__)
ret += block._repr_html_()
ret += "\n"
return ret
| https://github.com/sunpy/sunpy/issues/2140 | from sunpy.net import Fido, attrs as a
res = Fido.search(a.Time("2016-06-07", "2016-06-08"), a.Instrument('eve') | a.Instrument('goes'))
res[0]
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 15472, in default
run_compiled_code(code, self.ctx, None, 'single')
File "... | Exception |
def __repr__(self):
ret = super(UnifiedResponse, self).__repr__()
ret += "\n" + str(self)
return ret
| def __repr__(self):
ret = super(UnifiedResponse, self).__repr__()
ret += "\n"
for block in self.responses:
ret += "Results from the {}:\n".format(block.client.__class__.__name__)
ret += repr(block)
ret += "\n"
return ret
| https://github.com/sunpy/sunpy/issues/2140 | from sunpy.net import Fido, attrs as a
res = Fido.search(a.Time("2016-06-07", "2016-06-08"), a.Instrument('eve') | a.Instrument('goes'))
res[0]
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 15472, in default
run_compiled_code(code, self.ctx, None, 'single')
File "... | Exception |
def search(self, *query):
"""
Query for data in form of multiple parameters.
Examples
--------
Query for LYRALightCurve data for the time range ('2012/3/4','2012/3/6')
>>> from sunpy.net import Fido, attrs as a
>>> unifresp = Fido.search(a.Time('2012/3/4', '2012/3/6'), a.Instrument('lyra')... | def search(self, *query):
"""
Query for data in form of multiple parameters.
Examples
--------
Query for LYRALightCurve data for the time range ('2012/3/4','2012/3/6')
>>> from sunpy.net import Fido, attrs as a
>>> unifresp = Fido.search(a.Time('2012/3/4', '2012/3/6'), a.Instrument('lyra')... | https://github.com/sunpy/sunpy/issues/2140 | from sunpy.net import Fido, attrs as a
res = Fido.search(a.Time("2016-06-07", "2016-06-08"), a.Instrument('eve') | a.Instrument('goes'))
res[0]
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 15472, in default
run_compiled_code(code, self.ctx, None, 'single')
File "... | Exception |
def fetch(self, *query_results, **kwargs):
"""
Download the records represented by
`~sunpy.net.fido_factory.UnifiedResponse` objects.
Parameters
----------
query_results : `sunpy.net.fido_factory.UnifiedResponse`
Container returned by query method, or multiple.
wait : `bool`
... | def fetch(self, query_result, wait=True, progress=True, **kwargs):
"""
Downloads the files pointed at by URLs contained within UnifiedResponse
object.
Parameters
----------
query_result : `sunpy.net.fido_factory.UnifiedResponse`
Container returned by query method.
wait : `bool`
... | https://github.com/sunpy/sunpy/issues/2140 | from sunpy.net import Fido, attrs as a
res = Fido.search(a.Time("2016-06-07", "2016-06-08"), a.Instrument('eve') | a.Instrument('goes'))
res[0]
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 15472, in default
run_compiled_code(code, self.ctx, None, 'single')
File "... | Exception |
def _make_query_to_client(self, *query):
"""
Given a query, look up the client and perform the query.
Parameters
----------
query : collection of `~sunpy.net.vso.attr` objects
Returns
-------
response : `~sunpy.net.dataretriever.client.QueryResponse`
client : `object`
... | def _make_query_to_client(self, *query):
"""
Given a query, look up the client and perform the query.
Parameters
----------
query : collection of `~sunpy.net.vso.attr` objects
Returns
-------
response : `~sunpy.net.dataretriever.client.QueryResponse`
client : Instance of client cl... | https://github.com/sunpy/sunpy/issues/2140 | from sunpy.net import Fido, attrs as a
res = Fido.search(a.Time("2016-06-07", "2016-06-08"), a.Instrument('eve') | a.Instrument('goes'))
res[0]
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 15472, in default
run_compiled_code(code, self.ctx, None, 'single')
File "... | Exception |
def backprojection(
calibrated_event_list, pixel_size=(1.0, 1.0) * u.arcsec, image_dim=(64, 64) * u.pix
):
"""
Given a stacked calibrated event list fits file create a back
projection image.
.. warning:: The image is not in the right orientation!
Parameters
----------
calibrated_event_... | def backprojection(
calibrated_event_list, pixel_size=(1.0, 1.0) * u.arcsec, image_dim=(64, 64) * u.pix
):
"""
Given a stacked calibrated event list fits file create a back
projection image.
.. warning:: The image is not in the right orientation!
Parameters
----------
calibrated_event_... | https://github.com/sunpy/sunpy/issues/1473 | import sunpy.data
>>> import sunpy.data.sample
>>> import sunpy.instr.rhessi as rhessi
>>> sunpy.data.download_sample_data(overwrite=False)
>>> map = rhessi.backprojection(sunpy.data.sample.RHESSI_EVENT_LIST)
---------------------------------------------------------------------------
TypeError ... | TypeError |
def backprojection(
calibrated_event_list, pixel_size=(1.0, 1.0) * u.arcsec, image_dim=(64, 64) * u.pix
):
"""
Given a stacked calibrated event list fits file create a back
projection image.
.. warning:: The image is not in the right orientation!
Parameters
----------
calibrated_event_... | def backprojection(
calibrated_event_list, pixel_size=(1.0, 1.0) * u.arcsec, image_dim=(64, 64) * u.pix
):
"""
Given a stacked calibrated event list fits file create a back
projection image.
.. warning:: The image is not in the right orientation!
Parameters
----------
calibrated_event_... | https://github.com/sunpy/sunpy/issues/1473 | import sunpy.data
>>> import sunpy.data.sample
>>> import sunpy.instr.rhessi as rhessi
>>> sunpy.data.download_sample_data(overwrite=False)
>>> map = rhessi.backprojection(sunpy.data.sample.RHESSI_EVENT_LIST)
---------------------------------------------------------------------------
TypeError ... | TypeError |
def suds_unwrapper(wrapped_data):
"""
Removes suds wrapping from returned xml data
When grabbing data via votable_interceptor.last_payload from the
suds.client.Client module, it returns the xml data in an un-helpful
"<s:Envelope>" that needs to be removed. This function politely cleans
it up.
... | def suds_unwrapper(wrapped_data):
"""
Removes suds wrapping from returned xml data
When grabbing data via votable_interceptor.last_payload from the
suds.client.Client module, it returns the xml data in an un-helpful
"<s:Envelope>" that needs to be removed. This function politely cleans
it up.
... | https://github.com/sunpy/sunpy/issues/2043 | from sunpy.net.helio import hec
hc = hec.HECClient()
hc.get_table_names()
...
markup_type=markup_type))
a bytes-like object is required, not 'str'
Traceback (most recent call last):
File "/.../github/sunpy/env35/lib/python3.5/site-packages/suds/plugin.py", line 255, in __call__
method(ctx)
File "/.../github/sunpy/sunp... | TypeError |
def votable_handler(xml_table):
"""
Returns a VOtable object from a VOtable style xml string
In order to get a VOtable object, it has to be parsed from an xml file or
file-like object. This function creates a file-like object via the
StringIO module, writes the xml data to it, then passes the file-... | def votable_handler(xml_table):
"""
Returns a VOtable object from a VOtable style xml string
In order to get a VOtable object, it has to be parsed from an xml file or
file-like object. This function creates a file-like object via the
StringIO module, writes the xml data to it, then passes the file-... | https://github.com/sunpy/sunpy/issues/2043 | from sunpy.net.helio import hec
hc = hec.HECClient()
hc.get_table_names()
...
markup_type=markup_type))
a bytes-like object is required, not 'str'
Traceback (most recent call last):
File "/.../github/sunpy/env35/lib/python3.5/site-packages/suds/plugin.py", line 255, in __call__
method(ctx)
File "/.../github/sunpy/sunp... | TypeError |
def __init__(self, data, header, plot_settings=None, **kwargs):
# If the data has more than two dimensions, the first dimensions
# (NAXIS1, NAXIS2) are used and the rest are discarded.
ndim = data.ndim
if ndim > 2:
# We create a slice that removes all but the 'last' two
# dimensions. (No... | def __init__(self, data, header, plot_settings=None, **kwargs):
super(GenericMap, self).__init__(data, meta=header, **kwargs)
# Correct possibly missing meta keywords
self._fix_date()
self._fix_naxis()
# Setup some attributes
self._nickname = None
# Validate header
# TODO: This should... | https://github.com/sunpy/sunpy/issues/1919 | In [6]: map.Map('1130643840_vv_c076-077_f8-14_t034345_t034444_XX_d002.fits')
Out[6]: ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/Users/kamen/anaconda/lib/python2.7/site-packages/IPython/core/formatters.pyc in __... | TypeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.