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 create_paramfile(trans, uploaded_datasets):
"""
Create the upload tool's JSON "param" file.
"""
def _chown(path):
try:
# get username from email/username
pwent = trans.user.system_user_pwent(trans.app.config.real_system_username)
cmd = shlex.split(trans.a... | def create_paramfile(trans, uploaded_datasets):
"""
Create the upload tool's JSON "param" file.
"""
def _chown(path):
try:
# get username from email/username
pwent = trans.user.system_user_pwent(trans.app.config.real_system_username)
cmd = shlex.split(trans.a... | https://github.com/galaxyproject/galaxy/issues/4300 | Traceback (most recent call last):
File "/gpfs1/data/galaxy_server/galaxy-dev/tools/data_source/upload.py", line 425, in <module>
__main__()
File "/gpfs1/data/galaxy_server/galaxy-dev/tools/data_source/upload.py", line 413, in __main__
add_file( dataset, registry, json_file, output_path )
File "/gpfs1/data/galaxy_serve... | OSError |
def add_file(dataset, registry, json_file, output_path):
data_type = None
line_count = None
converted_path = None
stdout = None
link_data_only = dataset.get("link_data_only", "copy_files")
run_as_real_user = in_place = dataset.get("in_place", True)
purge_source = dataset.get("purge_source", ... | def add_file(dataset, registry, json_file, output_path):
data_type = None
line_count = None
converted_path = None
stdout = None
link_data_only = dataset.get("link_data_only", "copy_files")
in_place = dataset.get("in_place", True)
purge_source = dataset.get("purge_source", True)
check_con... | https://github.com/galaxyproject/galaxy/issues/4300 | Traceback (most recent call last):
File "/gpfs1/data/galaxy_server/galaxy-dev/tools/data_source/upload.py", line 425, in <module>
__main__()
File "/gpfs1/data/galaxy_server/galaxy-dev/tools/data_source/upload.py", line 413, in __main__
add_file( dataset, registry, json_file, output_path )
File "/gpfs1/data/galaxy_serve... | OSError |
def add_file(dataset, registry, json_file, output_path):
data_type = None
line_count = None
converted_path = None
stdout = None
link_data_only = dataset.get("link_data_only", "copy_files")
run_as_real_user = in_place = dataset.get("in_place", True)
purge_source = dataset.get("purge_source", ... | def add_file(dataset, registry, json_file, output_path):
data_type = None
line_count = None
converted_path = None
stdout = None
link_data_only = dataset.get("link_data_only", "copy_files")
in_place = dataset.get("in_place", True)
purge_source = dataset.get("purge_source", True)
# in_plac... | https://github.com/galaxyproject/galaxy/issues/4300 | Traceback (most recent call last):
File "/gpfs1/data/galaxy_server/galaxy-dev/tools/data_source/upload.py", line 425, in <module>
__main__()
File "/gpfs1/data/galaxy_server/galaxy-dev/tools/data_source/upload.py", line 413, in __main__
add_file( dataset, registry, json_file, output_path )
File "/gpfs1/data/galaxy_serve... | OSError |
def build_command(
runner,
job_wrapper,
container=None,
modify_command_for_container=True,
include_metadata=False,
include_work_dir_outputs=True,
create_tool_working_directory=True,
remote_command_params={},
metadata_directory=None,
):
"""
Compose the sequence of commands nec... | def build_command(
runner,
job_wrapper,
container=None,
modify_command_for_container=True,
include_metadata=False,
include_work_dir_outputs=True,
create_tool_working_directory=True,
remote_command_params={},
metadata_directory=None,
):
"""
Compose the sequence of commands nec... | https://github.com/galaxyproject/galaxy/issues/4381 | ======================================================================
FAIL: NCBI BLAST+ blastn ( ncbi_blastn_wrapper ) > Test-1
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/peterjc/galaxy_blast/galaxy-dev/test/functional/test_toolbox... | JobOutputsError |
def build_command(
runner,
job_wrapper,
container=None,
modify_command_for_container=True,
include_metadata=False,
include_work_dir_outputs=True,
create_tool_working_directory=True,
remote_command_params={},
metadata_directory=None,
):
"""
Compose the sequence of commands nec... | def build_command(
runner,
job_wrapper,
container=None,
modify_command_for_container=True,
include_metadata=False,
include_work_dir_outputs=True,
create_tool_working_directory=True,
remote_command_params={},
metadata_directory=None,
):
"""
Compose the sequence of commands nec... | https://github.com/galaxyproject/galaxy/issues/4381 | ======================================================================
FAIL: NCBI BLAST+ blastn ( ncbi_blastn_wrapper ) > Test-1
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/peterjc/galaxy_blast/galaxy-dev/test/functional/test_toolbox... | JobOutputsError |
def get_data_inputs(self):
"""Get configure time data input descriptions."""
# Filter subworkflow steps and get inputs
step_to_input_type = {
"data_input": "dataset",
"data_collection_input": "dataset_collection",
}
inputs = []
if hasattr(self.subworkflow, "input_steps"):
... | def get_data_inputs(self):
"""Get configure time data input descriptions."""
# Filter subworkflow steps and get inputs
step_to_input_type = {
"data_input": "dataset",
"data_collection_input": "dataset_collection",
}
inputs = []
if hasattr(self.subworkflow, "input_steps"):
... | https://github.com/galaxyproject/galaxy/issues/3120 | Traceback (most recent call last):
File "/home/eteri/GalaxyProject/galaxy/lib/galaxy/workflow/run.py", line 82, in __invoke
outputs = invoker.invoke()
File "/home/eteri/GalaxyProject/galaxy/lib/galaxy/workflow/run.py", line 160, in invoke
jobs = self._invoke_step( step )
File "/home/eteri/GalaxyProject/galaxy/lib/galax... | Exception |
def get_data_outputs(self):
outputs = []
if hasattr(self.subworkflow, "workflow_outputs"):
for workflow_output in self.subworkflow.workflow_outputs:
if workflow_output.workflow_step.type in {
"data_input",
"data_collection_input",
}:
... | def get_data_outputs(self):
outputs = []
if hasattr(self.subworkflow, "workflow_outputs"):
for workflow_output in self.subworkflow.workflow_outputs:
output_step = workflow_output.workflow_step
label = workflow_output.label
if label is None:
label = "%s... | https://github.com/galaxyproject/galaxy/issues/3120 | Traceback (most recent call last):
File "/home/eteri/GalaxyProject/galaxy/lib/galaxy/workflow/run.py", line 82, in __invoke
outputs = invoker.invoke()
File "/home/eteri/GalaxyProject/galaxy/lib/galaxy/workflow/run.py", line 160, in invoke
jobs = self._invoke_step( step )
File "/home/eteri/GalaxyProject/galaxy/lib/galax... | Exception |
def execute(self, trans, progress, invocation, step):
"""Execute the given workflow step in the given workflow invocation.
Use the supplied workflow progress object to track outputs, find
inputs, etc...
"""
subworkflow_invoker = progress.subworkflow_invoker(trans, step)
subworkflow_invoker.invok... | def execute(self, trans, progress, invocation, step):
"""Execute the given workflow step in the given workflow invocation.
Use the supplied workflow progress object to track outputs, find
inputs, etc...
"""
subworkflow_invoker = progress.subworkflow_invoker(trans, step)
subworkflow_invoker.invok... | https://github.com/galaxyproject/galaxy/issues/3120 | Traceback (most recent call last):
File "/home/eteri/GalaxyProject/galaxy/lib/galaxy/workflow/run.py", line 82, in __invoke
outputs = invoker.invoke()
File "/home/eteri/GalaxyProject/galaxy/lib/galaxy/workflow/run.py", line 160, in invoke
jobs = self._invoke_step( step )
File "/home/eteri/GalaxyProject/galaxy/lib/galax... | Exception |
def get_filter_set(self, connections=None):
filter_set = []
if connections:
for oc in connections:
for ic in oc.input_step.module.get_data_inputs():
if (
"extensions" in ic
and ic["extensions"] != "input"
and ic["nam... | def get_filter_set(self, connections=None):
filter_set = []
if connections:
for oc in connections:
for ic in oc.input_step.module.get_data_inputs():
if "extensions" in ic and ic["name"] == oc.input_name:
filter_set += ic["extensions"]
if not filter_set... | https://github.com/galaxyproject/galaxy/issues/3120 | Traceback (most recent call last):
File "/home/eteri/GalaxyProject/galaxy/lib/galaxy/workflow/run.py", line 82, in __invoke
outputs = invoker.invoke()
File "/home/eteri/GalaxyProject/galaxy/lib/galaxy/workflow/run.py", line 160, in invoke
jobs = self._invoke_step( step )
File "/home/eteri/GalaxyProject/galaxy/lib/galax... | Exception |
def populate_state(
request_context,
inputs,
incoming,
state,
errors={},
prefix="",
context=None,
check=True,
):
"""
Populates nested state dict from incoming parameter values.
>>> from xml.etree.ElementTree import XML
>>> from galaxy.util.bunch import Bunch
>>> from ... | def populate_state(
request_context,
inputs,
incoming,
state,
errors={},
prefix="",
context=None,
check=True,
):
"""
Populates nested state dict from incoming parameter values.
>>> from xml.etree.ElementTree import XML
>>> from galaxy.util.bunch import Bunch
>>> from ... | https://github.com/galaxyproject/galaxy/issues/4106 | galaxy.web.framework.decorators ERROR 2017-05-22 12:39:15,677 Uncaught exception in exposed API method:
Traceback (most recent call last):
File "lib/galaxy/web/framework/decorators.py", line 281, in decorator rval = func( self, trans, *args, **kwargs )
File "lib/galaxy/webapps/galaxy/api/workflows.py", line 367, in bui... | DataError |
def reload_data_managers(app, **kwargs):
from galaxy.tools.data_manager.manager import DataManagers
from galaxy.tools.toolbox.lineages.tool_shed import ToolVersionCache
log.debug("Executing data managers reload on '%s'", app.config.server_name)
app._configure_tool_data_tables(from_shed_config=False)
... | def reload_data_managers(app, **kwargs):
from galaxy.tools.data_manager.manager import DataManagers
log.debug("Executing data managers reload on '%s'", app.config.server_name)
app._configure_tool_data_tables(from_shed_config=False)
reload_tool_data_tables(app)
reload_count = app.data_managers._relo... | https://github.com/galaxyproject/galaxy/issues/3902 | galaxy.web.framework.decorators ERROR 2017-04-08 10:22:00,380 Uncaught exception in exposed API method:
Traceback (most recent call last):
File "/var/galaxy/galaxy/lib/galaxy/web/framework/decorators.py", line 282, in decorator
rval = func( self, trans, *args, **kwargs )
File "/var/galaxy/galaxy/lib/galaxy/webapps/gala... | DetachedInstanceError |
def __init__(self, job_wrapper, job_destination):
self.runner_state_handled = False
self.job_wrapper = job_wrapper
self.job_destination = job_destination
self.cleanup_file_attributes = [
"job_file",
"output_file",
"error_file",
"exit_code_file",
]
| def __init__(self, job_wrapper, job_destination):
self.runner_state_handled = False
self.job_wrapper = job_wrapper
self.job_destination = job_destination
| https://github.com/galaxyproject/galaxy/issues/3801 | galaxy.jobs.runners ERROR 2017-03-22 11:53:04,424 (1778) Unhandled exception calling queue_job
Traceback (most recent call last):
File "galaxy/lib/galaxy/jobs/runners/__init__.py", line 104, in run_next
method(arg)
File "galaxy/lib/galaxy/jobs/runners/local.py", line 133, in queue_job
self._fail_job_local(job_wrapper, ... | AttributeError |
def __init__(
self,
files_dir=None,
job_wrapper=None,
job_id=None,
job_file=None,
output_file=None,
error_file=None,
exit_code_file=None,
job_name=None,
job_destination=None,
):
super(AsynchronousJobState, self).__init__(job_wrapper, job_destination)
self.old_state = None... | def __init__(
self,
files_dir=None,
job_wrapper=None,
job_id=None,
job_file=None,
output_file=None,
error_file=None,
exit_code_file=None,
job_name=None,
job_destination=None,
):
super(AsynchronousJobState, self).__init__(job_wrapper, job_destination)
self.old_state = None... | https://github.com/galaxyproject/galaxy/issues/3801 | galaxy.jobs.runners ERROR 2017-03-22 11:53:04,424 (1778) Unhandled exception calling queue_job
Traceback (most recent call last):
File "galaxy/lib/galaxy/jobs/runners/__init__.py", line 104, in run_next
method(arg)
File "galaxy/lib/galaxy/jobs/runners/local.py", line 133, in queue_job
self._fail_job_local(job_wrapper, ... | AttributeError |
def cleanup(self):
for file in [
getattr(self, a) for a in self.cleanup_file_attributes if hasattr(self, a)
]:
try:
os.unlink(file)
except Exception as e:
# TODO: Move this prefix stuff to a method so we don't have dispatch on attributes we may or may
... | def cleanup(self):
for file in [
getattr(self, a) for a in self.cleanup_file_attributes if hasattr(self, a)
]:
try:
os.unlink(file)
except Exception as e:
log.debug(
"(%s/%s) Unable to cleanup %s: %s"
% (self.job_wrapper.get_id_tag(... | https://github.com/galaxyproject/galaxy/issues/3801 | galaxy.jobs.runners ERROR 2017-03-22 11:53:04,424 (1778) Unhandled exception calling queue_job
Traceback (most recent call last):
File "galaxy/lib/galaxy/jobs/runners/__init__.py", line 104, in run_next
method(arg)
File "galaxy/lib/galaxy/jobs/runners/local.py", line 133, in queue_job
self._fail_job_local(job_wrapper, ... | AttributeError |
def queue_job(self, job_wrapper):
"""Create job script and submit it to the DRM"""
# prepare the job
include_metadata = asbool(
job_wrapper.job_destination.params.get("embed_metadata_in_job", True)
)
if not self.prepare_job(job_wrapper, include_metadata=include_metadata):
return
... | def queue_job(self, job_wrapper):
"""Create job script and submit it to the DRM"""
# prepare the job
include_metadata = asbool(
job_wrapper.job_destination.params.get("embed_metadata_in_job", True)
)
if not self.prepare_job(job_wrapper, include_metadata=include_metadata):
return
... | https://github.com/galaxyproject/galaxy/issues/3455 | Traceback (most recent call last):
File "/galaxy-central/lib/galaxy/jobs/runners/__init__.py", line 104, in run_next
method(arg)
File "/galaxy-central/lib/galaxy/jobs/runners/condor.py", line 69, in queue_job
container = self.find_container( job_wrapper )
AttributeError: 'CondorJobRunner' object has no attribute 'find_... | AttributeError |
def _write_integrated_tool_panel_config_file(self):
"""
Write the current in-memory version of the integrated_tool_panel.xml file to disk. Since Galaxy administrators
use this file to manage the tool panel, we'll not use xml_to_string() since it doesn't write XML quite right.
"""
tracking_directory... | def _write_integrated_tool_panel_config_file(self):
"""
Write the current in-memory version of the integrated_tool_panel.xml file to disk. Since Galaxy administrators
use this file to manage the tool panel, we'll not use xml_to_string() since it doesn't write XML quite right.
"""
tracking_directory... | https://github.com/galaxyproject/galaxy/issues/3084 | ...
galaxy.jobs DEBUG 2016-10-24 14:39:57,371 Loading job configuration from ./config/job_conf.xml
galaxy.jobs DEBUG 2016-10-24 14:39:57,372 Read definition for handler 'main'
galaxy.jobs INFO 2016-10-24 14:39:57,373 Setting <handlers> default to child with id 'main'
galaxy.jobs DEBUG 2016-10-24 14:39:57,374 <destinati... | ParseError |
def parse_xml(fname):
"""Returns a parsed xml tree"""
# handle deprecation warning for XMLParsing a file with DOCTYPE
class DoctypeSafeCallbackTarget(ElementTree.TreeBuilder):
def doctype(*args):
pass
tree = ElementTree.ElementTree()
try:
root = tree.parse(
... | def parse_xml(fname):
"""Returns a parsed xml tree"""
# handle deprecation warning for XMLParsing a file with DOCTYPE
class DoctypeSafeCallbackTarget(ElementTree.TreeBuilder):
def doctype(*args):
pass
tree = ElementTree.ElementTree()
root = tree.parse(
fname, parser=Ele... | https://github.com/galaxyproject/galaxy/issues/3084 | ...
galaxy.jobs DEBUG 2016-10-24 14:39:57,371 Loading job configuration from ./config/job_conf.xml
galaxy.jobs DEBUG 2016-10-24 14:39:57,372 Read definition for handler 'main'
galaxy.jobs INFO 2016-10-24 14:39:57,373 Setting <handlers> default to child with id 'main'
galaxy.jobs DEBUG 2016-10-24 14:39:57,374 <destinati... | ParseError |
def start(self):
if not self._active:
self._active = True
register_postfork_function(self.thread.start)
| def start(self):
if not self._active:
self._active = True
self.thread.start()
| https://github.com/galaxyproject/galaxy/issues/2831 | $ . .venv/bin/activate
(.venv)$ pip install watchdog
(.venv)$ tox -e py27-unit
...
======================================================================
FAIL: tools.test_watcher.test_tool_conf_watcher
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/g... | AssertionError |
def monitor(self, path):
mod_time = None
if os.path.exists(path):
mod_time = time.ctime(os.path.getmtime(path))
with self._lock:
self.paths[path] = mod_time
self.start()
| def monitor(self, path):
mod_time = None
if os.path.exists(path):
mod_time = time.ctime(os.path.getmtime(path))
with self._lock:
self.paths[path] = mod_time
| https://github.com/galaxyproject/galaxy/issues/2831 | $ . .venv/bin/activate
(.venv)$ pip install watchdog
(.venv)$ tox -e py27-unit
...
======================================================================
FAIL: tools.test_watcher.test_tool_conf_watcher
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/g... | AssertionError |
def encode_dict_ids(self, a_dict, kind=None, skip_startswith=None):
"""
Encode all ids in dictionary. Ids are identified by (a) an 'id' key or
(b) a key that ends with '_id'
"""
for key, val in a_dict.items():
if (
key == "id"
or key.endswith("_id")
and (s... | def encode_dict_ids(self, a_dict, kind=None):
"""
Encode all ids in dictionary. Ids are identified by (a) an 'id' key or
(b) a key that ends with '_id'
"""
for key, val in a_dict.items():
if key == "id" or key.endswith("_id"):
a_dict[key] = self.encode_id(val, kind=kind)
ret... | https://github.com/galaxyproject/galaxy/issues/2423 | ERROR: Convert BIOM ( biom_convert ) > Test-1
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/tmp_EztYh/galaxy-dev/test/functional/test_toolbox.py", line 299, in test_tool
self.do_it( td )
File "/tmp/tmp_EztYh/galaxy-dev/test/functional/test_toolbox.p... | RunToolException |
def execute(cls, app, sa_session, action, job, replacement_dict):
# TODO Optimize this later. Just making it work for now.
# TODO Support purging as well as deletion if user_purge is enabled.
# Dataset candidates for deletion must be
# 1) Created by the workflow.
# 2) Not have any job_to_input_data... | def execute(cls, app, sa_session, action, job, replacement_dict):
# TODO Optimize this later. Just making it work for now.
# TODO Support purging as well as deletion if user_purge is enabled.
# Dataset candidates for deletion must be
# 1) Created by the workflow.
# 2) Not have any job_to_input_data... | https://github.com/galaxyproject/galaxy/issues/1531 | job traceback:
Traceback (most recent call last):
File "/galaxy-repl/instances/main/server/lib/galaxy/jobs/runners/__init__.py", line 590, in finish_job
job_state.job_wrapper.finish( stdout, stderr, exit_code )
File "/galaxy-repl/instances/main/server/lib/galaxy/jobs/__init__.py", line 1275, in finish
ActionBox.execute... | AttributeError |
def _workflow_to_dict_editor(self, trans, stored):
""" """
workflow = stored.latest_workflow
# Pack workflow data into a dictionary and return
data = {}
data["name"] = workflow.name
data["steps"] = {}
data["upgrade_messages"] = {}
# For each step, rebuild the form and encode the state
... | def _workflow_to_dict_editor(self, trans, stored):
""" """
workflow = stored.latest_workflow
# Pack workflow data into a dictionary and return
data = {}
data["name"] = workflow.name
data["steps"] = {}
data["upgrade_messages"] = {}
# For each step, rebuild the form and encode the state
... | https://github.com/galaxyproject/galaxy/issues/734 | ======================================================================
FAIL: test_export_editor (api.test_workflows.WorkflowsApiTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/galaxy/test/api/test_workflows.py", line 395, in test_export_edit... | AssertionError |
def get_feature_meta(column, preprocessing_parameters, backend):
column = column.astype(str)
idx2str, str2idx, str2freq, max_size, _, _, _ = create_vocabulary(
column,
preprocessing_parameters["tokenizer"],
num_most_frequent=preprocessing_parameters["most_common"],
lowercase=prep... | def get_feature_meta(column, preprocessing_parameters, backend):
idx2str, str2idx, str2freq, max_size, _, _, _ = create_vocabulary(
column,
preprocessing_parameters["tokenizer"],
num_most_frequent=preprocessing_parameters["most_common"],
lowercase=preprocessing_parameters["lowercase"... | https://github.com/ludwig-ai/ludwig/issues/1040 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-13-c2e6c8f1ae7c> in <module>()
10 skip_save_progress=True,
11 skip_save_model=False,
---> 12 skip_save_processed_input=True
13 )
/usr/local/l... | AttributeError |
def get_feature_meta(column, preprocessing_parameters, backend):
column = column.astype(str)
idx2str, str2idx, str2freq, _, _, _, _ = create_vocabulary(
column,
"stripped",
num_most_frequent=preprocessing_parameters["most_common"],
lowercase=preprocessing_parameters["lowercase"],... | def get_feature_meta(column, preprocessing_parameters, backend):
idx2str, str2idx, str2freq, _, _, _, _ = create_vocabulary(
column,
"stripped",
num_most_frequent=preprocessing_parameters["most_common"],
lowercase=preprocessing_parameters["lowercase"],
add_padding=False,
... | https://github.com/ludwig-ai/ludwig/issues/1040 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-13-c2e6c8f1ae7c> in <module>()
10 skip_save_progress=True,
11 skip_save_model=False,
---> 12 skip_save_processed_input=True
13 )
/usr/local/l... | AttributeError |
def get_feature_meta(column, preprocessing_parameters, backend):
column = column.astype(str)
idx2str, str2idx, str2freq, max_length, _, _, _ = create_vocabulary(
column,
preprocessing_parameters["tokenizer"],
lowercase=preprocessing_parameters["lowercase"],
num_most_frequent=prep... | def get_feature_meta(column, preprocessing_parameters, backend):
idx2str, str2idx, str2freq, max_length, _, _, _ = create_vocabulary(
column,
preprocessing_parameters["tokenizer"],
lowercase=preprocessing_parameters["lowercase"],
num_most_frequent=preprocessing_parameters["most_commo... | https://github.com/ludwig-ai/ludwig/issues/1040 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-13-c2e6c8f1ae7c> in <module>()
10 skip_save_progress=True,
11 skip_save_model=False,
---> 12 skip_save_processed_input=True
13 )
/usr/local/l... | AttributeError |
def get_feature_meta(column, preprocessing_parameters, backend):
column = column.astype(str)
idx2str, str2idx, str2freq, max_size, _, _, _ = create_vocabulary(
column,
preprocessing_parameters["tokenizer"],
num_most_frequent=preprocessing_parameters["most_common"],
lowercase=prep... | def get_feature_meta(column, preprocessing_parameters, backend):
idx2str, str2idx, str2freq, max_size, _, _, _ = create_vocabulary(
column,
preprocessing_parameters["tokenizer"],
num_most_frequent=preprocessing_parameters["most_common"],
lowercase=preprocessing_parameters["lowercase"... | https://github.com/ludwig-ai/ludwig/issues/1040 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-13-c2e6c8f1ae7c> in <module>()
10 skip_save_progress=True,
11 skip_save_model=False,
---> 12 skip_save_processed_input=True
13 )
/usr/local/l... | AttributeError |
def get_feature_meta(column, preprocessing_parameters, backend):
column = column.astype(str)
tf_meta = TextFeatureMixin.feature_meta(column, preprocessing_parameters, backend)
(
char_idx2str,
char_str2idx,
char_str2freq,
char_max_len,
char_pad_idx,
char_pad_sy... | def get_feature_meta(column, preprocessing_parameters, backend):
tf_meta = TextFeatureMixin.feature_meta(column, preprocessing_parameters, backend)
(
char_idx2str,
char_str2idx,
char_str2freq,
char_max_len,
char_pad_idx,
char_pad_symbol,
char_unk_symbol,
... | https://github.com/ludwig-ai/ludwig/issues/1040 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-13-c2e6c8f1ae7c> in <module>()
10 skip_save_progress=True,
11 skip_save_model=False,
---> 12 skip_save_processed_input=True
13 )
/usr/local/l... | AttributeError |
def get_feature_meta(column, preprocessing_parameters, backend):
column = column.astype(str)
tokenizer = get_from_registry(
preprocessing_parameters["tokenizer"], tokenizer_registry
)()
max_length = 0
for timeseries in column:
processed_line = tokenizer(timeseries)
max_length... | def get_feature_meta(column, preprocessing_parameters, backend):
tokenizer = get_from_registry(
preprocessing_parameters["tokenizer"], tokenizer_registry
)()
max_length = 0
for timeseries in column:
processed_line = tokenizer(timeseries)
max_length = max(max_length, len(processed... | https://github.com/ludwig-ai/ludwig/issues/1040 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-13-c2e6c8f1ae7c> in <module>()
10 skip_save_progress=True,
11 skip_save_model=False,
---> 12 skip_save_processed_input=True
13 )
/usr/local/l... | AttributeError |
def decoder_teacher_forcing(self, encoder_output, target=None, encoder_end_state=None):
# ================ Setup ================
batch_size = tf.shape(encoder_output)[0]
# Prepare target for decoding
target_sequence_length = sequence_length_2D(target)
start_tokens = tf.tile([self.GO_SYMBOL], [batc... | def decoder_teacher_forcing(self, encoder_output, target=None, encoder_end_state=None):
# ================ Setup ================
batch_size = encoder_output.shape[0]
# Prepare target for decoding
target_sequence_length = sequence_length_2D(target)
start_tokens = tf.tile([self.GO_SYMBOL], [batch_si... | https://github.com/ludwig-ai/ludwig/issues/960 | 2020-10-19 03:06:47.001119: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
Traceback (most recent call last):
File "train.py", line 78, in <module>
train(args)
File "train.py", line 41, in train
ludwig_model.save_savedmodel(args.model_dir)
File "/usr/local/lib/pytho... | AttributeError |
def logits(self, inputs, target=None, training=None):
if training and target is not None:
return self.decoder_obj._logits_training(
inputs, target=tf.cast(target, dtype=tf.int32), training=training
)
else:
return inputs
| def logits(self, inputs, target=None, training=None):
if training:
return self.decoder_obj._logits_training(
inputs, target=tf.cast(target, dtype=tf.int32), training=training
)
else:
return inputs
| https://github.com/ludwig-ai/ludwig/issues/960 | 2020-10-19 03:06:47.001119: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
Traceback (most recent call last):
File "train.py", line 78, in <module>
train(args)
File "train.py", line 41, in train
ludwig_model.save_savedmodel(args.model_dir)
File "/usr/local/lib/pytho... | AttributeError |
def calibration_plot(
fraction_positives, mean_predicted_values, algorithm_names=None, filename=None
):
assert len(fraction_positives) == len(mean_predicted_values)
sns.set_style("whitegrid")
colors = plt.get_cmap("tab10").colors
num_algorithms = len(fraction_positives)
plt.figure(figsize=(9... | def calibration_plot(
fraction_positives, mean_predicted_values, algorithm_names=None, filename=None
):
assert len(fraction_positives) == len(mean_predicted_values)
sns.set_style("whitegrid")
colors = plt.get_cmap("tab10").colors
num_algorithms = len(fraction_positives)
plt.figure(figsize=(9... | https://github.com/ludwig-ai/ludwig/issues/620 | for command, viz_pattern in zip(commands, vis_patterns):
result = subprocess.run(command)
figure_cnt = glob.glob(viz_pattern)
assert 0 == result.returncode
E AssertionError: assert 0 == 1
E + where 1 = CompletedProcess(args=['python', '-m', 'ludwig.visualize', '--visualization', 'calibration_1_vs... | IndexError |
def train_online(
self,
data_df=None,
data_csv=None,
data_dict=None,
batch_size=None,
learning_rate=None,
regularization_lambda=None,
dropout_rate=None,
bucketing_field=None,
gpus=None,
gpu_fraction=1,
logging_level=logging.ERROR,
):
"""This function is used to perfor... | def train_online(
self,
data_df=None,
data_csv=None,
data_dict=None,
batch_size=None,
learning_rate=None,
regularization_lambda=None,
dropout_rate=None,
bucketing_field=None,
gpus=None,
gpu_fraction=1,
logging_level=logging.ERROR,
):
"""This function is used to perfor... | https://github.com/ludwig-ai/ludwig/issues/100 | Traceback (most recent call last):
File "/home/andrey/.venvs/ludwig-learn/bin/ludwig", line 11, in <module>
sys.exit(main())
File "/home/andrey/.venvs/ludwig-learn/lib/python3.6/site-packages/ludwig/cli.py", line 86, in main
CLI()
File "/home/andrey/.venvs/ludwig-learn/lib/python3.6/site-packages/ludwig/cli.py", line 6... | ValueError |
def add_feature_data(feature, dataset_df, data, metadata, preprocessing_parameters):
set_default_value(feature, "in_memory", preprocessing_parameters["in_memory"])
if "height" in preprocessing_parameters or "width" in preprocessing_parameters:
should_resize = True
try:
provided_heig... | def add_feature_data(feature, dataset_df, data, metadata, preprocessing_parameters):
set_default_value(feature, "in_memory", preprocessing_parameters["in_memory"])
if "height" in preprocessing_parameters or "width" in preprocessing_parameters:
should_resize = True
try:
provided_heig... | https://github.com/ludwig-ai/ludwig/issues/100 | Traceback (most recent call last):
File "/home/andrey/.venvs/ludwig-learn/bin/ludwig", line 11, in <module>
sys.exit(main())
File "/home/andrey/.venvs/ludwig-learn/lib/python3.6/site-packages/ludwig/cli.py", line 86, in main
CLI()
File "/home/andrey/.venvs/ludwig-learn/lib/python3.6/site-packages/ludwig/cli.py", line 6... | ValueError |
def __init__(self, feature):
super().__init__(feature)
self.height = 0
self.width = 0
self.num_channels = 0
self.in_memory = True
self.encoder = "stacked_cnn"
encoder_parameters = self.overwrite_defaults(feature)
self.encoder_obj = self.get_image_encoder(encoder_parameters)
| def __init__(self, feature):
super().__init__(feature)
self.height = 0
self.width = 0
self.num_channels = 0
self.in_memory = True
self.data_hdf5_fp = ""
self.encoder = "stacked_cnn"
encoder_parameters = self.overwrite_defaults(feature)
self.encoder_obj = self.get_image_encoder(e... | https://github.com/ludwig-ai/ludwig/issues/100 | Traceback (most recent call last):
File "/home/andrey/.venvs/ludwig-learn/bin/ludwig", line 11, in <module>
sys.exit(main())
File "/home/andrey/.venvs/ludwig-learn/lib/python3.6/site-packages/ludwig/cli.py", line 86, in main
CLI()
File "/home/andrey/.venvs/ludwig-learn/lib/python3.6/site-packages/ludwig/cli.py", line 6... | ValueError |
def update_model_definition_with_metadata(
input_feature, feature_metadata, *args, **kwargs
):
for dim in ["height", "width", "num_channels"]:
input_feature[dim] = feature_metadata["preprocessing"][dim]
| def update_model_definition_with_metadata(
input_feature, feature_metadata, *args, **kwargs
):
for dim in ["height", "width", "num_channels"]:
input_feature[dim] = feature_metadata["preprocessing"][dim]
input_feature["data_hdf5_fp"] = kwargs["model_definition"]["data_hdf5_fp"]
| https://github.com/ludwig-ai/ludwig/issues/100 | Traceback (most recent call last):
File "/home/andrey/.venvs/ludwig-learn/bin/ludwig", line 11, in <module>
sys.exit(main())
File "/home/andrey/.venvs/ludwig-learn/lib/python3.6/site-packages/ludwig/cli.py", line 86, in main
CLI()
File "/home/andrey/.venvs/ludwig-learn/lib/python3.6/site-packages/ludwig/cli.py", line 6... | ValueError |
def preprocess_for_prediction(
model_path,
split,
dataset_type="generic",
data_csv=None,
data_hdf5=None,
train_set_metadata=None,
only_predictions=False,
):
"""Preprocesses the dataset to parse it into a format that is usable by the
Ludwig core
:param model_path: The input da... | def preprocess_for_prediction(
model_path,
split,
dataset_type="generic",
data_csv=None,
data_hdf5=None,
train_set_metadata=None,
only_predictions=False,
):
"""Preprocesses the dataset to parse it into a format that is usable by the
Ludwig core
:param model_path: The input da... | https://github.com/ludwig-ai/ludwig/issues/100 | Traceback (most recent call last):
File "/home/andrey/.venvs/ludwig-learn/bin/ludwig", line 11, in <module>
sys.exit(main())
File "/home/andrey/.venvs/ludwig-learn/lib/python3.6/site-packages/ludwig/cli.py", line 86, in main
CLI()
File "/home/andrey/.venvs/ludwig-learn/lib/python3.6/site-packages/ludwig/cli.py", line 6... | ValueError |
def save_csv(data_fp, data):
with open(data_fp, "w", encoding="utf-8") as csv_file:
writer = csv.writer(csv_file)
for row in data:
if not isinstance(row, collections.Iterable) or isinstance(row, str):
row = [row]
writer.writerow(row)
| def save_csv(data_fp, data):
writer = csv.writer(open(data_fp, "w"))
for row in data:
if not isinstance(row, collections.Iterable) or isinstance(row, str):
row = [row]
writer.writerow(row)
| https://github.com/ludwig-ai/ludwig/issues/90 | Traceback (most recent call last):
File "C:\Users\xxx\AppData\Local\Programs\Python\Python36\Scripts\ludwig-script.py", line 11, in <module>
load_entry_point('ludwig==0.1.0', 'console_scripts', 'ludwig')()
File "c:\users\xxx\appdata\local\programs\python\python36\lib\site-packages\ludwig\cli.py", line 86, in main
CLI()... | UnicodeEncodeError |
def replace_text_feature_level(model_definition, datasets):
for feature in (
model_definition["input_features"] + model_definition["output_features"]
):
if feature["type"] == TEXT:
for dataset in datasets:
dataset[feature["name"]] = dataset[
"{}_{}... | def replace_text_feature_level(model_definition, datasets):
for feature in (
model_definition["input_features"] + model_definition["output_features"]
):
if feature["type"] == TEXT:
for dataset in datasets:
dataset[feature["name"]] = dataset[
"{}_{}... | https://github.com/ludwig-ai/ludwig/issues/56 | Traceback (most recent call last):
File "/Users/user/.virtualenvs/ml/bin/ludwig", line 10, in <module>
sys.exit(main())
File "/Users/user/.virtualenvs/ml/lib/python3.6/site-packages/ludwig/cli.py", line 86, in main
CLI()
File "/Users/user/.virtualenvs/ml/lib/python3.6/site-packages/ludwig/cli.py", line 64, in __init__
... | KeyError |
def get_elements_by_categories(element_bicats, elements=None, doc=None):
# if source elements is provided
if elements:
return [
x
for x in elements
if get_builtincategory(x.Category.Name) in element_bicats
]
# otherwise collect from model
cat_filters ... | def get_elements_by_categories(element_bicats, elements=None, doc=None):
# if source elements is provided
if elements:
return [
x
for x in elements
if get_builtincategory(x.Category.Name) in element_bicats
]
# otherwise collect from model
cat_filters ... | https://github.com/eirannejad/pyRevit/issues/833 | ERROR [pyrevit.revit.db.transaction] Error in TransactionGroup Context. Rolling back changes. | <type 'exceptions.Exception'>:The input argument "categoryId" of function `anonymous-namespace'::ElementCategoryFilter_constructor or one item in the collection is null at line 230 of file d:\ship\2019_px64\source\revit\revi... | Exception |
def save_options(self, sender, args):
# base
self._config.halftone = self.halftone.IsChecked
self._config.transparency = self.transparency.IsChecked
# projection lines
self._config.proj_line_color = self.proj_line_color.IsChecked
self._config.proj_line_pattern = self.proj_line_pattern.IsChecked... | def save_options(self, sender, args):
self._config.halftone = self.halftone.IsChecked
self._config.transparency = self.transparency.IsChecked
self._config.proj_line_color = self.proj_line_color.IsChecked
self._config.proj_line_pattern = self.proj_line_pattern.IsChecked
self._config.proj_line_weight ... | https://github.com/eirannejad/pyRevit/issues/471 | IronPython Traceback:
Traceback (most recent call last):
File "C:\Users\rob.cross\AppData\Roaming\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Modify.panel\Match.pushbutton\config.py", line 158, in
File "C:\Users\rob.cross\AppData\Roaming\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Modi... | AttributeError |
def select_sheets(
title="Select Sheets",
button_name="Select",
width=DEFAULT_INPUTWINDOW_WIDTH,
multiple=True,
filterfunc=None,
doc=None,
):
"""Standard form for selecting sheets.
Sheets are grouped into sheet sets and sheet set can be selected from
a drop down box at the top of wi... | def select_sheets(
title="Select Sheets",
button_name="Select",
width=DEFAULT_INPUTWINDOW_WIDTH,
multiple=True,
filterfunc=None,
doc=None,
):
"""Standard form for selecting sheets.
Sheets are grouped into sheet sets and sheet set can be selected from
a drop down box at the top of wi... | https://github.com/eirannejad/pyRevit/issues/388 | IronPython Traceback:
Traceback (most recent call last):
File "C:\Users\Black\AppData\Roaming\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Revision.pulldown\Set Revision On Sheets.pushbutton\script.py", line 16, in
File "C:\Users\Black\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\... | AttributeError |
def dependent(func):
func.is_dependent = True
func.is_wipe_action = True
return func
| def dependent(func):
func.is_dependent = True
return func
| https://github.com/eirannejad/pyRevit/issues/305 | IronPython Traceback:
Traceback (most recent call last):
File "C:\Users\user05\AppData\Roaming\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitTools.extension\pyRevit.tab\Project.panel\Wipe.pulldown\Wipe Model Components.pushbutton\script.py", line 51, in
File "C:\Users\user05\AppData\Roaming\pyRevit\pyRevit-v4\pyRevit\ex... | NotImplementedError |
def notdependent(func):
func.is_dependent = False
func.is_wipe_action = True
return func
| def notdependent(func):
func.is_dependent = False
return func
| https://github.com/eirannejad/pyRevit/issues/305 | IronPython Traceback:
Traceback (most recent call last):
File "C:\Users\user05\AppData\Roaming\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitTools.extension\pyRevit.tab\Project.panel\Wipe.pulldown\Wipe Model Components.pushbutton\script.py", line 51, in
File "C:\Users\user05\AppData\Roaming\pyRevit\pyRevit-v4\pyRevit\ex... | NotImplementedError |
def copy_func(f, workset_name):
new_funcname = "{}_{}".format(f.func_name, workset_name)
new_func = types.FunctionType(
f.func_code, f.func_globals, new_funcname, tuple([workset_name]), f.func_closure
)
# set the docstring
new_func.__doc__ = WORKSET_FUNC_DOCSTRING_TEMPLATE.format(workset_na... | def copy_func(f, workset_name):
new_funcname = "{}_{}".format(f.func_name, workset_name)
new_func = types.FunctionType(
f.func_code, f.func_globals, new_funcname, tuple([workset_name]), f.func_closure
)
# set the docstring
new_func.__doc__ = 'Remove All Elements on Workset "{}"'.format(work... | https://github.com/eirannejad/pyRevit/issues/305 | IronPython Traceback:
Traceback (most recent call last):
File "C:\Users\user05\AppData\Roaming\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitTools.extension\pyRevit.tab\Project.panel\Wipe.pulldown\Wipe Model Components.pushbutton\script.py", line 51, in
File "C:\Users\user05\AppData\Roaming\pyRevit\pyRevit-v4\pyRevit\ex... | NotImplementedError |
def get_worksetcleaners():
workset_funcs = []
# if model is workshared, get a list of current worksets
if revit.doc.IsWorkshared:
cl = DB.FilteredWorksetCollector(revit.doc)
worksetlist = cl.OfKind(DB.WorksetKind.UserWorkset)
# duplicate the workset element remover function for each ... | def get_worksetcleaners():
workset_funcs = []
# copying functions is not implemented in IronPython 2.7.3
if compat.IRONPY273:
return workset_funcs
# if model is workshared, get a list of current worksets
if revit.doc.IsWorkshared:
cl = DB.FilteredWorksetCollector(revit.doc)
... | https://github.com/eirannejad/pyRevit/issues/305 | IronPython Traceback:
Traceback (most recent call last):
File "C:\Users\user05\AppData\Roaming\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitTools.extension\pyRevit.tab\Project.panel\Wipe.pulldown\Wipe Model Components.pushbutton\script.py", line 51, in
File "C:\Users\user05\AppData\Roaming\pyRevit\pyRevit-v4\pyRevit\ex... | NotImplementedError |
def __init__(self, name, default_state=False, wipe_action=None, wipe_args=None):
self.name = name
self.state = default_state
self.wipe_action = wipe_action
self.wipe_args = wipe_args
self.is_dependent = getattr(self.wipe_action, "is_dependent", False)
| def __init__(self, name, default_state=False, wipe_action=None):
self.name = name
self.state = default_state
self.wipe_action = wipe_action
self.is_dependent = self.wipe_action.is_dependent
| https://github.com/eirannejad/pyRevit/issues/305 | IronPython Traceback:
Traceback (most recent call last):
File "C:\Users\user05\AppData\Roaming\pyRevit\pyRevit-v4\pyRevit\extensions\pyRevitTools.extension\pyRevit.tab\Project.panel\Wipe.pulldown\Wipe Model Components.pushbutton\script.py", line 51, in
File "C:\Users\user05\AppData\Roaming\pyRevit\pyRevit-v4\pyRevit\ex... | NotImplementedError |
def get(self, path: str) -> None:
parts = path.split("/")
component_name = parts[0]
component_root = self._registry.get_component_path(component_name)
if component_root is None:
self.write(f"{path} not found")
self.set_status(404)
return
filename = "/".join(parts[1:])
ab... | def get(self, path: str) -> None:
parts = path.split("/")
component_name = parts[0]
component_root = self._registry.get_component_path(component_name)
if component_root is None:
self.write(f"{path} not found")
self.set_status(404)
return
filename = "/".join(parts[1:])
ab... | https://github.com/streamlit/streamlit/issues/2606 | 2021-01-15 15:36:40.902 Uncaught exception GET /component/streamlit_material.core.base.streamlit_material/static/media/roboto-latin-500-normal.020c97dc.woff2 (::1)
HTTPServerRequest(protocol='http', host='localhost:8501', method='GET', uri='/component/streamlit_material.core.base.streamlit_material/static/media/roboto-... | UnicodeDecodeError |
def reset(cls):
"""Reset credentials by removing file.
This is used by `streamlit activate reset` in case a user wants
to start over.
"""
c = Credentials.get_current()
c.activation = None
try:
os.remove(c._conf_file)
except OSError as e:
LOGGER.error("Error removing cre... | def reset(cls):
"""Reset credentials by removing file.
This is used by `streamlit activate reset` in case a user wants
to start over.
"""
Credentials._singleton = None
c = Credentials()
try:
os.remove(c._conf_file)
except OSError as e:
LOGGER.error("Error removing creden... | https://github.com/streamlit/streamlit/issues/175 | Exception in thread ScriptRunner.scriptThread:
Traceback (most recent call last):
File "/Users/adrien/.pyenv/versions/3.6.5/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/Users/adrien/.pyenv/versions/3.6.5/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwar... | AttributeError |
def _open_binary_stream(uri, mode, transport_params):
"""Open an arbitrary URI in the specified binary mode.
Not all modes are supported for all protocols.
:arg uri: The URI to open. May be a string, or something else.
:arg str mode: The mode to open with. Must be rb, wb or ab.
:arg transport_pa... | def _open_binary_stream(uri, mode, transport_params):
"""Open an arbitrary URI in the specified binary mode.
Not all modes are supported for all protocols.
:arg uri: The URI to open. May be a string, or something else.
:arg str mode: The mode to open with. Must be rb, wb or ab.
:arg transport_pa... | https://github.com/RaRe-Technologies/smart_open/issues/338 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-40-b63bd711d13c> in <module>
----> 1 smart_copy('./test_file.txt', 'webhdfs://XXXX@XXX.XXX.XXX.XXX:XXXXX/user/XXXX/smart_copy/test_file.txt')
<ipython-i... | TypeError |
def _my_urlsplit(url):
"""This is a hack to prevent the regular urlsplit from splitting around question marks.
A question mark (?) in a URL typically indicates the start of a
querystring, and the standard library's urlparse function handles the
querystring separately. Unfortunately, question marks can... | def _my_urlsplit(url):
"""This is a hack to prevent the regular urlsplit from splitting around question marks.
A question mark (?) in a URL typically indicates the start of a
querystring, and the standard library's urlparse function handles the
querystring separately. Unfortunately, question marks can... | https://github.com/RaRe-Technologies/smart_open/issues/338 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-40-b63bd711d13c> in <module>
----> 1 smart_copy('./test_file.txt', 'webhdfs://XXXX@XXX.XXX.XXX.XXX:XXXXX/user/XXXX/smart_copy/test_file.txt')
<ipython-i... | TypeError |
def _parse_uri(uri_as_string):
"""
Parse the given URI from a string.
Supported URI schemes are:
* file
* hdfs
* http
* https
* s3
* s3a
* s3n
* s3u
* webhdfs
.s3, s3a and s3n are treated the same way. s3u is s3 but without SSL.
Valid URI ex... | def _parse_uri(uri_as_string):
"""
Parse the given URI from a string.
Supported URI schemes are:
* file
* hdfs
* http
* https
* s3
* s3a
* s3n
* s3u
* webhdfs
.s3, s3a and s3n are treated the same way. s3u is s3 but without SSL.
Valid URI ex... | https://github.com/RaRe-Technologies/smart_open/issues/338 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-40-b63bd711d13c> in <module>
----> 1 smart_copy('./test_file.txt', 'webhdfs://XXXX@XXX.XXX.XXX.XXX:XXXXX/user/XXXX/smart_copy/test_file.txt')
<ipython-i... | TypeError |
def open(http_uri, mode, min_part_size=WEBHDFS_MIN_PART_SIZE):
"""
Parameters
----------
http_uri: str
webhdfs url converted to http REST url
min_part_size: int, optional
For writing only.
"""
if mode == "rb":
return BufferedInputBase(http_uri)
elif mode == "wb":... | def open(uri, mode, min_part_size=WEBHDFS_MIN_PART_SIZE):
"""
Parameters
----------
min_part_size: int, optional
For writing only.
"""
if mode == "rb":
return BufferedInputBase(uri)
elif mode == "wb":
return BufferedOutputBase(uri, min_part_size=min_part_size)
el... | https://github.com/RaRe-Technologies/smart_open/issues/338 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-40-b63bd711d13c> in <module>
----> 1 smart_copy('./test_file.txt', 'webhdfs://XXXX@XXX.XXX.XXX.XXX:XXXXX/user/XXXX/smart_copy/test_file.txt')
<ipython-i... | TypeError |
def __init__(self, uri):
self._uri = uri
payload = {"op": "OPEN", "offset": 0}
self._response = requests.get(self._uri, params=payload, stream=True)
if self._response.status_code != httplib.OK:
raise WebHdfsException.from_response(self._response)
self._buf = b""
| def __init__(self, uri):
self._uri = uri
payload = {"op": "OPEN", "offset": 0}
self._response = requests.get("http://" + self._uri, params=payload, stream=True)
self._buf = b""
| https://github.com/RaRe-Technologies/smart_open/issues/338 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-40-b63bd711d13c> in <module>
----> 1 smart_copy('./test_file.txt', 'webhdfs://XXXX@XXX.XXX.XXX.XXX:XXXXX/user/XXXX/smart_copy/test_file.txt')
<ipython-i... | TypeError |
def __init__(self, uri, min_part_size=WEBHDFS_MIN_PART_SIZE):
"""
Parameters
----------
min_part_size: int, optional
For writing only.
"""
self._uri = uri
self._closed = False
self.min_part_size = min_part_size
# creating empty file first
payload = {"op": "CREATE", "over... | def __init__(self, uri_path, min_part_size=WEBHDFS_MIN_PART_SIZE):
"""
Parameters
----------
min_part_size: int, optional
For writing only.
"""
self.uri_path = uri_path
self._closed = False
self.min_part_size = min_part_size
# creating empty file first
payload = {"op": "... | https://github.com/RaRe-Technologies/smart_open/issues/338 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-40-b63bd711d13c> in <module>
----> 1 smart_copy('./test_file.txt', 'webhdfs://XXXX@XXX.XXX.XXX.XXX:XXXXX/user/XXXX/smart_copy/test_file.txt')
<ipython-i... | TypeError |
def _upload(self, data):
payload = {"op": "APPEND"}
init_response = requests.post(self._uri, params=payload, allow_redirects=False)
if not init_response.status_code == httplib.TEMPORARY_REDIRECT:
raise WebHdfsException.from_response(init_response)
uri = init_response.headers["location"]
resp... | def _upload(self, data):
payload = {"op": "APPEND"}
init_response = requests.post(
"http://" + self.uri_path, params=payload, allow_redirects=False
)
if not init_response.status_code == httplib.TEMPORARY_REDIRECT:
raise WebHdfsException(
str(init_response.status_code) + "\n" ... | https://github.com/RaRe-Technologies/smart_open/issues/338 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-40-b63bd711d13c> in <module>
----> 1 smart_copy('./test_file.txt', 'webhdfs://XXXX@XXX.XXX.XXX.XXX:XXXXX/user/XXXX/smart_copy/test_file.txt')
<ipython-i... | TypeError |
def __init__(self, msg="", status_code=None):
self.msg = msg
self.status_code = status_code
super(WebHdfsException, self).__init__(repr(self))
| def __init__(self, msg=str()):
self.msg = msg
super(WebHdfsException, self).__init__(self.msg)
| https://github.com/RaRe-Technologies/smart_open/issues/338 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-40-b63bd711d13c> in <module>
----> 1 smart_copy('./test_file.txt', 'webhdfs://XXXX@XXX.XXX.XXX.XXX:XXXXX/user/XXXX/smart_copy/test_file.txt')
<ipython-i... | TypeError |
def _parse_uri(uri_as_string):
"""
Parse the given URI from a string.
Supported URI schemes are:
* file
* hdfs
* http
* https
* s3
* s3a
* s3n
* s3u
* webhdfs
.s3, s3a and s3n are treated the same way. s3u is s3 but without SSL.
Valid URI ex... | def _parse_uri(uri_as_string):
"""
Parse the given URI from a string.
Supported URI schemes are:
* file
* hdfs
* http
* https
* s3
* s3a
* s3n
* s3u
* webhdfs
.s3, s3a and s3n are treated the same way. s3u is s3 but without SSL.
Valid URI ex... | https://github.com/RaRe-Technologies/smart_open/issues/123 | smart_open.smart_open('//anaconda/envs/python3/lib/python3.5/site-packages/gensim/test/test_data/lee_background.cor','r')
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-12-6a05871c0775> in <module>()
... | FileNotFoundError |
def _parse_uri_file(input_path):
# '~/tmp' may be expanded to '/Users/username/tmp'
uri_path = os.path.expanduser(input_path)
if not uri_path:
raise RuntimeError("invalid file URI: %s" % input_path)
return Uri(scheme="file", uri_path=uri_path)
| def _parse_uri_file(parsed_uri):
assert parsed_uri.scheme in (None, "", "file")
uri_path = parsed_uri.netloc + parsed_uri.path
# '~/tmp' may be expanded to '/Users/username/tmp'
uri_path = os.path.expanduser(uri_path)
if not uri_path:
raise RuntimeError("invalid file URI: %s" % str(parsed_u... | https://github.com/RaRe-Technologies/smart_open/issues/123 | smart_open.smart_open('//anaconda/envs/python3/lib/python3.5/site-packages/gensim/test/test_data/lee_background.cor','r')
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
<ipython-input-12-6a05871c0775> in <module>()
... | FileNotFoundError |
def _shortcut_open(uri, mode, **kw):
"""Try to open the URI using the standard library io.open function.
This can be much faster than the alternative of opening in binary mode and
then decoding.
This is only possible under the following conditions:
1. Opening a local file
2. Ignore ex... | def _shortcut_open(uri, mode, **kw):
"""Try to open the URI using the standard library io.open function.
This can be much faster than the alternative of opening in binary mode and
then decoding.
This is only possible under the following conditions:
1. Opening a local file
2. Ignore ex... | https://github.com/RaRe-Technologies/smart_open/issues/207 | IOError Traceback (most recent call last)
<ipython-input-1-afdc56d6c4b5> in <module>()
2 from gensim.test.utils import datapath
3
----> 4 m = FastText.load_fasttext_format(datapath("lee_fasttext"))
/home/ivan/release/gensim/gensim/models/fasttext.py in load_fasttext_format(cls, model_... | IOError |
def open(bucket_id, key_id, mode, **kwargs):
logger.debug("%r", locals())
if mode not in MODES:
raise NotImplementedError("bad mode: %r expected one of %r" % (mode, MODES))
encoding = kwargs.pop("encoding", "utf-8")
errors = kwargs.pop("errors", None)
newline = kwargs.pop("newline", None)
... | def open(bucket_id, key_id, mode, **kwargs):
logger.debug("%r", locals())
if mode not in MODES:
raise NotImplementedError("bad mode: %r expected one of %r" % (mode, MODES))
buffer_size = kwargs.pop("buffer_size", io.DEFAULT_BUFFER_SIZE)
encoding = kwargs.pop("encoding", "utf-8")
errors = kw... | https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def __init__(self, s3_object):
self.position = 0
self._object = s3_object
self._body = s3_object.get()["Body"]
| def __init__(self, s3_object):
self.position = 0
self._object = s3_object
self._content_length = self._object.content_length
| https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def read(self, size=-1):
if size == -1:
return self._body.read()
return self._body.read(size)
| def read(self, size=-1):
if self.position == self._content_length:
return b""
if size <= 0:
end = None
else:
end = min(self._content_length, self.position + size)
range_string = _range_string(self.position, stop=end)
logger.debug("range_string: %r", range_string)
body = s... | https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def __init__(
self,
bucket,
key,
buffer_size=DEFAULT_BUFFER_SIZE,
line_terminator=BINARY_NEWLINE,
**kwargs,
):
session = boto3.Session(profile_name=kwargs.pop("profile_name", None))
s3 = session.resource("s3", **kwargs)
self._object = s3.Object(bucket, key)
self._raw_reader = Raw... | def __init__(self, bucket, key, **kwargs):
session = boto3.Session(profile_name=kwargs.pop("profile_name", None))
s3 = session.resource("s3", **kwargs)
self._object = s3.Object(bucket, key)
self._raw_reader = RawReader(self._object)
self._content_length = self._object.content_length
self._curren... | https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def seekable(self):
return False
| def seekable(self):
"""If False, seek(), tell() and truncate() will raise IOError.
We offer only seek support, and no truncate support."""
return True
| https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def read(self, size=-1):
"""Read up to size bytes from the object and return them."""
if size <= 0:
if len(self._buffer):
from_buf = self._read_from_buffer(len(self._buffer))
else:
from_buf = b""
self._current_pos = self._content_length
return from_buf + s... | def read(self, size=-1):
"""Read up to size bytes from the object and return them."""
if size <= 0:
if len(self._buffer):
from_buf = self._read_from_buffer(len(self._buffer))
else:
from_buf = b""
self._current_pos = self._content_length
return from_buf + s... | https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def __init__(self, bucket, key, min_part_size=DEFAULT_MIN_PART_SIZE, **kwargs):
if min_part_size < MIN_MIN_PART_SIZE:
logger.warning(
"S3 requires minimum part size >= 5MB; \
multipart upload may fail"
)
session = boto3.Session(profile_name=kwargs.pop("profile_name", None))
s3 =... | def __init__(self, bucket, key, min_part_size=DEFAULT_MIN_PART_SIZE, **kwargs):
if min_part_size < MIN_MIN_PART_SIZE:
logger.warning(
"S3 requires minimum part size >= 5MB; \
multipart upload may fail"
)
session = boto3.Session(profile_name=kwargs.pop("profile_name", None))
s3 =... | https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def smart_open(uri, mode="rb", **kw):
"""
Open the given S3 / HDFS / filesystem file pointed to by `uri` for reading or writing.
The only supported modes for now are 'rb' (read, default) and 'wb' (replace & write).
The reads/writes are memory efficient (streamed) and therefore suitable for
arbitra... | def smart_open(uri, mode="rb", **kw):
"""
Open the given S3 / HDFS / filesystem file pointed to by `uri` for reading or writing.
The only supported modes for now are 'rb' (read, default) and 'wb' (replace & write).
The reads/writes are memory efficient (streamed) and therefore suitable for
arbitra... | https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def s3_open_uri(parsed_uri, mode, **kwargs):
logger.debug("%r", locals())
if parsed_uri.access_id is not None:
kwargs["aws_access_key_id"] = parsed_uri.access_id
if parsed_uri.access_secret is not None:
kwargs["aws_secret_access_key"] = parsed_uri.access_secret
# Get an S3 host. It is r... | def s3_open_uri(parsed_uri, mode, **kwargs):
logger.debug("%r", locals())
if parsed_uri.access_id is not None:
kwargs["aws_access_key_id"] = parsed_uri.access_id
if parsed_uri.access_secret is not None:
kwargs["aws_secret_access_key"] = parsed_uri.access_secret
# Get an S3 host. It is r... | https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def s3_open_key(key, mode, **kwargs):
logger.debug("%r", locals())
#
# TODO: handle boto3 keys as well
#
host = kwargs.pop("host", None)
if host is not None:
kwargs["endpoint_url"] = "http://" + host
if kwargs.pop("ignore_extension", False):
codec = None
else:
co... | def s3_open_key(key, mode, **kwargs):
logger.debug("%r", locals())
#
# TODO: handle boto3 keys as well
#
host = kwargs.pop("host", None)
if host is not None:
kwargs["endpoint_url"] = "http://" + host
if kwargs.pop("ignore_extension", False):
codec = None
else:
co... | https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def _wrap_gzip(fileobj, mode):
return gzip.GzipFile(fileobj=fileobj, mode=mode)
| def _wrap_gzip(fileobj, mode):
return contextlib.closing(gzip.GzipFile(fileobj=fileobj, mode=mode))
| https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def encoding_wrapper(fileobj, mode, encoding=None, errors=DEFAULT_ERRORS):
"""Decode bytes into text, if necessary.
If mode specifies binary access, does nothing, unless the encoding is
specified. A non-null encoding implies text mode.
:arg fileobj: must quack like a filehandle object.
:arg str m... | def encoding_wrapper(fileobj, mode, encoding=None):
"""Decode bytes into text, if necessary.
If mode specifies binary access, does nothing, unless the encoding is
specified. A non-null encoding implies text mode.
:arg fileobj: must quack like a filehandle object.
:arg str mode: is the mode which ... | https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def file_smart_open(fname, mode="rb", encoding=None, errors=DEFAULT_ERRORS):
"""
Stream from/to local filesystem, transparently (de)compressing gzip and bz2
files if necessary.
:arg str fname: The path to the file to open.
:arg str mode: The mode in which to open the file.
:arg str encoding: Th... | def file_smart_open(fname, mode="rb", encoding=None):
"""
Stream from/to local filesystem, transparently (de)compressing gzip and bz2
files if necessary.
:arg str fname: The path to the file to open.
:arg str mode: The mode in which to open the file.
:arg str encoding: The text encoding to use.... | https://github.com/RaRe-Technologies/smart_open/issues/153 | (smartopen)sergeyich:issue152 misha$ git rev-parse --short HEAD
d10166c
(smartopen)sergeyich:issue152 misha$ time python reproduce.py s3://commoncrawl/crawl-002/2010/09/25/0/1285411480200_0.arc.gz
0it [00:00, ?it/s]Traceback (most recent call last):
File "reproduce.py", line 5, in <module>
for i, _ in enumerate(tqdm(sm... | TypeError |
def __init__(self, uri, default_scheme="file"):
"""
Assume `default_scheme` if no scheme given in `uri`.
"""
if os.name == "nt":
# urlsplit doesn't work on Windows -- it parses the drive as the scheme...
if "://" not in uri:
# no protocol given => assume a local file
... | def __init__(self, uri, default_scheme="file"):
"""
Assume `default_scheme` if no scheme given in `uri`.
"""
if os.name == "nt":
# urlsplit doesn't work on Windows -- it parses the drive as the scheme...
if "://" not in uri:
# no protocol given => assume a local file
... | https://github.com/RaRe-Technologies/smart_open/issues/92 | In [2]: smart_open('aa#aa')
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-2-e0a7775bdb92> in <module>()
----> 1 s('aa#aa')
/usr/local/lib/python2.7/dist-packages/smart_open-1.2.1-py2.7.egg/smart_ope... | IOError |
def _get_many_from_db_backend(self, async_tasks) -> Mapping[str, EventBufferValueType]:
task_ids = _tasks_list_to_task_ids(async_tasks)
session = app.backend.ResultSession()
task_cls = getattr(app.backend, "task_cls", TaskDb)
with session_cleanup(session):
tasks = session.query(task_cls).filter(... | def _get_many_from_db_backend(self, async_tasks) -> Mapping[str, EventBufferValueType]:
task_ids = _tasks_list_to_task_ids(async_tasks)
session = app.backend.ResultSession()
task_cls = app.backend.task_cls
with session_cleanup(session):
tasks = session.query(task_cls).filter(task_cls.task_id.in_... | https://github.com/apache/airflow/issues/14586 | [2021-03-03 17:31:19,393] {scheduler_job.py:1298} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/airflow/jobs/scheduler_job.py", line 1280, in _execute
self._run_scheduler_loop()
File "/usr/local/lib/python3.6/dist-packag... | AttributeError |
def _execute(self, session=None):
"""
Initializes all components required to run a dag for a specified date range and
calls helper method to execute the tasks.
"""
ti_status = BackfillJob._DagRunTaskStatus()
start_date = self.bf_start_date
# Get intervals between the start/end dates, which... | def _execute(self, session=None):
"""
Initializes all components required to run a dag for a specified date range and
calls helper method to execute the tasks.
"""
ti_status = BackfillJob._DagRunTaskStatus()
start_date = self.bf_start_date
# Get intervals between the start/end dates, which... | https://github.com/apache/airflow/issues/13805 | Something bad has happened.
Please consider letting us know by creating a bug report using GitHub.
Python version: 3.8.7
Airflow version: 2.0.0
Node: airflow-web-ffdd89d6-h98vj
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python... | airflow.exceptions.AirflowException |
def run(self):
"""Runs Task Instance."""
dag_id = request.form.get("dag_id")
task_id = request.form.get("task_id")
origin = get_safe_url(request.form.get("origin"))
dag = current_app.dag_bag.get_dag(dag_id)
task = dag.get_task(task_id)
execution_date = request.form.get("execution_date")
... | def run(self):
"""Runs Task Instance."""
dag_id = request.form.get("dag_id")
task_id = request.form.get("task_id")
origin = get_safe_url(request.form.get("origin"))
dag = current_app.dag_bag.get_dag(dag_id)
task = dag.get_task(task_id)
execution_date = request.form.get("execution_date")
... | https://github.com/apache/airflow/issues/13805 | Something bad has happened.
Please consider letting us know by creating a bug report using GitHub.
Python version: 3.8.7
Airflow version: 2.0.0
Node: airflow-web-ffdd89d6-h98vj
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python... | airflow.exceptions.AirflowException |
def _emit_duration_stats_for_finished_state(self):
if self.state == State.RUNNING:
return
if self.start_date is None:
self.log.warning(
"Failed to record duration of %s: start_date is not set.", self
)
return
if self.end_date is None:
self.log.warning("Fai... | def _emit_duration_stats_for_finished_state(self):
if self.state == State.RUNNING:
return
duration = self.end_date - self.start_date
if self.state is State.SUCCESS:
Stats.timing(f"dagrun.duration.success.{self.dag_id}", duration)
elif self.state == State.FAILED:
Stats.timing(f"d... | https://github.com/apache/airflow/issues/14384 | Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1280, in _execute
self._run_scheduler_loop()
File "/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1382, in _run_sch... | TypeError |
def _check_missing_providers(providers):
current_airflow_version = Version(__import__("airflow").__version__)
if current_airflow_version >= Version("2.0.0"):
prefix = "apache-airflow-providers-"
else:
prefix = "apache-airflow-backport-providers-"
for provider in providers:
dist_... | def _check_missing_providers(providers):
current_airflow_version = Version(__import__("airflow").__version__)
if current_airflow_version.major >= 2:
prefix = "apache-airflow-providers-"
else:
prefix = "apache-airflow-backport-providers-"
for provider in providers:
dist_name = pr... | https://github.com/apache/airflow/issues/14359 | airflow@staging-airflow1:~$ airflow upgrade_check --config upgrade.yml
Using config file: upgrade.yml
=========================================================================================== STATUS ==========================================================================================
Check for latest versions ... | AttributeError |
def __init__(self, *args, **kwargs) -> None:
kwargs["client_type"] = "s3"
self.extra_args = {}
if "extra_args" in kwargs:
self.extra_args = kwargs["extra_args"]
if not isinstance(self.extra_args, dict):
raise ValueError(f"extra_args '{self.extra_args!r}' must be of type {dict}")... | def __init__(self, *args, **kwargs) -> None:
kwargs["client_type"] = "s3"
self.extra_args = {}
if "extra_args" in kwargs:
self.extra_args = kwargs["extra_args"]
if not isinstance(self.extra_args, dict):
raise ValueError(f"extra_args '{self.extra_args!r}' must be of type {dict}")... | https://github.com/apache/airflow/issues/14089 | [2021-02-05 02:11:30,103] {hooks.py:210} DEBUG - Event needs-retry.s3.HeadObject: calling handler <botocore.retryhandler.RetryHandler object at 0x7f097f048110>
[2021-02-05 02:11:30,103] {retryhandler.py:187} DEBUG - No retry needed.
[2021-02-05 02:11:30,103] {hooks.py:210} DEBUG - Event needs-retry.s3.HeadObject: calli... | RuntimeError |
def load_file(
self,
filename: str,
key: str,
bucket_name: Optional[str] = None,
replace: bool = False,
encrypt: bool = False,
gzip: bool = False,
acl_policy: Optional[str] = None,
) -> None:
"""
Loads a local file to S3
:param filename: name of the file to load.
:type f... | def load_file(
self,
filename: str,
key: str,
bucket_name: Optional[str] = None,
replace: bool = False,
encrypt: bool = False,
gzip: bool = False,
acl_policy: Optional[str] = None,
) -> None:
"""
Loads a local file to S3
:param filename: name of the file to load.
:type f... | https://github.com/apache/airflow/issues/14089 | [2021-02-05 02:11:30,103] {hooks.py:210} DEBUG - Event needs-retry.s3.HeadObject: calling handler <botocore.retryhandler.RetryHandler object at 0x7f097f048110>
[2021-02-05 02:11:30,103] {retryhandler.py:187} DEBUG - No retry needed.
[2021-02-05 02:11:30,103] {hooks.py:210} DEBUG - Event needs-retry.s3.HeadObject: calli... | RuntimeError |
def _upload_file_obj(
self,
file_obj: BytesIO,
key: str,
bucket_name: Optional[str] = None,
replace: bool = False,
encrypt: bool = False,
acl_policy: Optional[str] = None,
) -> None:
if not replace and self.check_for_key(key, bucket_name):
raise ValueError(f"The key {key} already... | def _upload_file_obj(
self,
file_obj: BytesIO,
key: str,
bucket_name: Optional[str] = None,
replace: bool = False,
encrypt: bool = False,
acl_policy: Optional[str] = None,
) -> None:
if not replace and self.check_for_key(key, bucket_name):
raise ValueError(f"The key {key} already... | https://github.com/apache/airflow/issues/14089 | [2021-02-05 02:11:30,103] {hooks.py:210} DEBUG - Event needs-retry.s3.HeadObject: calling handler <botocore.retryhandler.RetryHandler object at 0x7f097f048110>
[2021-02-05 02:11:30,103] {retryhandler.py:187} DEBUG - No retry needed.
[2021-02-05 02:11:30,103] {hooks.py:210} DEBUG - Event needs-retry.s3.HeadObject: calli... | RuntimeError |
def hook(self):
"""Returns S3Hook."""
remote_conn_id = conf.get("logging", "REMOTE_LOG_CONN_ID")
try:
from airflow.providers.amazon.aws.hooks.s3 import S3Hook
return S3Hook(remote_conn_id, transfer_config_args={"use_threads": False})
except Exception as e: # pylint: disable=broad-excep... | def hook(self):
"""Returns S3Hook."""
remote_conn_id = conf.get("logging", "REMOTE_LOG_CONN_ID")
try:
from airflow.providers.amazon.aws.hooks.s3 import S3Hook
return S3Hook(remote_conn_id)
except Exception as e: # pylint: disable=broad-except
self.log.exception(
'Co... | https://github.com/apache/airflow/issues/14089 | [2021-02-05 02:11:30,103] {hooks.py:210} DEBUG - Event needs-retry.s3.HeadObject: calling handler <botocore.retryhandler.RetryHandler object at 0x7f097f048110>
[2021-02-05 02:11:30,103] {retryhandler.py:187} DEBUG - No retry needed.
[2021-02-05 02:11:30,103] {hooks.py:210} DEBUG - Event needs-retry.s3.HeadObject: calli... | RuntimeError |
def _init_file(self, ti):
"""
Create log directory and give it correct permissions.
:param ti: task instance object
:return: relative log path of the given task instance
"""
# To handle log writing when tasks are impersonated, the log files need to
# be writable by the user that runs the Ai... | def _init_file(self, ti):
"""
Create log directory and give it correct permissions.
:param ti: task instance object
:return: relative log path of the given task instance
"""
# To handle log writing when tasks are impersonated, the log files need to
# be writable by the user that runs the Ai... | https://github.com/apache/airflow/issues/12669 | Traceback (most recent call last):
File "/home/airflow/.local/bin/airflow", line 8, in <module>
sys.exit(main())
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 50, in co... | PermissionError |
def _init_file(self, ti):
"""
Create log directory and give it correct permissions.
:param ti: task instance object
:return: relative log path of the given task instance
"""
# To handle log writing when tasks are impersonated, the log files need to
# be writable by the user that runs the Ai... | def _init_file(self, ti):
"""
Create log directory and give it correct permissions.
:param ti: task instance object
:return: relative log path of the given task instance
"""
# To handle log writing when tasks are impersonated, the log files need to
# be writable by the user that runs the Ai... | https://github.com/apache/airflow/issues/12669 | Traceback (most recent call last):
File "/home/airflow/.local/bin/airflow", line 8, in <module>
sys.exit(main())
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 50, in co... | PermissionError |
def execute_async(
self,
key: TaskInstanceKey,
command: CommandType,
queue: Optional[str] = None,
executor_config: Optional[Any] = None,
) -> None:
"""Executes task asynchronously"""
self.log.info(
"Add task %s with command %s with executor_config %s",
key,
command,
... | def execute_async(
self,
key: TaskInstanceKey,
command: CommandType,
queue: Optional[str] = None,
executor_config: Optional[Any] = None,
) -> None:
"""Executes task asynchronously"""
self.log.info(
"Add task %s with command %s with executor_config %s",
key,
command,
... | https://github.com/apache/airflow/issues/14182 | [2021-02-10 21:09:27,469] {scheduler_job.py:1298} ERROR - Exception when executing SchedulerJob._run_schedu
ler_loop
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/airflow/jobs/scheduler_job.py", line 1280, in _execute
self._run_scheduler_loop()
File "/usr/local/lib/python3.8/site-packa... | AttributeError |
def clear(args):
logging.basicConfig(level=settings.LOGGING_LEVEL, format=settings.SIMPLE_LOG_FORMAT)
dags = get_dags(args)
if args.task_regex:
for idx, dag in enumerate(dags):
dags[idx] = dag.sub_dag(
task_regex=args.task_regex,
include_downstream=args.d... | def clear(args):
logging.basicConfig(level=settings.LOGGING_LEVEL, format=settings.SIMPLE_LOG_FORMAT)
dags = get_dags(args)
if args.task_regex:
for idx, dag in enumerate(dags):
dags[idx] = dag.sub_dag(
task_regex=args.task_regex,
include_downstream=args.d... | https://github.com/apache/airflow/issues/14171 | Traceback (most recent call last):
File "/home/ec2-user/venv/bin/airflow", line 37, in <module>
args.func(args)
File "/home/ec2-user/venv/lib/python3.7/site-packages/airflow/utils/cli.py", line 233, in wrapper
func(args)
File "/home/ec2-user/venv/lib/python3.7/site-packages/airflow/utils/cli.py", line 81, in wrapper
re... | AttributeError |
def __init__(self, celery_executor, kubernetes_executor):
super().__init__()
self._job_id: Optional[str] = None
self.celery_executor = celery_executor
self.kubernetes_executor = kubernetes_executor
| def __init__(self, celery_executor, kubernetes_executor):
super().__init__()
self.celery_executor = celery_executor
self.kubernetes_executor = kubernetes_executor
| https://github.com/apache/airflow/issues/13263 | [2020-12-22 20:38:42,532: INFO/MainProcess] Connected to redis://:**@airflow-redis:6379/0
[2020-12-22 20:38:42,546: INFO/MainProcess] mingle: searching for neighbors
[2020-12-22 20:38:43,545: INFO/MainProcess] mingle: all alone
[2020-12-22 20:38:43,581: INFO/MainProcess] celery@airflow-worker-0 ready.
[2020-12-22 20:38... | airflow.exceptions.AirflowException |
def _change_state_for_tis_without_dagrun(
self, old_states: List[str], new_state: str, session: Session = None
) -> None:
"""
For all DAG IDs in the DagBag, look for task instances in the
old_states and set them to new_state if the corresponding DagRun
does not exist or exists but is not in the runn... | def _change_state_for_tis_without_dagrun(
self, old_states: List[str], new_state: str, session: Session = None
) -> None:
"""
For all DAG IDs in the DagBag, look for task instances in the
old_states and set them to new_state if the corresponding DagRun
does not exist or exists but is not in the runn... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def _executable_task_instances_to_queued(
self, max_tis: int, session: Session = None
) -> List[TI]:
"""
Finds TIs that are ready for execution with respect to pool limits,
dag concurrency, executor state, and priority.
:param max_tis: Maximum number of TIs to queue in this loop.
:type max_tis:... | def _executable_task_instances_to_queued(
self, max_tis: int, session: Session = None
) -> List[TI]:
"""
Finds TIs that are ready for execution with respect to pool limits,
dag concurrency, executor state, and priority.
:param max_tis: Maximum number of TIs to queue in this loop.
:type max_tis:... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def _change_state_for_tasks_failed_to_execute(self, session: Session = None):
"""
If there are tasks left over in the executor,
we set them back to SCHEDULED to avoid creating hanging tasks.
:param session: session for ORM operations
"""
if not self.executor.queued_tasks:
return
fi... | def _change_state_for_tasks_failed_to_execute(self, session: Session = None):
"""
If there are tasks left over in the executor,
we set them back to SCHEDULED to avoid creating hanging tasks.
:param session: session for ORM operations
"""
if not self.executor.queued_tasks:
return
fi... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def adopt_or_reset_orphaned_tasks(self, session: Session = None):
"""
Reset any TaskInstance still in QUEUED or SCHEDULED states that were
enqueued by a SchedulerJob that is no longer running.
:return: the number of TIs reset
:rtype: int
"""
self.log.info("Resetting orphaned tasks for activ... | def adopt_or_reset_orphaned_tasks(self, session: Session = None):
"""
Reset any TaskInstance still in QUEUED or SCHEDULED states that were
enqueued by a SchedulerJob that is no longer running.
:return: the number of TIs reset
:rtype: int
"""
self.log.info("Resetting orphaned tasks for activ... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def bulk_write_to_db(cls, dags: Collection["DAG"], session=None):
"""
Ensure the DagModel rows for the given dags are up-to-date in the dag table in the DB, including
calculated fields.
Note that this method can be called for both DAGs and SubDAGs. A SubDag is actually a SubDagOperator.
:param dag... | def bulk_write_to_db(cls, dags: Collection["DAG"], session=None):
"""
Ensure the DagModel rows for the given dags are up-to-date in the dag table in the DB, including
calculated fields.
Note that this method can be called for both DAGs and SubDAGs. A SubDag is actually a SubDagOperator.
:param dag... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def dags_needing_dagruns(cls, session: Session):
"""
Return (and lock) a list of Dag objects that are due to create a new DagRun.
This will return a resultset of rows that is row-level-locked with a "SELECT ... FOR UPDATE" query,
you should ensure that any scheduling decisions are made in a single tra... | def dags_needing_dagruns(cls, session: Session):
"""
Return (and lock) a list of Dag objects that are due to create a new DagRun.
This will return a resultset of rows that is row-level-locked with a "SELECT ... FOR UPDATE" query,
you should ensure that any scheduling decisions are made in a single tra... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def next_dagruns_to_examine(
cls,
session: Session,
max_number: Optional[int] = None,
):
"""
Return the next DagRuns that the scheduler should attempt to schedule.
This will return zero or more DagRun rows that are row-level-locked with a "SELECT ... FOR UPDATE"
query, you should ensure tha... | def next_dagruns_to_examine(
cls,
session: Session,
max_number: Optional[int] = None,
):
"""
Return the next DagRuns that the scheduler should attempt to schedule.
This will return zero or more DagRun rows that are row-level-locked with a "SELECT ... FOR UPDATE"
query, you should ensure tha... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def slots_stats(
*,
lock_rows: bool = False,
session: Session = None,
) -> Dict[str, PoolStats]:
"""
Get Pool stats (Number of Running, Queued, Open & Total tasks)
If ``lock_rows`` is True, and the database engine in use supports the ``NOWAIT`` syntax, then a
non-blocking lock will be attem... | def slots_stats(
*,
lock_rows: bool = False,
session: Session = None,
) -> Dict[str, PoolStats]:
"""
Get Pool stats (Number of Running, Queued, Open & Total tasks)
If ``lock_rows`` is True, and the database engine in use supports the ``NOWAIT`` syntax, then a
non-blocking lock will be attem... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def _run_mini_scheduler_on_child_tasks(self, session=None) -> None:
if conf.getboolean("scheduler", "schedule_after_task_execution", fallback=True):
from airflow.models.dagrun import DagRun # Avoid circular import
try:
# Re-select the row with a lock
dag_run = with_row_lock... | def _run_mini_scheduler_on_child_tasks(self, session=None) -> None:
if conf.getboolean("scheduler", "schedule_after_task_execution", fallback=True):
from airflow.models.dagrun import DagRun # Avoid circular import
try:
# Re-select the row with a lock
dag_run = with_row_lock... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def with_row_locks(query, session: Session, **kwargs):
"""
Apply with_for_update to an SQLAlchemy query, if row level locking is in use.
:param query: An SQLAlchemy Query object
:param session: ORM Session
:param kwargs: Extra kwargs to pass to with_for_update (of, nowait, skip_locked, etc)
:re... | def with_row_locks(query, **kwargs):
"""
Apply with_for_update to an SQLAlchemy query, if row level locking is in use.
:param query: An SQLAlchemy Query object
:param kwargs: Extra kwargs to pass to with_for_update (of, nowait, skip_locked, etc)
:return: updated query
"""
if USE_ROW_LEVEL_L... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def _do_scheduling(self, session) -> int:
"""
This function is where the main scheduling decisions take places. It:
- Creates any necessary DAG runs by examining the next_dagrun_create_after column of DagModel
Since creating Dag Runs is a relatively time consuming process, we select only 10 dags by ... | def _do_scheduling(self, session) -> int:
"""
This function is where the main scheduling decisions take places. It:
- Creates any necessary DAG runs by examining the next_dagrun_create_after column of DagModel
Since creating Dag Runs is a relatively time consuming process, we select only 10 dags by ... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def adopt_or_reset_orphaned_tasks(self, session: Session = None):
"""
Reset any TaskInstance still in QUEUED or SCHEDULED states that were
enqueued by a SchedulerJob that is no longer running.
:return: the number of TIs reset
:rtype: int
"""
self.log.info("Resetting orphaned tasks for activ... | def adopt_or_reset_orphaned_tasks(self, session: Session = None):
"""
Reset any TaskInstance still in QUEUED or SCHEDULED states that were
enqueued by a SchedulerJob that is no longer running.
:return: the number of TIs reset
:rtype: int
"""
self.log.info("Resetting orphaned tasks for activ... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
def sync_to_db(self, session: Optional[Session] = None):
"""Save attributes about list of DAG to the DB."""
# To avoid circular import - airflow.models.dagbag -> airflow.models.dag -> airflow.models.dagbag
from airflow.models.dag import DAG
from airflow.models.serialized_dag import SerializedDagModel
... | def sync_to_db(self, session: Optional[Session] = None):
"""Save attributes about list of DAG to the DB."""
# To avoid circular import - airflow.models.dagbag -> airflow.models.dag -> airflow.models.dagbag
from airflow.models.dag import DAG
from airflow.models.serialized_dag import SerializedDagModel
... | https://github.com/apache/airflow/issues/11899 | [2020-10-26 09:03:54,608] {{settings.py:49}} INFO - Configured default timezone Timezone('UTC')
[2020-10-26 09:04:05,467] {{scheduler_job.py:1327}} ERROR - Exception when executing SchedulerJob._run_scheduler_loop
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/sqlalchemy/engin... | _mysql_exceptions.OperationalError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.