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 unpack(g):
def _unpack_inner(f):
@functools.wraps(f)
def _call(*args, **kwargs):
gargs, gkwargs = g(*args, **kwargs)
return f(*gargs, **gkwargs)
return _call
return _unpack_inner
| def unpack(g):
def _unpack_inner(f):
@functools.wraps(f)
def _call(**kwargs):
return f(**g(**kwargs))
return _call
return _unpack_inner
| https://github.com/awslabs/autogluon/issues/575 | Loaded data from: https://autogluon.s3.amazonaws.com/datasets/AdultIncomeBinaryClassification/train_data.csv | Columns = 15 / 15 | Rows = 39073 -> 39073
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input... | TypeError |
def _unpack_inner(f):
@functools.wraps(f)
def _call(*args, **kwargs):
gargs, gkwargs = g(*args, **kwargs)
return f(*gargs, **gkwargs)
return _call
| def _unpack_inner(f):
@functools.wraps(f)
def _call(**kwargs):
return f(**g(**kwargs))
return _call
| https://github.com/awslabs/autogluon/issues/575 | Loaded data from: https://autogluon.s3.amazonaws.com/datasets/AdultIncomeBinaryClassification/train_data.csv | Columns = 15 / 15 | Rows = 39073 -> 39073
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input... | TypeError |
def _call(*args, **kwargs):
gargs, gkwargs = g(*args, **kwargs)
return f(*gargs, **gkwargs)
| def _call(**kwargs):
return f(**g(**kwargs))
| https://github.com/awslabs/autogluon/issues/575 | Loaded data from: https://autogluon.s3.amazonaws.com/datasets/AdultIncomeBinaryClassification/train_data.csv | Columns = 15 / 15 | Rows = 39073 -> 39073
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input... | TypeError |
def set_presets(*args, **kwargs):
if "presets" in kwargs:
presets = kwargs["presets"]
if presets is None:
return kwargs
if not isinstance(presets, list):
presets = [presets]
preset_kwargs = {}
for preset in presets:
if isinstance(preset, st... | def set_presets(**kwargs):
if "presets" in kwargs:
presets = kwargs["presets"]
if presets is None:
return kwargs
if not isinstance(presets, list):
presets = [presets]
preset_kwargs = {}
for preset in presets:
if isinstance(preset, str):
... | https://github.com/awslabs/autogluon/issues/575 | Loaded data from: https://autogluon.s3.amazonaws.com/datasets/AdultIncomeBinaryClassification/train_data.csv | Columns = 15 / 15 | Rows = 39073 -> 39073
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input... | TypeError |
def generate_features(self, X: DataFrame):
if not self.fit:
self._compute_feature_transformations()
X_features = pd.DataFrame(index=X.index)
for column in X.columns:
if X[column].dtype.name == "object":
X[column].fillna("", inplace=True)
else:
X[column].fillna... | def generate_features(self, X: DataFrame):
if not self.fit:
self._compute_feature_transformations()
X_features = pd.DataFrame(index=X.index)
for column in X.columns:
if X[column].dtype.name == "object":
X[column].fillna("", inplace=True)
else:
X[column].fillna... | https://github.com/awslabs/autogluon/issues/575 | Loaded data from: https://autogluon.s3.amazonaws.com/datasets/AdultIncomeBinaryClassification/train_data.csv | Columns = 15 / 15 | Rows = 39073 -> 39073
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input... | TypeError |
def Dataset(
path=None, name=None, train=True, input_size=224, crop_ratio=0.875, *args, **kwargs
):
"""Dataset for AutoGluon image classification tasks.
May either be a :class:`autogluon.task.image_classification.ImageFolderDataset`, :class:`autogluon.task.image_classification.RecordDataset`,
or a... | def Dataset(*args, **kwargs):
"""Dataset for AutoGluon image classification tasks.
May either be a :class:`autogluon.task.image_classification.ImageFolderDataset`, :class:`autogluon.task.image_classification.RecordDataset`,
or a popular dataset already built into AutoGluon ('mnist', 'fashionmnist', 'c... | https://github.com/awslabs/autogluon/issues/218 | scheduler: FIFOScheduler(
DistributedResourceManager{
(Remote: Remote REMOTE_ID: 0,
<Remote: 'inproc://172.18.30.18/28461/1' processes=1 threads=4, memory=7.28 GB>, Resource: NodeResourceManager(4 CPUs, 0 GPUs))
})
Starting Experiments
Num of Finished Tasks is 0
Num of Pending Tasks is 4
25%|█████████████████████▌ ... | TypeError |
def auto_suggest_network(dataset, net):
if isinstance(dataset, str):
dataset_name = dataset
elif isinstance(dataset, AutoGluonObject):
if "name" in dataset.kwargs and dataset.kwargs["name"] is not None:
dataset_name = dataset.kwargs["name"]
else:
return net
el... | def auto_suggest_network(dataset, net):
if isinstance(dataset, str):
dataset_name = dataset
elif isinstance(dataset, AutoGluonObject):
if "name" in dataset.kwargs:
dataset_name = dataset.kwargs["name"]
else:
return net
else:
return net
dataset_name... | https://github.com/awslabs/autogluon/issues/218 | scheduler: FIFOScheduler(
DistributedResourceManager{
(Remote: Remote REMOTE_ID: 0,
<Remote: 'inproc://172.18.30.18/28461/1' processes=1 threads=4, memory=7.28 GB>, Resource: NodeResourceManager(4 CPUs, 0 GPUs))
})
Starting Experiments
Num of Finished Tasks is 0
Num of Pending Tasks is 4
25%|█████████████████████▌ ... | TypeError |
def balanced_accuracy(solution, prediction):
y_type, solution, prediction = _check_targets(solution, prediction)
if y_type not in ["binary", "multiclass", "multilabel-indicator"]:
raise ValueError(f"{y_type} is not supported")
if y_type == "binary":
# Do not transform into any multiclass r... | def balanced_accuracy(solution, prediction):
y_type, solution, prediction = _check_targets(solution, prediction)
if y_type not in ["binary", "multiclass", "multilabel-indicator"]:
raise ValueError(f"{y_type} is not supported")
if y_type == "binary":
# Do not transform into any multiclass r... | https://github.com/awslabs/autogluon/issues/378 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-28-ddcca1d23e69> in <module>
----> 1 ag.utils.tabular.metrics.balanced_accuracy(y_test, y_pred)
~/Desktop/github-aws/autogluon-public/autogluon/utils/ta... | TypeError |
def generate_csv(inds, path):
with open(path, "w") as csvFile:
row = ["id", "category"]
writer = csv.writer(csvFile)
writer.writerow(row)
id = 1
for ind in inds:
row = [id, ind]
writer = csv.writer(csvFile)
writer.writerow(row)
... | def generate_csv(inds, path):
with open(path, "w") as csvFile:
row = ["id", "category"]
writer = csv.writer(csvFile)
writer.writerow(row)
id = 1
for ind in inds:
row = [id, ind.asscalar()]
writer = csv.writer(csvFile)
writer.writerow(row)
... | https://github.com/awslabs/autogluon/issues/357 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-9-ef60c46c4aa0> in <module>
1 import autogluon as ag
----> 2 ag.utils.generate_csv(inds, 'submission_autogluon.csv')
/opt/conda/lib/python3.6/site-packa... | AttributeError |
def build(self, hp, inputs=None):
input_node = nest.flatten(inputs)[0]
pretrained = self.pretrained
if input_node.shape[3] not in [1, 3]:
if self.pretrained:
raise ValueError(
"When pretrained is set to True, expect input to "
"have 1 or 3 channels, bug g... | def build(self, hp, inputs=None):
input_node = nest.flatten(inputs)[0]
pretrained = self.pretrained
if input_node.shape[3] not in [1, 3]:
if self.pretrained:
raise ValueError(
"When pretrained is set to True, expect input to "
"have 1 or 3 channels, bug g... | https://github.com/keras-team/autokeras/issues/1299 | Traceback (most recent call last):
File "P:\ProgramFiles\anaconda\envs\python\test\lib\site-packages\kerastuner\engine\hypermodel.py", line 104, in build
model = self.hypermodel.build(hp)
File "P:\ProgramFiles\anaconda\envs\python\test\lib\site-packages\kerastuner\engine\hypermodel.py", line 64, in _build_wrapper
retur... | KeyError |
def _get_best_hps(self):
best_trials = self.get_best_trials()
if best_trials:
return best_trials[0].hyperparameters.copy()
else:
return self.hyperparameters.copy()
| def _get_best_hps(self):
best_trials = self.get_best_trials()
if best_trials:
return best_trials[0].hyperparameters
else:
return self.hyperparameters
| https://github.com/keras-team/autokeras/issues/1299 | Traceback (most recent call last):
File "P:\ProgramFiles\anaconda\envs\python\test\lib\site-packages\kerastuner\engine\hypermodel.py", line 104, in build
model = self.hypermodel.build(hp)
File "P:\ProgramFiles\anaconda\envs\python\test\lib\site-packages\kerastuner\engine\hypermodel.py", line 64, in _build_wrapper
retur... | KeyError |
def _generate_hp_values(self, hp_names):
best_hps = self._get_best_hps()
collisions = 0
while True:
hps = kerastuner.HyperParameters()
# Generate a set of random values.
for hp in self.hyperparameters.space:
hps.merge([hp])
# if not active, do nothing.
... | def _generate_hp_values(self, hp_names):
best_hps = self._get_best_hps()
collisions = 0
while True:
hps = kerastuner.HyperParameters()
# Generate a set of random values.
for hp in best_hps.space:
hps.merge([hp])
# if not active, do nothing.
# if a... | https://github.com/keras-team/autokeras/issues/1299 | Traceback (most recent call last):
File "P:\ProgramFiles\anaconda\envs\python\test\lib\site-packages\kerastuner\engine\hypermodel.py", line 104, in build
model = self.hypermodel.build(hp)
File "P:\ProgramFiles\anaconda\envs\python\test\lib\site-packages\kerastuner\engine\hypermodel.py", line 64, in _build_wrapper
retur... | KeyError |
def __init__(self, loss=None, metrics=None, output_shape=None, **kwargs):
super().__init__(**kwargs)
self.output_shape = output_shape
self.loss = tf.keras.losses.get(loss)
if metrics is None:
metrics = []
self.metrics = [tf.keras.metrics.get(metric) for metric in metrics]
| def __init__(self, loss=None, metrics=None, output_shape=None, **kwargs):
super().__init__(**kwargs)
self.output_shape = output_shape
self.loss = loss
self.metrics = metrics
| https://github.com/keras-team/autokeras/issues/1057 | Traceback (most recent call last):
File "mnist_model.py", line 12, in <module>
clf = ak.ImageClassifier(metrics=['accuracy', custom_metric], max_trials=3)
File "/home/lhs18285/miniconda3/envs/nas/lib/python3.7/site-packages/autokeras/tasks/image.py", line 67, in __init__
seed=seed)
File "/home/lhs18285/miniconda3/envs/... | TypeError |
def get_config(self):
config = super().get_config()
config.update(
{
"loss": tf.keras.losses.serialize(self.loss),
"metrics": [tf.keras.metrics.serialize(metric) for metric in self.metrics],
"output_shape": self.output_shape,
}
)
return config
| def get_config(self):
config = super().get_config()
config.update(
{"loss": self.loss, "metrics": self.metrics, "output_shape": self.output_shape}
)
return config
| https://github.com/keras-team/autokeras/issues/1057 | Traceback (most recent call last):
File "mnist_model.py", line 12, in <module>
clf = ak.ImageClassifier(metrics=['accuracy', custom_metric], max_trials=3)
File "/home/lhs18285/miniconda3/envs/nas/lib/python3.7/site-packages/autokeras/tasks/image.py", line 67, in __init__
seed=seed)
File "/home/lhs18285/miniconda3/envs/... | TypeError |
def __init__(self, preprocessors=None, **kwargs):
super().__init__(**kwargs)
self.preprocessors = nest.flatten(preprocessors)
self._finished = False
# Save or load the HyperModel.
self.hypermodel.hypermodel.save(os.path.join(self.project_dir, "graph"))
| def __init__(self, preprocessors=None, **kwargs):
super().__init__(**kwargs)
self.preprocessors = nest.flatten(preprocessors)
self._finished = False
# Save or load the HyperModel.
utils.save_json(
os.path.join(self.project_dir, "graph"),
graph_module.serialize(self.hypermodel.hypermo... | https://github.com/keras-team/autokeras/issues/1057 | Traceback (most recent call last):
File "mnist_model.py", line 12, in <module>
clf = ak.ImageClassifier(metrics=['accuracy', custom_metric], max_trials=3)
File "/home/lhs18285/miniconda3/envs/nas/lib/python3.7/site-packages/autokeras/tasks/image.py", line 67, in __init__
seed=seed)
File "/home/lhs18285/miniconda3/envs/... | TypeError |
def feature_encoding_input(block):
"""Fetch the column_types and column_names.
The values are fetched for FeatureEncoding from StructuredDataInput.
"""
if not isinstance(block.inputs[0], nodes_module.StructuredDataInput):
raise TypeError(
"FeatureEncoding block can only be used with... | def feature_encoding_input(block):
"""Fetch the column_types and column_names.
The values are fetched for FeatureEncoding from StructuredDataInput.
"""
if not isinstance(block.inputs[0], nodes.StructuredDataInput):
raise TypeError(
"FeatureEncoding block can only be used with Struct... | https://github.com/keras-team/autokeras/issues/1057 | Traceback (most recent call last):
File "mnist_model.py", line 12, in <module>
clf = ak.ImageClassifier(metrics=['accuracy', custom_metric], max_trials=3)
File "/home/lhs18285/miniconda3/envs/nas/lib/python3.7/site-packages/autokeras/tasks/image.py", line 67, in __init__
seed=seed)
File "/home/lhs18285/miniconda3/envs/... | TypeError |
def get_config(self):
blocks = [hypermodels.serialize(block) for block in self.blocks]
nodes = {
str(self._node_to_id[node]): nodes_module.serialize(node)
for node in self.inputs
}
override_hps = [
kerastuner.engine.hyperparameters.serialize(hp) for hp in self.override_hps
]
... | def get_config(self):
blocks = [serialize(block) for block in self.blocks]
nodes = {str(self._node_to_id[node]): serialize(node) for node in self.inputs}
override_hps = [
tf.keras.utils.serialize_keras_object(hp) for hp in self.override_hps
]
block_inputs = {
str(block_id): [self._no... | https://github.com/keras-team/autokeras/issues/1057 | Traceback (most recent call last):
File "mnist_model.py", line 12, in <module>
clf = ak.ImageClassifier(metrics=['accuracy', custom_metric], max_trials=3)
File "/home/lhs18285/miniconda3/envs/nas/lib/python3.7/site-packages/autokeras/tasks/image.py", line 67, in __init__
seed=seed)
File "/home/lhs18285/miniconda3/envs/... | TypeError |
def from_config(cls, config):
blocks = [hypermodels.deserialize(block) for block in config["blocks"]]
nodes = {
int(node_id): nodes_module.deserialize(node)
for node_id, node in config["nodes"].items()
}
override_hps = [
kerastuner.engine.hyperparameters.deserialize(config)
... | def from_config(cls, config):
blocks = [deserialize(block) for block in config["blocks"]]
nodes = {
int(node_id): deserialize(node) for node_id, node in config["nodes"].items()
}
override_hps = [
kerastuner.engine.hyperparameters.deserialize(config)
for config in config["override... | https://github.com/keras-team/autokeras/issues/1057 | Traceback (most recent call last):
File "mnist_model.py", line 12, in <module>
clf = ak.ImageClassifier(metrics=['accuracy', custom_metric], max_trials=3)
File "/home/lhs18285/miniconda3/envs/nas/lib/python3.7/site-packages/autokeras/tasks/image.py", line 67, in __init__
seed=seed)
File "/home/lhs18285/miniconda3/envs/... | TypeError |
def __init__(
self,
num_classes: Optional[int] = None,
multi_label: bool = False,
loss: Optional[types.LossType] = None,
metrics: Optional[types.MetricsType] = None,
dropout_rate: Optional[float] = None,
**kwargs,
):
self.num_classes = num_classes
self.multi_label = multi_label
s... | def __init__(
self,
num_classes: Optional[int] = None,
multi_label: bool = False,
loss: Optional[types.LossType] = None,
metrics: Optional[types.MetricsType] = None,
dropout_rate: Optional[float] = None,
**kwargs,
):
super().__init__(loss=loss, metrics=metrics, **kwargs)
self.num_cla... | https://github.com/keras-team/autokeras/issues/1057 | Traceback (most recent call last):
File "mnist_model.py", line 12, in <module>
clf = ak.ImageClassifier(metrics=['accuracy', custom_metric], max_trials=3)
File "/home/lhs18285/miniconda3/envs/nas/lib/python3.7/site-packages/autokeras/tasks/image.py", line 67, in __init__
seed=seed)
File "/home/lhs18285/miniconda3/envs/... | TypeError |
def config_from_adapter(self, adapter):
super().config_from_adapter(adapter)
self.num_classes = adapter.num_classes
self.loss = self.infer_loss()
| def config_from_adapter(self, adapter):
super().config_from_adapter(adapter)
self.num_classes = adapter.num_classes
self.set_loss()
| https://github.com/keras-team/autokeras/issues/1057 | Traceback (most recent call last):
File "mnist_model.py", line 12, in <module>
clf = ak.ImageClassifier(metrics=['accuracy', custom_metric], max_trials=3)
File "/home/lhs18285/miniconda3/envs/nas/lib/python3.7/site-packages/autokeras/tasks/image.py", line 67, in __init__
seed=seed)
File "/home/lhs18285/miniconda3/envs/... | TypeError |
def __init__(
self,
output_dim: Optional[int] = None,
loss: types.LossType = "mean_squared_error",
metrics: Optional[types.MetricsType] = None,
dropout_rate: Optional[float] = None,
**kwargs,
):
if metrics is None:
metrics = ["mean_squared_error"]
super().__init__(loss=loss, metr... | def __init__(
self,
output_dim: Optional[int] = None,
loss: types.LossType = "mean_squared_error",
metrics: Optional[types.MetricsType] = None,
dropout_rate: Optional[float] = None,
**kwargs,
):
super().__init__(loss=loss, metrics=metrics, **kwargs)
self.output_dim = output_dim
if no... | https://github.com/keras-team/autokeras/issues/1057 | Traceback (most recent call last):
File "mnist_model.py", line 12, in <module>
clf = ak.ImageClassifier(metrics=['accuracy', custom_metric], max_trials=3)
File "/home/lhs18285/miniconda3/envs/nas/lib/python3.7/site-packages/autokeras/tasks/image.py", line 67, in __init__
seed=seed)
File "/home/lhs18285/miniconda3/envs/... | TypeError |
def fit_before_convert(self, dataset):
# If in tf.data.Dataset, must be encoded already.
if isinstance(dataset, tf.data.Dataset):
if not self.num_classes:
shape = utils.dataset_shape(dataset)[0]
# Single column with 0s and 1s.
if shape == 1:
self.num_c... | def fit_before_convert(self, dataset):
# If in tf.data.Dataset, must be encoded already.
if isinstance(dataset, tf.data.Dataset):
if not self.num_classes:
shape = dataset.take(1).shape[1]
if shape == 1:
self.num_classes = 2
else:
self.n... | https://github.com/keras-team/autokeras/issues/940 | ---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-a90e48684d55> in <module>
----> 1 ak0.fit(mnist_train, epochs=10)
~/anaconda3/lib/python3.7/site-packages/autokeras/tasks/image.py in fit(self, x, y, ... | AttributeError |
def __init__(self, data):
super().__init__()
self.mean = np.mean(data, axis=0)
self.std = np.std(data, axis=0)
| def __init__(self, data):
super().__init__()
self.max_val = data.max()
data = data / self.max_val
self.mean = np.mean(data, axis=0, keepdims=True).flatten()
self.std = np.std(data, axis=0, keepdims=True).flatten()
| https://github.com/keras-team/autokeras/issues/385 | Using TensorFlow backend.
Saving Directory: /tmp/autokeras_ASE3DJ
Initializing search.
Initialization finished.
+----------------------------------------------+
| Training model 0 |
+----------------------------------------------+
Using TensorFlow backend.
Epoch-1, Current Metric - 0: 0... | TypeError |
def transform_train(self, data, targets=None, batch_size=None):
data = (data - self.mean) / self.std
data = np.nan_to_num(data)
dataset = self._transform([], data, targets)
if batch_size is None:
batch_size = Constant.MAX_BATCH_SIZE
batch_size = min(len(data), batch_size)
return DataLo... | def transform_train(self, data, targets=None, batch_size=None):
dataset = self._transform(
[Normalize(torch.Tensor(self.mean), torch.Tensor(self.std))], data, targets
)
if batch_size is None:
batch_size = Constant.MAX_BATCH_SIZE
batch_size = min(len(data), batch_size)
return DataLo... | https://github.com/keras-team/autokeras/issues/385 | Using TensorFlow backend.
Saving Directory: /tmp/autokeras_ASE3DJ
Initializing search.
Initialization finished.
+----------------------------------------------+
| Training model 0 |
+----------------------------------------------+
Using TensorFlow backend.
Epoch-1, Current Metric - 0: 0... | TypeError |
def _transform(self, compose_list, data, targets):
args = [0, len(data.shape) - 1] + list(range(1, len(data.shape) - 1))
data = torch.Tensor(data.transpose(*args))
data_transforms = Compose(compose_list)
return MultiTransformDataset(data, targets, data_transforms)
| def _transform(self, compose_list, data, targets):
data = data / self.max_val
args = [0, len(data.shape) - 1] + list(range(1, len(data.shape) - 1))
data = torch.Tensor(data.transpose(*args))
data_transforms = Compose(compose_list)
return MultiTransformDataset(data, targets, data_transforms)
| https://github.com/keras-team/autokeras/issues/385 | Using TensorFlow backend.
Saving Directory: /tmp/autokeras_ASE3DJ
Initializing search.
Initialization finished.
+----------------------------------------------+
| Training model 0 |
+----------------------------------------------+
Using TensorFlow backend.
Epoch-1, Current Metric - 0: 0... | TypeError |
def __init__(
self, verbose=False, path=None, resume=False, searcher_args=None, augment=None
):
"""Initialize the instance.
The classifier will be loaded from the files in 'path' if parameter 'resume' is True.
Otherwise it would create a new one.
Args:
verbose: A boolean of whether the sea... | def __init__(
self, verbose=False, path=None, resume=False, searcher_args=None, augment=None
):
"""Initialize the instance.
The classifier will be loaded from the files in 'path' if parameter 'resume' is True.
Otherwise it would create a new one.
Args:
verbose: A boolean of whether the sea... | https://github.com/keras-team/autokeras/issues/193 | ╒==============================================╕
| Training model 1 |
╘==============================================╛
Using TensorFlow backend.
Current Epoch: 0%| | 0/1 [00:00<?, ? batch/s]Exception ignored in: <bound method tqdm.__del__ of Current Epoch: 0%|... | RuntimeError |
def fit(self, x, y, x_test=None, y_test=None, time_limit=None):
x = np.array(x)
if len(x.shape) != 0 and len(x[0].shape) == 3:
self.resize_height, self.resize_width = compute_image_resize_params(x)
x = resize_image_data(x, self.resize_height, self.resize_width)
if x_test is not None:
... | def fit(self, x, y, x_test=None, y_test=None, time_limit=None):
x = np.array(x)
y = np.array(y).flatten()
validate_xy(x, y)
y = self.transform_y(y)
if x_test is None or y_test is None:
# Divide training data into training and testing data.
validation_set_size = int(len(y) * Constant.... | https://github.com/keras-team/autokeras/issues/193 | ╒==============================================╕
| Training model 1 |
╘==============================================╛
Using TensorFlow backend.
Current Epoch: 0%| | 0/1 [00:00<?, ? batch/s]Exception ignored in: <bound method tqdm.__del__ of Current Epoch: 0%|... | RuntimeError |
def evaluate(self, x_test, y_test):
"""Return the accuracy score between predict value and `y_test`."""
if len(x_test.shape) != 0 and len(x_test[0].shape) == 3:
x_test = resize_image_data(x_test, self.resize_height, self.resize_width)
y_predict = self.predict(x_test)
return self.metric().evaluat... | def evaluate(self, x_test, y_test):
"""Return the accuracy score between predict value and `y_test`."""
y_predict = self.predict(x_test)
return self.metric().evaluate(y_test, y_predict)
| https://github.com/keras-team/autokeras/issues/193 | ╒==============================================╕
| Training model 1 |
╘==============================================╛
Using TensorFlow backend.
Current Epoch: 0%| | 0/1 [00:00<?, ? batch/s]Exception ignored in: <bound method tqdm.__del__ of Current Epoch: 0%|... | RuntimeError |
def final_fit(self, x_train, y_train, x_test, y_test, trainer_args=None, retrain=False):
"""Final training after found the best architecture.
Args:
x_train: A numpy.ndarray of training data.
y_train: A numpy.ndarray of training targets.
x_test: A numpy.ndarray of testing data.
y... | def final_fit(self, x_train, y_train, x_test, y_test, trainer_args=None, retrain=False):
"""Final training after found the best architecture.
Args:
x_train: A numpy.ndarray of training data.
y_train: A numpy.ndarray of training targets.
x_test: A numpy.ndarray of testing data.
y... | https://github.com/keras-team/autokeras/issues/193 | ╒==============================================╕
| Training model 1 |
╘==============================================╛
Using TensorFlow backend.
Current Epoch: 0%| | 0/1 [00:00<?, ? batch/s]Exception ignored in: <bound method tqdm.__del__ of Current Epoch: 0%|... | RuntimeError |
def export_autokeras_model(self, model_file_name):
"""Creates and Exports the AutoKeras model to the given filename."""
portable_model = PortableImageSupervised(
graph=self.cnn.best_model,
y_encoder=self.y_encoder,
data_transformer=self.data_transformer,
metric=self.metric,
... | def export_autokeras_model(self, model_file_name):
"""Creates and Exports the AutoKeras model to the given filename."""
portable_model = PortableImageSupervised(
graph=self.cnn.best_model,
y_encoder=self.y_encoder,
data_transformer=self.data_transformer,
metric=self.metric,
... | https://github.com/keras-team/autokeras/issues/193 | ╒==============================================╕
| Training model 1 |
╘==============================================╛
Using TensorFlow backend.
Current Epoch: 0%| | 0/1 [00:00<?, ? batch/s]Exception ignored in: <bound method tqdm.__del__ of Current Epoch: 0%|... | RuntimeError |
def __init__(
self,
graph,
data_transformer,
y_encoder,
metric,
inverse_transform_y_method,
resize_params,
):
"""Initialize the instance.
Args:
graph: The graph form of the learned model
"""
super().__init__(graph)
self.data_transformer = data_transformer
self... | def __init__(
self, graph, data_transformer, y_encoder, metric, inverse_transform_y_method
):
"""Initialize the instance.
Args:
graph: The graph form of the learned model
"""
super().__init__(graph)
self.data_transformer = data_transformer
self.y_encoder = y_encoder
self.metric =... | https://github.com/keras-team/autokeras/issues/193 | ╒==============================================╕
| Training model 1 |
╘==============================================╛
Using TensorFlow backend.
Current Epoch: 0%| | 0/1 [00:00<?, ? batch/s]Exception ignored in: <bound method tqdm.__del__ of Current Epoch: 0%|... | RuntimeError |
def read_image(img_path):
img = imageio.imread(uri=img_path)
return img
| def read_image(img_path):
img = ndimage.imread(fname=img_path)
return img
| https://github.com/keras-team/autokeras/issues/226 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~/Software/anaconda3/lib/python3.6/site-packages/autokeras/image_supervised.py in _validate(x_train, y_train)
24 try:
---> 25 x_train = x_train.astype('floa... | ValueError |
def get_device():
"""If Cuda is available, use Cuda device, else use CPU device
When choosing from Cuda devices, this function will choose the one with max memory available
Returns: string device name
"""
# TODO: could use gputil in the future
device = "cpu"
if torch.cuda.is_available(... | def get_device():
"""If Cuda is available, use Cuda device, else use CPU device
When choosing from Cuda devices, this function will choose the one with max memory available
Returns: string device name
"""
# TODO: could use gputil in the future
if torch.cuda.is_available():
smi_out ... | https://github.com/keras-team/autokeras/issues/189 | Traceback (most recent call last):
File "/home/hoanghiep/miniconda3/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/home/hoanghiep/miniconda3/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/home/hoanghiep/miniconda3/lib/p... | RuntimeError |
def _dense_block_end_node(self, layer_id):
return self.layer_id_to_input_node_ids[layer_id][0]
| def _dense_block_end_node(self, layer_id):
return self._block_end_node(layer_id, Constant.DENSE_BLOCK_DISTANCE)
| https://github.com/keras-team/autokeras/issues/119 | .....
Epoch 14: loss 0.9113655090332031, metric_value 0.9318181818181818
No loss decrease after 3 epochs
Father ID: 2
[('to_dense_deeper_model', 14), ('to_conv_deeper_model', 1, 5), ('to_add_skip_model', 20, 5), ('to_concat_skip_model', 1, 5), ('to_add_skip_model', 1, 20), ('to_wider_model', 5, 64), ('to_concat_skip_m... | RuntimeError |
def extract_descriptor(self):
ret = NetworkDescriptor()
topological_node_list = self.topological_order
for u in topological_node_list:
for v, layer_id in self.adj_list[u]:
layer = self.layer_list[layer_id]
if is_layer(layer, "Conv") and layer.kernel_size not in [
... | def extract_descriptor(self):
ret = NetworkDescriptor()
topological_node_list = self.topological_order
for u in topological_node_list:
for v, layer_id in self.adj_list[u]:
layer = self.layer_list[layer_id]
if is_layer(layer, "Conv") and layer.kernel_size not in [
... | https://github.com/keras-team/autokeras/issues/119 | .....
Epoch 14: loss 0.9113655090332031, metric_value 0.9318181818181818
No loss decrease after 3 epochs
Father ID: 2
[('to_dense_deeper_model', 14), ('to_conv_deeper_model', 1, 5), ('to_add_skip_model', 20, 5), ('to_concat_skip_model', 1, 5), ('to_add_skip_model', 1, 20), ('to_wider_model', 5, 64), ('to_concat_skip_m... | RuntimeError |
def to_deeper_graph(graph):
weighted_layer_ids = graph.deep_layer_ids()
if len(weighted_layer_ids) >= Constant.MAX_MODEL_DEPTH:
return None
deeper_layer_ids = sample(weighted_layer_ids, 1)
# n_deeper_layer = randint(1, len(weighted_layer_ids))
# deeper_layer_ids = sample(weighted_layer_ids,... | def to_deeper_graph(graph):
weighted_layer_ids = graph.deep_layer_ids()
if len(weighted_layer_ids) >= Constant.MAX_MODEL_DEPTH:
return None
deeper_layer_ids = sample(weighted_layer_ids, 1)
# n_deeper_layer = randint(1, len(weighted_layer_ids))
# deeper_layer_ids = sample(weighted_layer_ids,... | https://github.com/keras-team/autokeras/issues/119 | .....
Epoch 14: loss 0.9113655090332031, metric_value 0.9318181818181818
No loss decrease after 3 epochs
Father ID: 2
[('to_dense_deeper_model', 14), ('to_conv_deeper_model', 1, 5), ('to_add_skip_model', 20, 5), ('to_concat_skip_model', 1, 5), ('to_add_skip_model', 1, 20), ('to_wider_model', 5, 64), ('to_concat_skip_m... | RuntimeError |
def _raise_passphrase_exception(self):
if self._passphrase_helper is not None:
self._passphrase_helper.raise_if_problem(Error)
_raise_current_error()
| def _raise_passphrase_exception(self):
if self._passphrase_helper is None:
_raise_current_error()
exception = self._passphrase_helper.raise_if_problem(Error)
if exception is not None:
raise exception
| https://github.com/pyca/pyopenssl/issues/119 | /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/spread/jelly.py:93: DeprecationWarning: the sets module is deprecated
import sets as _sets
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/endp... | OpenSSL.crypto.Error |
def raise_if_problem(self, exceptionType=Error):
if self._problems:
# Flush the OpenSSL error queue
try:
_exception_from_error_queue(exceptionType)
except exceptionType:
pass
raise self._problems.pop(0)
| def raise_if_problem(self, exceptionType=Error):
try:
_exception_from_error_queue(exceptionType)
except exceptionType as e:
from_queue = e
if self._problems:
raise self._problems[0]
return from_queue
| https://github.com/pyca/pyopenssl/issues/119 | /usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/spread/jelly.py:93: DeprecationWarning: the sets module is deprecated
import sets as _sets
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twisted/internet/endp... | OpenSSL.crypto.Error |
def stats(self):
"""
Returns
dict?: resource stats
"""
stats = self.get("stats")
if stats is None:
stats = {"hash": "", "bytes": 0}
if self.tabular:
stats.update({"fields": 0, "rows": 0})
stats = self.metadata_attach("stats", stats)
return stats
| def stats(self):
"""
Returns
dict?: resource stats
"""
stats = {"hash": "", "bytes": 0, "fields": 0, "rows": 0}
return self.metadata_attach("stats", self.get("stats", stats))
| https://github.com/frictionlessdata/frictionless-py/issues/641 | Traceback (most recent call last):
File "C:\Users\user\programs\PyCharm\PyCharm Community Edition 2020.3.2\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File "C:\Users\user\programs\miniconda\envs\WPP2\lib\site-pac... | frictionless.exception.FrictionlessException |
def open(self):
"""Open the resource as "io.open" does
Raises:
FrictionlessException: any exception that occurs
"""
self.close()
# Infer
self.pop("stats", None)
self["name"] = self.name
self["profile"] = self.profile
self["scheme"] = self.scheme
self["format"] = self.fo... | def open(self):
"""Open the resource as "io.open" does
Raises:
FrictionlessException: any exception that occurs
"""
self.close()
# Infer
self["name"] = self.name
self["profile"] = self.profile
self["scheme"] = self.scheme
self["format"] = self.format
self["hashing"] = s... | https://github.com/frictionlessdata/frictionless-py/issues/641 | Traceback (most recent call last):
File "C:\Users\user\programs\PyCharm\PyCharm Community Edition 2020.3.2\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File "C:\Users\user\programs\miniconda\envs\WPP2\lib\site-pac... | frictionless.exception.FrictionlessException |
def to_dict(self):
"""Convert metadata to a dict
Returns:
dict: metadata as a dict
"""
return helpers.deepnative(self)
| def to_dict(self):
"""Convert metadata to a dict
Returns:
dict: metadata as a dict
"""
return self.copy()
| https://github.com/frictionlessdata/frictionless-py/issues/453 | In [28]: package.to_yaml('test.yml')
---------------------------------------------------------------------------
RepresenterError Traceback (most recent call last)
~/.local/lib/python3.8/site-packages/frictionless/metadata.py in to_yaml(self, target)
137 with tempfile.NamedTemporary... | RepresenterError |
def create_storage(self, name, **options):
if name == "bigquery":
return BigqueryStorage(**options)
| def create_storage(self, name, **options):
pass
| https://github.com/frictionlessdata/frictionless-py/issues/422 | In [1]: from frictionless import describe_package
In [2]: csv = 'a,b\n0,1'
In [3]: with open('test.csv', 'w') as f:
...: f.write(csv)
...:
In [4]: package = describe_package('test.csv')
---------------------------------------------------------------------------
ModuleNotFoundError Traceback... | ModuleNotFoundError |
def __init__(self, service, project, dataset, prefix=""):
self.__service = service
self.__project = project
self.__dataset = dataset
self.__prefix = prefix
| def __init__(self, service, project, dataset, prefix=""):
self.__service = service
self.__project = project
self.__dataset = dataset
self.__prefix = prefix
self.__names = None
self.__tables = {}
self.__fallbacks = {}
| https://github.com/frictionlessdata/frictionless-py/issues/422 | In [1]: from frictionless import describe_package
In [2]: csv = 'a,b\n0,1'
In [3]: with open('test.csv', 'w') as f:
...: f.write(csv)
...:
In [4]: package = describe_package('test.csv')
---------------------------------------------------------------------------
ModuleNotFoundError Traceback... | ModuleNotFoundError |
def __read_data_stream(self, name, schema):
sav = helpers.import_from_plugin("savReaderWriter", plugin="spss")
path = self.__write_convert_name(name)
yield schema.field_names
with sav.SavReader(path, ioUtf8=True, rawMode=False) as reader:
for item in reader:
cells = []
fo... | def __read_data_stream(self, name, schema):
sav = helpers.import_from_plugin("savReaderWriter", plugin="spss")
path = self.__write_convert_name(name)
with sav.SavReader(path, ioUtf8=True, rawMode=False) as reader:
for item in reader:
cells = []
for index, field in enumerate(s... | https://github.com/frictionlessdata/frictionless-py/issues/422 | In [1]: from frictionless import describe_package
In [2]: csv = 'a,b\n0,1'
In [3]: with open('test.csv', 'w') as f:
...: f.write(csv)
...:
In [4]: package = describe_package('test.csv')
---------------------------------------------------------------------------
ModuleNotFoundError Traceback... | ModuleNotFoundError |
def prepare(self, stream, schema, extra):
# Prepare package
if "datapackage" not in extra or "resource-name" not in extra:
return False
descriptor = extra["datapackage"]
if descriptor.strip().startswith("{"):
descriptor = json.loads(descriptor)
self.__package = datapackage.Package(de... | def prepare(self, stream, schema, extra):
# Prepare package
if "datapackage" not in extra or "resource-name" not in extra:
return False
descriptor = extra["datapackage"]
if descriptor.strip().startswith("{"):
descriptor = json.loads(descriptor)
self.__package = Package(descriptor)
... | https://github.com/frictionlessdata/frictionless-py/issues/347 | Traceback (most recent call last):
File "test.py", line 8, in <module>
report = validate("datapackage.json", checks=["structure", "schema", "foreign-key"], order_fields=True, infer_fields=False)
File "/home/didiez/anaconda3/lib/python3.7/site-packages/goodtables/validate.py", line 80, in validate
report = inspector.ins... | datapackage.exceptions.CastError |
def check_row(self, cells):
row_number = cells[0]["row-number"]
errors = []
# We DON'T have relations to validate
if self.__relations_exception:
# Add a reference error
message = "Foreign key violation caused by invalid reference table: %s"
errors.append(
Error(
... | def check_row(self, cells):
row_number = cells[0]["row-number"]
# Prepare keyed_row
keyed_row = {}
for cell in cells:
if cell.get("field"):
keyed_row[cell.get("field").name] = cell.get("value")
# Resolve relations
errors = []
for foreign_key in self.__schema.foreign_key... | https://github.com/frictionlessdata/frictionless-py/issues/347 | Traceback (most recent call last):
File "test.py", line 8, in <module>
report = validate("datapackage.json", checks=["structure", "schema", "foreign-key"], order_fields=True, infer_fields=False)
File "/home/didiez/anaconda3/lib/python3.7/site-packages/goodtables/validate.py", line 80, in validate
report = inspector.ins... | datapackage.exceptions.CastError |
def _get_relations(package, schema, current_resource_name=None):
# It's based on the following code:
# https://github.com/frictionlessdata/datapackage-py/blob/master/datapackage/resource.py#L393
# Prepare relations
relations = {}
for fk in schema.foreign_keys:
resource_name = fk["reference"... | def _get_relations(package, schema, current_resource_name=None):
# It's based on the following code:
# https://github.com/frictionlessdata/datapackage-py/blob/master/datapackage/resource.py#L393
# Prepare relations
relations = {}
for fk in schema.foreign_keys:
resource_name = fk["reference"... | https://github.com/frictionlessdata/frictionless-py/issues/347 | Traceback (most recent call last):
File "test.py", line 8, in <module>
report = validate("datapackage.json", checks=["structure", "schema", "foreign-key"], order_fields=True, infer_fields=False)
File "/home/didiez/anaconda3/lib/python3.7/site-packages/goodtables/validate.py", line 80, in validate
report = inspector.ins... | datapackage.exceptions.CastError |
def missing_header(cells, sample):
errors = []
for cell in copy(cells):
# Skip if header in cell
if cell.get("header") is not None:
continue
# Add error
field_name = cell["field"].name if cell["field"] else ""
message_substitutions = {"field_name": '"{}"'.fo... | def missing_header(cells, sample):
errors = []
for cell in copy(cells):
# Skip if header in cell
if cell.get("header") is not None:
continue
# Add error
message_substitutions = {
"field_name": '"{}"'.format(cell["field"].name),
}
error = ... | https://github.com/frictionlessdata/frictionless-py/issues/337 | Traceback (most recent call last):
File "bug.py", line 67, in <module>
report = validate(DESCRIPTOR, skip_checks=['extra-header'], order_fields=True, infer_fields=False)
File "/home/didiez/bug_goodtables/env/lib/python3.7/site-packages/goodtables/validate.py", line 80, in validate
report = inspector.inspect(source, **o... | AttributeError |
def __inspect_table(self, table):
# Start timer
start = datetime.datetime.now()
# Prepare vars
errors = []
headers = None
row_number = 0
fatal_error = False
checks = copy(self.__checks)
source = table["source"]
stream = table["stream"]
schema = table["schema"]
extra = ta... | def __inspect_table(self, table):
# Start timer
start = datetime.datetime.now()
# Prepare vars
errors = []
headers = None
row_number = 0
fatal_error = False
checks = copy(self.__checks)
source = table["source"]
stream = table["stream"]
schema = table["schema"]
extra = ta... | https://github.com/frictionlessdata/frictionless-py/issues/189 | Traceback (most recent call last):
File "/home/adria/dev/pyenvs/gt/lib/python3.5/site-packages/celery/app/trace.py", line 368, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/adria/dev/pyenvs/gt/lib/python3.5/site-packages/celery/app/trace.py", line 623, in __protected_call__
return self.run(*args, **kwargs... | UnicodeDecodeError |
def parse(code):
class_names, code = pre_parse(code)
if "\x00" in code:
raise ParserException("No null bytes (\\x00) allowed in the source code.")
o = ast.parse(code) # python ast
decorate_ast(o, code, class_names) # decorated python ast
o = resolve_negative_literals(o)
return o.body
| def parse(code):
class_names, code = pre_parse(code)
o = ast.parse(code) # python ast
decorate_ast(o, code, class_names) # decorated python ast
o = resolve_negative_literals(o)
return o.body
| https://github.com/vyperlang/vyper/issues/1184 | Traceback (most recent call last):
File "/Users/mate/github/vyper/vyper-venv/bin/vyper", line 4, in <module>
__import__('pkg_resources').run_script('vyper==0.1.0b6', 'vyper')
File "/Users/mate/github/vyper/vyper-venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 664, in run_script
self.require(requires)[... | ValueError |
def add_globals_and_events(self, item):
item_attributes = {"public": False}
# Make sure we have a valid variable name.
if not isinstance(item.target, ast.Name):
raise StructureException("Invalid global variable name", item.target)
# Handle constants.
if self.get_call_func_name(item) == "co... | def add_globals_and_events(self, item):
item_attributes = {"public": False}
# Handle constants.
if self.get_call_func_name(item) == "constant":
self._constants.add_constant(item, global_ctx=self)
return
# Handle events.
if not (self.get_call_func_name(item) == "event"):
ite... | https://github.com/vyperlang/vyper/issues/1185 | Error compiling: 4.txt
Traceback (most recent call last):
File "/Users/mate/ethermat/security/vyper-fuzz/venv/bin/vyper", line 4, in <module>
__import__('pkg_resources').run_script('vyper==0.1.0b6', 'vyper')
File "/Users/mate/ethermat/security/vyper-fuzz/venv/lib/python3.6/site-packages/setuptools-39.1.0-py3.6.egg/pkg... | AttributeError |
def parse_type(
item, location, sigs=None, custom_units=None, custom_structs=None, constants=None
):
# Base and custom types, e.g. num
if isinstance(item, ast.Name):
if item.id in base_types:
return BaseType(item.id)
elif item.id in special_types:
return special_types... | def parse_type(
item, location, sigs=None, custom_units=None, custom_structs=None, constants=None
):
# Base and custom types, e.g. num
if isinstance(item, ast.Name):
if item.id in base_types:
return BaseType(item.id)
elif item.id in special_types:
return special_types... | https://github.com/vyperlang/vyper/issues/1186 | Error compiling: 10.txt
Traceback (most recent call last):
File "/Users/mate/ethermat/security/vyper-fuzz/venv/bin/vyper", line 4, in <module>
__import__('pkg_resources').run_script('vyper==0.1.0b6', 'vyper')
File "/Users/mate/ethermat/security/vyper-fuzz/venv/lib/python3.6/site-packages/setuptools-39.1.0-py3.6.egg/pk... | IndexError |
def get_item_name_and_attributes(self, item, attributes):
if isinstance(item, ast.Name):
return item.id, attributes
elif isinstance(item, ast.AnnAssign):
return self.get_item_name_and_attributes(item.annotation, attributes)
elif isinstance(item, ast.Subscript):
return self.get_item_n... | def get_item_name_and_attributes(self, item, attributes):
if isinstance(item, ast.Name):
return item.id, attributes
elif isinstance(item, ast.AnnAssign):
return self.get_item_name_and_attributes(item.annotation, attributes)
elif isinstance(item, ast.Subscript):
return self.get_item_n... | https://github.com/vyperlang/vyper/issues/1188 | Error compiling: 5.txt
Traceback (most recent call last):
File "/Users/mate/ethermat/security/vyper-fuzz/venv/bin/vyper", line 4, in <module>
__import__('pkg_resources').run_script('vyper==0.1.0b6', 'vyper')
File "/Users/mate/ethermat/security/vyper-fuzz/venv/lib/python3.6/site-packages/setuptools-39.1.0-py3.6.egg/pkg... | AttributeError |
def add_globals_and_events(self, item):
item_attributes = {"public": False}
# Handle constants.
if self.get_call_func_name(item) == "constant":
self._constants.add_constant(item, global_ctx=self)
return
# Handle events.
if not (self.get_call_func_name(item) == "event"):
ite... | def add_globals_and_events(self, item):
item_attributes = {"public": False}
# Handle constants.
if isinstance(item.annotation, ast.Call) and item.annotation.func.id == "constant":
self._constants.add_constant(item, global_ctx=self)
return
# Handle events.
if not (
isinstanc... | https://github.com/vyperlang/vyper/issues/1188 | Error compiling: 5.txt
Traceback (most recent call last):
File "/Users/mate/ethermat/security/vyper-fuzz/venv/bin/vyper", line 4, in <module>
__import__('pkg_resources').run_script('vyper==0.1.0b6', 'vyper')
File "/Users/mate/ethermat/security/vyper-fuzz/venv/lib/python3.6/site-packages/setuptools-39.1.0-py3.6.egg/pkg... | AttributeError |
def from_declaration(cls, code, global_ctx):
name = code.target.id
pos = 0
check_valid_varname(
name,
global_ctx._custom_units,
global_ctx._structs,
global_ctx._constants,
pos=code,
error_prefix="Event name invalid. ",
exc=EventDeclarationException,
... | def from_declaration(cls, code, global_ctx):
name = code.target.id
pos = 0
check_valid_varname(
name,
global_ctx._custom_units,
global_ctx._structs,
global_ctx._constants,
pos=code,
error_prefix="Event name invalid. ",
exc=EventDeclarationException,
... | https://github.com/vyperlang/vyper/issues/1189 | Error compiling: 6.txt
Traceback (most recent call last):
File "/Users/mate/github/vyper/vyper-venv/bin/vyper", line 4, in <module>
__import__('pkg_resources').run_script('vyper==0.1.0b6', 'vyper')
File "/Users/mate/github/vyper/vyper-venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 664, in run_script... | AttributeError |
def base_type_conversion(orig, frm, to, pos):
orig = unwrap_location(orig)
if (
getattr(frm, "is_literal", False)
and frm.typ in ("int128", "uint256")
and not SizeLimits.in_bounds(frm.typ, orig.value)
):
raise InvalidLiteralException("Number out of range: " + str(orig.value),... | def base_type_conversion(orig, frm, to, pos):
orig = unwrap_location(orig)
if (
getattr(frm, "is_literal", False)
and frm.typ in ("int128", "uint256")
and not SizeLimits.in_bounds(frm.typ, orig.value)
):
raise InvalidLiteralException("Number out of range: " + str(orig.value),... | https://github.com/vyperlang/vyper/issues/1088 | ----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 51879)
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 647, in process_request_thread
self.finish_request(requ... | AttributeError |
def _check_valid_assign(self, sub):
if isinstance(self.stmt.annotation, ast.Call): # unit style: num(wei)
if self.stmt.annotation.func.id != sub.typ.typ and not sub.typ.is_literal:
raise TypeMismatchException(
"Invalid type, expected: %s" % self.stmt.annotation.func.id, self.stm... | def _check_valid_assign(self, sub):
if isinstance(self.stmt.annotation, ast.Call): # unit style: num(wei)
if self.stmt.annotation.func.id != sub.typ.typ and not sub.typ.is_literal:
raise TypeMismatchException(
"Invalid type, expected: %s" % self.stmt.annotation.func.id, self.stm... | https://github.com/vyperlang/vyper/issues/1088 | ----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 51879)
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 647, in process_request_thread
self.finish_request(requ... | AttributeError |
def ann_assign(self):
self.context.set_in_assignment(True)
typ = parse_type(
self.stmt.annotation, location="memory", custom_units=self.context.custom_units
)
if (
isinstance(self.stmt.target, ast.Attribute)
and self.stmt.target.value.id == "self"
):
raise TypeMismatc... | def ann_assign(self):
self.context.set_in_assignment(True)
typ = parse_type(
self.stmt.annotation, location="memory", custom_units=self.context.custom_units
)
if (
isinstance(self.stmt.target, ast.Attribute)
and self.stmt.target.value.id == "self"
):
raise TypeMismatc... | https://github.com/vyperlang/vyper/issues/1088 | ----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 51879)
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 647, in process_request_thread
self.finish_request(requ... | AttributeError |
def parse_body(code, context):
if not isinstance(code, list):
return parse_stmt(code, context)
o = []
for stmt in code:
lll = parse_stmt(stmt, context)
o.append(lll)
return LLLnode.from_list(["seq"] + o, pos=getpos(code[0]) if code else None)
| def parse_body(code, context):
if not isinstance(code, list):
return parse_stmt(code, context)
o = []
for stmt in code:
o.append(parse_stmt(stmt, context))
return LLLnode.from_list(["seq"] + o, pos=getpos(code[0]) if code else None)
| https://github.com/vyperlang/vyper/issues/918 | Traceback (most recent call last):
File "vyper-bin", line 56, in <module>
print(optimizer.optimize(parse_to_lll(code)))
File "/home/jacques/projects/vyper/vyper/parser/parser.py", line 991, in parse_to_lll
return parse_tree_to_lll(code, kode)
File "/home/jacques/projects/vyper/vyper/parser/parser.py", line 464, in pars... | vyper.exceptions.StructureException |
def __init__(self, stmt, context):
self.stmt = stmt
self.context = context
self.stmt_table = {
ast.Expr: self.expr,
ast.Pass: self.parse_pass,
ast.AnnAssign: self.ann_assign,
ast.Assign: self.assign,
ast.If: self.parse_if,
ast.Call: self.call,
ast.Asse... | def __init__(self, stmt, context):
self.stmt = stmt
self.context = context
self.stmt_table = {
ast.Expr: self.expr,
ast.Pass: self.parse_pass,
ast.AnnAssign: self.ann_assign,
ast.Assign: self.assign,
ast.If: self.parse_if,
ast.Call: self.call,
ast.Asse... | https://github.com/vyperlang/vyper/issues/918 | Traceback (most recent call last):
File "vyper-bin", line 56, in <module>
print(optimizer.optimize(parse_to_lll(code)))
File "/home/jacques/projects/vyper/vyper/parser/parser.py", line 991, in parse_to_lll
return parse_tree_to_lll(code, kode)
File "/home/jacques/projects/vyper/vyper/parser/parser.py", line 464, in pars... | vyper.exceptions.StructureException |
def send_file(
filename_or_fp,
mimetype=None,
as_attachment=False,
attachment_filename=None,
add_etags=True,
cache_timeout=None,
conditional=False,
last_modified=None,
):
"""Sends the contents of a file to the client. This will use the
most efficient method available and configu... | def send_file(
filename_or_fp,
mimetype=None,
as_attachment=False,
attachment_filename=None,
add_etags=True,
cache_timeout=None,
conditional=False,
last_modified=None,
):
"""Sends the contents of a file to the client. This will use the
most efficient method available and configu... | https://github.com/pallets/flask/issues/2526 | Traceback (most recent call last):
File "/home/adrian/dev/indico/env/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/home/adrian/dev/indico/env/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(... | AttributeError |
def __init__(
self,
model: "Type[Model]",
db: "BaseDBAsyncClient",
prefetch_map=None,
prefetch_queries=None,
) -> None:
self.model = model
self.db: "BaseDBAsyncClient" = db
self.prefetch_map = prefetch_map if prefetch_map else {}
self._prefetch_queries = prefetch_queries if prefetch_... | def __init__(
self,
model: "Type[Model]",
db: "BaseDBAsyncClient",
prefetch_map=None,
prefetch_queries=None,
) -> None:
self.model = model
self.db: "BaseDBAsyncClient" = db
self.prefetch_map = prefetch_map if prefetch_map else {}
self._prefetch_queries = prefetch_queries if prefetch_... | https://github.com/tortoise/tortoise-orm/issues/233 | Traceback (most recent call last):
File "/opt/project/src/server.py", line 54, in <module>
asyncio.run(main())
File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.re... | AttributeError |
def get_update_sql(self, update_fields: Optional[List[str]]) -> str:
"""
Generates the SQL for updating a model depending on provided update_fields.
Result is cached for performance.
"""
key = ",".join(update_fields) if update_fields else ""
if key in self.update_cache:
return self.updat... | def get_update_sql(self, update_fields: Optional[List[str]]) -> str:
"""
Generates the SQL for updating a model depending on provided update_fields.
Result is cached for performance.
"""
key = ",".join(update_fields) if update_fields else ""
if key in self.update_cache:
return self.updat... | https://github.com/tortoise/tortoise-orm/issues/233 | Traceback (most recent call last):
File "/opt/project/src/server.py", line 54, in <module>
asyncio.run(main())
File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.re... | AttributeError |
async def _prefetch_m2m_relation(
self, instance_list: list, field: str, related_query
) -> list:
instance_id_set: set = {
self._field_to_db(instance._meta.pk, instance.pk, instance)
for instance in instance_list
}
field_object: fields.ManyToManyFieldInstance = self.model._meta.fields_m... | async def _prefetch_m2m_relation(
self, instance_list: list, field: str, related_query
) -> list:
instance_id_set: set = {
self._field_to_db(instance._meta.pk, instance.pk, instance)
for instance in instance_list
}
field_object: fields.ManyToManyFieldInstance = self.model._meta.fields_m... | https://github.com/tortoise/tortoise-orm/issues/233 | Traceback (most recent call last):
File "/opt/project/src/server.py", line 54, in <module>
asyncio.run(main())
File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.re... | AttributeError |
async def _prefetch_reverse_relation(
self, instance_list: list, field: str, related_query
) -> list:
instance_id_set = {
self._field_to_db(instance._meta.pk, instance.pk, instance)
for instance in instance_list
} # type: Set[Any]
backward_relation_manager = getattr(self.model, field)
... | async def _prefetch_reverse_relation(
self, instance_list: list, field: str, related_query
) -> list:
instance_id_set = {instance.pk for instance in instance_list} # type: Set[Any]
backward_relation_manager = getattr(self.model, field)
relation_field = backward_relation_manager.relation_field
rela... | https://github.com/tortoise/tortoise-orm/issues/151 | DEBUG:asyncio:Using selector: EpollSelector
INFO:tortoise:Tortoise-ORM startup
connections: {'default': {'engine': 'tortoise.backends.asyncpg', 'credentials': {'port': 5432, 'database': 'postgres', 'host': '172.20.0.2', 'user': 'postgres', 'password': 'postgres'}}}
apps: {'models': {'models': ['__main__'], 'default_con... | asyncpg.exceptions.PostgresSyntaxError |
async def _prefetch_m2m_relation(
self, instance_list: list, field: str, related_query
) -> list:
instance_id_set = {
self._field_to_db(instance._meta.pk, instance.pk, instance)
for instance in instance_list
} # type: Set[Any]
field_object = self.model._meta.fields_map[field]
thro... | async def _prefetch_m2m_relation(
self, instance_list: list, field: str, related_query
) -> list:
instance_id_set = {instance.pk for instance in instance_list} # type: Set[Any]
field_object = self.model._meta.fields_map[field]
through_table = Table(field_object.through)
subquery = (
self... | https://github.com/tortoise/tortoise-orm/issues/151 | DEBUG:asyncio:Using selector: EpollSelector
INFO:tortoise:Tortoise-ORM startup
connections: {'default': {'engine': 'tortoise.backends.asyncpg', 'credentials': {'port': 5432, 'database': 'postgres', 'host': '172.20.0.2', 'user': 'postgres', 'password': 'postgres'}}}
apps: {'models': {'models': ['__main__'], 'default_con... | asyncpg.exceptions.PostgresSyntaxError |
def _query(self):
if not self.instance._saved_in_db:
raise OperationalError(
"This objects hasn't been instanced, call .save() before calling related queries"
)
return self.model.filter(**{self.relation_field: self.instance.pk})
| def _query(self):
if not self.instance.pk:
raise OperationalError(
"This objects hasn't been instanced, call .save() before"
" calling related queries"
)
return self.model.filter(**{self.relation_field: self.instance.pk})
| https://github.com/tortoise/tortoise-orm/issues/151 | DEBUG:asyncio:Using selector: EpollSelector
INFO:tortoise:Tortoise-ORM startup
connections: {'default': {'engine': 'tortoise.backends.asyncpg', 'credentials': {'port': 5432, 'database': 'postgres', 'host': '172.20.0.2', 'user': 'postgres', 'password': 'postgres'}}}
apps: {'models': {'models': ['__main__'], 'default_con... | asyncpg.exceptions.PostgresSyntaxError |
async def add(self, *instances, using_db=None) -> None:
"""
Adds one or more of ``instances`` to the relation.
If it is already added, it will be silently ignored.
"""
if not instances:
return
if not self.instance._saved_in_db:
raise OperationalError(
"You should fir... | async def add(self, *instances, using_db=None) -> None:
"""
Adds one or more of ``instances`` to the relation.
If it is already added, it will be silently ignored.
"""
if not instances:
return
if self.instance.pk is None:
raise OperationalError(
"You should first cal... | https://github.com/tortoise/tortoise-orm/issues/151 | DEBUG:asyncio:Using selector: EpollSelector
INFO:tortoise:Tortoise-ORM startup
connections: {'default': {'engine': 'tortoise.backends.asyncpg', 'credentials': {'port': 5432, 'database': 'postgres', 'host': '172.20.0.2', 'user': 'postgres', 'password': 'postgres'}}}
apps: {'models': {'models': ['__main__'], 'default_con... | asyncpg.exceptions.PostgresSyntaxError |
def _set_field_values(self, values_map: Dict[str, Any]) -> Set[str]:
"""
Sets values for fields honoring type transformations and
return list of fields that were set additionally
"""
meta = self._meta
passed_fields = set()
for key, value in values_map.items():
if key in meta.fk_fiel... | def _set_field_values(self, values_map: Dict[str, Any]) -> Set[str]:
"""
Sets values for fields honoring type transformations and
return list of fields that were set additionally
"""
meta = self._meta
passed_fields = set()
for key, value in values_map.items():
if key in meta.fk_fiel... | https://github.com/tortoise/tortoise-orm/issues/151 | DEBUG:asyncio:Using selector: EpollSelector
INFO:tortoise:Tortoise-ORM startup
connections: {'default': {'engine': 'tortoise.backends.asyncpg', 'credentials': {'port': 5432, 'database': 'postgres', 'host': '172.20.0.2', 'user': 'postgres', 'password': 'postgres'}}}
apps: {'models': {'models': ['__main__'], 'default_con... | asyncpg.exceptions.PostgresSyntaxError |
def _make_query(self):
table = Table(self.model._meta.table)
self.query = self._db.query_class.update(table)
self.resolve_filters(
model=self.model,
q_objects=self.q_objects,
annotations=self.annotations,
custom_filters=self.custom_filters,
)
# Need to get executor to... | def _make_query(self):
table = Table(self.model._meta.table)
self.query = self._db.query_class.update(table)
self.resolve_filters(
model=self.model,
q_objects=self.q_objects,
annotations=self.annotations,
custom_filters=self.custom_filters,
)
# Need to get executor to... | https://github.com/tortoise/tortoise-orm/issues/151 | DEBUG:asyncio:Using selector: EpollSelector
INFO:tortoise:Tortoise-ORM startup
connections: {'default': {'engine': 'tortoise.backends.asyncpg', 'credentials': {'port': 5432, 'database': 'postgres', 'host': '172.20.0.2', 'user': 'postgres', 'password': 'postgres'}}}
apps: {'models': {'models': ['__main__'], 'default_con... | asyncpg.exceptions.PostgresSyntaxError |
def retry_connection(func):
@wraps(func)
async def retry_connection_(self, *args):
try:
return await func(self, *args)
except (
asyncpg.PostgresConnectionError,
asyncpg.ConnectionDoesNotExistError,
asyncpg.ConnectionFailureError,
asyncp... | def retry_connection(func):
@wraps(func)
async def wrapped(self, *args):
try:
return await func(self, *args)
except (
asyncpg.PostgresConnectionError,
asyncpg.ConnectionDoesNotExistError,
asyncpg.ConnectionFailureError,
):
# Her... | https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
def translate_exceptions(func):
@wraps(func)
async def translate_exceptions_(self, *args):
try:
return await func(self, *args)
except asyncpg.SyntaxOrAccessError as exc:
raise OperationalError(exc)
except asyncpg.IntegrityConstraintViolationError as exc:
... | def translate_exceptions(func):
@wraps(func)
async def wrapped(self, *args):
try:
return await func(self, *args)
except asyncpg.SyntaxOrAccessError as exc:
raise OperationalError(exc)
except asyncpg.IntegrityConstraintViolationError as exc:
raise Integ... | https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
def _in_transaction(self) -> "TransactionWrapper":
return self._transaction_class(self)
| def _in_transaction(self) -> "TransactionWrapper":
return self._transaction_class(self.connection_name, self._connection, self._lock)
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
def __init__(self, connection) -> None:
self._connection = connection._connection
self._lock = connection._lock
self.log = logging.getLogger("db_client")
self._transaction_class = self.__class__
self._old_context_value = None
self.connection_name = connection.connection_name
self.transaction... | def __init__(self, connection_name: str, connection, lock) -> None:
self._connection = connection
self._lock = lock
self.log = logging.getLogger("db_client")
self._transaction_class = self.__class__
self._old_context_value = None
self.connection_name = connection_name
self.transaction = None... | https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def commit(self):
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
await self.transaction.commit()
self.release()
| async def commit(self):
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
self._finalized = True
await self.transaction.commit()
current_transaction_map[self.connection_name].set(self._old_context_value)
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def rollback(self):
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
await self.transaction.rollback()
self.release()
| async def rollback(self):
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
self._finalized = True
await self.transaction.rollback()
current_transaction_map[self.connection_name].set(self._old_context_value)
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def create_connection(self, with_db: bool) -> None:
await self._parent.create_connection(with_db)
self._connection = self._parent._connection
| async def create_connection(self, with_db: bool) -> None:
self._template = {
"host": self.host,
"port": self.port,
"user": self.user,
"database": self.database if with_db else None,
**self.extra,
}
try:
self._connection = await asyncpg.connect(
Non... | https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def _close(self) -> None:
await self._parent._close()
self._connection = self._parent._connection
| async def _close(self) -> None:
if self._connection: # pragma: nobranch
await self._connection.close()
self.log.debug(
"Closed connection %s with params: %s", self._connection, self._template
)
self._template.clear()
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
def __init__(
self,
dialect: str,
*,
# Is the connection a Daemon?
daemon: bool = True,
# Deficiencies to work around:
safe_indexes: bool = True,
requires_limit: bool = False,
) -> None:
super().__setattr__("_mutable", True)
self.dialect = dialect
self.daemon = daemon
se... | def __init__(
self,
dialect: str,
*,
# Deficiencies to work around:
safe_indexes: bool = True,
requires_limit: bool = False,
) -> None:
super().__setattr__("_mutable", True)
self.dialect = dialect
self.requires_limit = requires_limit
self.safe_indexes = safe_indexes
super()... | https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:
if exc_type:
if issubclass(exc_type, TransactionManagementError):
self.release()
else:
await self.rollback()
else:
await self.commit()
| async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:
if exc_type:
await self.rollback()
else:
await self.commit()
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
def retry_connection(func):
@wraps(func)
async def retry_connection_(self, *args):
try:
return await func(self, *args)
except (
RuntimeError,
pymysql.err.OperationalError,
pymysql.err.InternalError,
pymysql.err.InterfaceError,
)... | def retry_connection(func):
@wraps(func)
async def wrapped(self, *args):
try:
return await func(self, *args)
except (
RuntimeError,
pymysql.err.OperationalError,
pymysql.err.InternalError,
pymysql.err.InterfaceError,
):
... | https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
def translate_exceptions(func):
@wraps(func)
async def translate_exceptions_(self, *args):
try:
return await func(self, *args)
except (
pymysql.err.OperationalError,
pymysql.err.ProgrammingError,
pymysql.err.DataError,
pymysql.err.Inter... | def translate_exceptions(func):
@wraps(func)
async def wrapped(self, *args):
try:
return await func(self, *args)
except (
pymysql.err.OperationalError,
pymysql.err.ProgrammingError,
pymysql.err.DataError,
pymysql.err.InternalError,
... | https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def _close(self) -> None:
if self._connection: # pragma: nobranch
self._connection.close()
self.log.debug(
"Closed connection %s with params: %s", self._connection, self._template
)
self._template.clear()
| def _close(self) -> None:
if self._connection: # pragma: nobranch
self._connection.close()
self.log.debug(
"Closed connection %s with params: %s", self._connection, self._template
)
self._template.clear()
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def close(self) -> None:
await self._close()
self._connection = None
| async def close(self) -> None:
self._close()
self._connection = None
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
def _in_transaction(self):
return self._transaction_class(self)
| def _in_transaction(self):
return self._transaction_class(self.connection_name, self._connection, self._lock)
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
def __init__(self, connection):
self.connection_name = connection.connection_name
self._connection = connection._connection # type: aiomysql.Connection
self._lock = connection._lock
self.log = logging.getLogger("db_client")
self._transaction_class = self.__class__
self._finalized = None # type... | def __init__(self, connection_name, connection, lock):
self.connection_name = connection_name
self._connection = connection
self._lock = lock
self.log = logging.getLogger("db_client")
self._transaction_class = self.__class__
self._finalized = False
self._old_context_value = None
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def start(self):
await self._connection.begin()
self._finalized = False
current_transaction = current_transaction_map[self.connection_name]
self._old_context_value = current_transaction.get()
current_transaction.set(self)
| async def start(self):
await self._connection.begin()
current_transaction = current_transaction_map[self.connection_name]
self._old_context_value = current_transaction.get()
current_transaction.set(self)
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def commit(self) -> None:
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
await self._connection.commit()
self.release()
| async def commit(self):
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
self._finalized = True
await self._connection.commit()
current_transaction_map[self.connection_name].set(self._old_context_value)
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def rollback(self) -> None:
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
await self._connection.rollback()
self.release()
| async def rollback(self):
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
self._finalized = True
await self._connection.rollback()
current_transaction_map[self.connection_name].set(self._old_context_value)
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def create_connection(self, with_db: bool) -> None:
await self._parent.create_connection(with_db)
self._connection = self._parent._connection
| async def create_connection(self, with_db: bool) -> None:
self._template = {
"host": self.host,
"port": self.port,
"user": self.user,
"db": self.database if with_db else None,
"autocommit": True,
**self.extra,
}
try:
self._connection = await aiomysql.c... | https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
def translate_exceptions(func):
@wraps(func)
async def translate_exceptions_(self, query, *args):
try:
return await func(self, query, *args)
except sqlite3.OperationalError as exc:
raise OperationalError(exc)
except sqlite3.IntegrityError as exc:
raise... | def translate_exceptions(func):
@wraps(func)
async def wrapped(self, query, *args):
try:
return await func(self, query, *args)
except sqlite3.OperationalError as exc:
raise OperationalError(exc)
except sqlite3.IntegrityError as exc:
raise IntegrityErro... | https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def rollback(self) -> None:
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
await self._connection.rollback()
self.release()
| async def rollback(self) -> None:
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
self._finalized = True
await self._connection.rollback()
current_transaction_map[self.connection_name].set(self._old_context_value)
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
async def commit(self) -> None:
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
await self._connection.commit()
self.release()
| async def commit(self) -> None:
if self._finalized:
raise TransactionManagementError("Transaction already finalised")
self._finalized = True
await self._connection.commit()
current_transaction_map[self.connection_name].set(self._old_context_value)
| https://github.com/tortoise/tortoise-orm/issues/134 | Traceback (most recent call last):
File \"/usr/lib/python3.6/asyncio/selector_events.py\", line 714, in _read_ready
data = self._sock.recv(self.max_size)
ConnectionResetError: [Errno 104] Connection reset by peer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
Fil... | ConnectionResetError |
def render(self, request):
"""
Render the resource. This will takeover the transport underlying
the request, create a :class:`autobahn.twisted.websocket.WebSocketServerProtocol`
and let that do any subsequent communication.
"""
# for reasons unknown, the transport is already None when the
# ... | def render(self, request):
"""
Render the resource. This will takeover the transport underlying
the request, create a :class:`autobahn.twisted.websocket.WebSocketServerProtocol`
and let that do any subsequent communication.
"""
# Create Autobahn WebSocket protocol.
#
protocol = self._fac... | https://github.com/crossbario/autobahn-python/issues/1218 | Jul 03 14:39:28 <redacted> unbuffer[2114]: Traceback (most recent call last):
Jul 03 14:39:28 <redacted> unbuffer[2114]: File "/home/ubuntu/cpy373_1/lib/python3.7/site-packages/twisted/web/_http2.py", line 186, in dataReceived
Jul 03 14:39:28 <redacted> unbuffer[2114]: self._requestEnded(event)
Jul 03 14:39:28 <r... | builtins.AttributeError |
def _wrap_connection_future(self, transport, done, conn_f):
def on_connect_success(result):
# async connect call returns a 2-tuple
transport, proto = result
# in the case where we .abort() the transport / connection
# during setup, we still get on_connect_success but our
# t... | def _wrap_connection_future(self, transport, done, conn_f):
def on_connect_success(result):
# async connect call returns a 2-tuple
transport, proto = result
# if e.g. an SSL handshake fails, we will have
# successfully connected (i.e. get here) but need to
# 'listen' for the... | https://github.com/crossbario/autobahn-python/issues/1153 | 2019-03-25 15:29:00.597 13776 DEBUG autobahn.asyncio.component.Component [-] component failed: TransportLost: failed to complete connection _log /usr/local/lib/python3.5/dist-packages/txaio/aio.py:201
2019-03-25 15:29:00.609 13776 DEBUG autobahn.asyncio.component.Component [-] Traceback (most recent call last):
File "/... | ConnectionResetError |
def on_connect_success(result):
# async connect call returns a 2-tuple
transport, proto = result
# in the case where we .abort() the transport / connection
# during setup, we still get on_connect_success but our
# transport is already closed (this will happen if
# e.g. there's an "open handshak... | def on_connect_success(result):
# async connect call returns a 2-tuple
transport, proto = result
# if e.g. an SSL handshake fails, we will have
# successfully connected (i.e. get here) but need to
# 'listen' for the "connection_lost" from the underlying
# protocol in case of handshake failure .... | https://github.com/crossbario/autobahn-python/issues/1153 | 2019-03-25 15:29:00.597 13776 DEBUG autobahn.asyncio.component.Component [-] component failed: TransportLost: failed to complete connection _log /usr/local/lib/python3.5/dist-packages/txaio/aio.py:201
2019-03-25 15:29:00.609 13776 DEBUG autobahn.asyncio.component.Component [-] Traceback (most recent call last):
File "/... | ConnectionResetError |
def onClose(self, wasClean, code, reason):
"""
Callback from :func:`autobahn.websocket.interfaces.IWebSocketChannel.onClose`
"""
# WAMP session might never have been established in the first place .. guard this!
self._onclose_reason = reason
if self._session is not None:
# WebSocket conn... | def onClose(self, wasClean, code, reason):
"""
Callback from :func:`autobahn.websocket.interfaces.IWebSocketChannel.onClose`
"""
# WAMP session might never have been established in the first place .. guard this!
if self._session is not None:
# WebSocket connection lost - fire off the WAMP
... | https://github.com/crossbario/autobahn-python/issues/1153 | 2019-03-25 15:29:00.597 13776 DEBUG autobahn.asyncio.component.Component [-] component failed: TransportLost: failed to complete connection _log /usr/local/lib/python3.5/dist-packages/txaio/aio.py:201
2019-03-25 15:29:00.609 13776 DEBUG autobahn.asyncio.component.Component [-] Traceback (most recent call last):
File "/... | ConnectionResetError |
def startProxyConnect(self):
"""
Connect to explicit proxy.
"""
# construct proxy connect HTTP request
#
request = b"CONNECT %s:%d HTTP/1.1\x0d\x0a" % (
self.factory.host.encode("utf-8"),
self.factory.port,
)
request += b"Host: %s:%d\x0d\x0a" % (
self.factory.host... | def startProxyConnect(self):
"""
Connect to explicit proxy.
"""
# construct proxy connect HTTP request
#
request = "CONNECT %s:%d HTTP/1.1\x0d\x0a" % (
self.factory.host.encode("utf-8"),
self.factory.port,
)
request += "Host: %s:%d\x0d\x0a" % (
self.factory.host.e... | https://github.com/crossbario/autobahn-python/issues/892 | 2017-09-12T14:19:58+0200 Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/twisted/python/log.py", line 103, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/local/lib/python3.5/dist-packages/twisted/python/log.py", line 86, in callWithContext
return c... | builtins.TypeError |
def as_view(cls, actions=None, **initkwargs):
"""
Because of the way class based views create a closure around the
instantiated view, we need to totally reimplement `.as_view`,
and slightly modify the view function that is created and returned.
"""
# The suffix initkwarg is reserved for identify... | def as_view(cls, actions=None, **initkwargs):
"""
Because of the way class based views create a closure around the
instantiated view, we need to totally reimplement `.as_view`,
and slightly modify the view function that is created and returned.
"""
# The suffix initkwarg is reserved for identify... | https://github.com/encode/django-rest-framework/issues/4864 | pip show djangorestframework
---
Name: djangorestframework
Version: 3.5.3
Location: /home/matwey/temp/venv/lib/python3.4/site-packages
Requires:
(venv)matwey@epsilon:~/temp/drf_test> python runtests.py
Creating test database for alias 'default' ('file:memorydb_default?mode=memory&cache=shared')...
Operations to per... | AssertionError |
def view(request, *args, **kwargs):
self = cls(**initkwargs)
# We also store the mapping of request methods to actions,
# so that we can later set the action attribute.
# eg. `self.action = 'list'` on an incoming GET request.
self.action_map = actions
# Bind methods to actions
# This is the... | def view(request, *args, **kwargs):
self = cls(**initkwargs)
# We also store the mapping of request methods to actions,
# so that we can later set the action attribute.
# eg. `self.action = 'list'` on an incoming GET request.
self.action_map = actions
# Bind methods to actions
# This is the... | https://github.com/encode/django-rest-framework/issues/4864 | pip show djangorestframework
---
Name: djangorestframework
Version: 3.5.3
Location: /home/matwey/temp/venv/lib/python3.4/site-packages
Requires:
(venv)matwey@epsilon:~/temp/drf_test> python runtests.py
Creating test database for alias 'default' ('file:memorydb_default?mode=memory&cache=shared')...
Operations to per... | AssertionError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.