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 explode(self):
"""
Explode muti-part geometries into multiple single geometries.
Each row containing a multi-part geometry will be split into
multiple rows with single geometries, thereby increasing the vertical
size of the GeoDataFrame.
The index of the input geodataframe is no longer uni... | def explode(self):
"""
Explode muti-part geometries into multiple single geometries.
Each row containing a multi-part geometry will be split into
multiple rows with single geometries, thereby increasing the vertical
size of the GeoDataFrame.
The index of the input geodataframe is no longer uni... | https://github.com/geopandas/geopandas/issues/1393 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~/anaconda3/envs/uap/lib/python3.8/site-packages/pandas/core/arrays/categorical.py in __init__(self, values, categories, ordered, dtype, fastpath)
354 try:
... | ValueError |
def sjoin(
left_df, right_df, how="inner", op="intersects", lsuffix="left", rsuffix="right"
):
"""Spatial join of two GeoDataFrames.
Parameters
----------
left_df, right_df : GeoDataFrames
how : string, default 'inner'
The type of join:
* 'left': use keys from left_df; retain o... | def sjoin(
left_df, right_df, how="inner", op="intersects", lsuffix="left", rsuffix="right"
):
"""Spatial join of two GeoDataFrames.
Parameters
----------
left_df, right_df : GeoDataFrames
how : string, default 'inner'
The type of join:
* 'left': use keys from left_df; retain o... | https://github.com/geopandas/geopandas/issues/1307 | import geopandas as gpd
gdf = gpd.read_file(gpd.datasets.get_path('nybb'))
gpd.sjoin(gdf, gdf.head(0))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-23-a647daaec265> in <module>
----> 1 gpd.sjoin(g... | TypeError |
def astype(self, dtype, copy=True):
"""
Cast to a NumPy array with 'dtype'.
Parameters
----------
dtype : str or dtype
Typecode or data-type to which the array is cast.
copy : bool, default True
Whether to copy the data, even if not necessary. If False,
a copy is made on... | def astype(self, dtype, copy=True):
"""
Cast to a NumPy array with 'dtype'.
Parameters
----------
dtype : str or dtype
Typecode or data-type to which the array is cast.
copy : bool, default True
Whether to copy the data, even if not necessary. If False,
a copy is made on... | https://github.com/geopandas/geopandas/issues/1145 | $ conda create -n gpd060 python=3.6 geopandas=0.6.0
<conda output>
$ conda activate gpd060
(gpd060) $ python
Python 3.6.7 | packaged by conda-forge | (default, Jul 2 2019, 02:07:37)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more informati... | ValueError |
def from_wkb(data):
"""
Convert a list or array of WKB objects to a GeometryArray.
"""
import shapely.wkb
n = len(data)
out = []
for idx in range(n):
geom = data[idx]
if geom is not None and len(geom):
geom = shapely.wkb.loads(geom)
else:
ge... | def from_wkb(data):
"""
Convert a list or array of WKB objects to a GeometryArray.
"""
import shapely.wkb
n = len(data)
out = []
for idx in range(n):
geom = data[idx]
if geom is not None and len(geom):
geom = shapely.wkb.loads(geom)
else:
ge... | https://github.com/geopandas/geopandas/issues/1130 | Traceback (most recent call last):
File "intersection_crash.py", line 17, in <module>
intersection_big_gdf = gpd.overlay(concave_polygon_gdf, big_rect_polygon_gdf, how='intersection')
File "/usr/local/lib/python3.6/site-packages/geopandas-0.6.0rc1-py3.6.egg/geopandas/tools/overlay.py", line 362, in overlay
result = _ov... | ValueError |
def from_wkt(data):
"""
Convert a list or array of WKT objects to a GeometryArray.
"""
import shapely.wkt
n = len(data)
out = []
for idx in range(n):
geom = data[idx]
if geom is not None and len(geom):
if isinstance(geom, bytes):
geom = geom.dec... | def from_wkt(data):
"""
Convert a list or array of WKT objects to a GeometryArray.
"""
import shapely.wkt
n = len(data)
out = []
for idx in range(n):
geom = data[idx]
if geom is not None and len(geom):
if isinstance(geom, bytes):
geom = geom.dec... | https://github.com/geopandas/geopandas/issues/1130 | Traceback (most recent call last):
File "intersection_crash.py", line 17, in <module>
intersection_big_gdf = gpd.overlay(concave_polygon_gdf, big_rect_polygon_gdf, how='intersection')
File "/usr/local/lib/python3.6/site-packages/geopandas-0.6.0rc1-py3.6.egg/geopandas/tools/overlay.py", line 362, in overlay
result = _ov... | ValueError |
def points_from_xy(x, y, z=None):
"""Convert arrays of x and y values to a GeometryArray of points."""
x = np.asarray(x, dtype="float64")
y = np.asarray(y, dtype="float64")
if z is not None:
z = np.asarray(z, dtype="float64")
out = _points_from_xy(x, y, z)
aout = np.empty(len(x), dtype=o... | def points_from_xy(x, y, z=None):
"""Convert arrays of x and y values to a GeometryArray of points."""
x = np.asarray(x, dtype="float64")
y = np.asarray(y, dtype="float64")
if z is not None:
z = np.asarray(z, dtype="float64")
out = _points_from_xy(x, y, z)
out = np.array(out, dtype=objec... | https://github.com/geopandas/geopandas/issues/1130 | Traceback (most recent call last):
File "intersection_crash.py", line 17, in <module>
intersection_big_gdf = gpd.overlay(concave_polygon_gdf, big_rect_polygon_gdf, how='intersection')
File "/usr/local/lib/python3.6/site-packages/geopandas-0.6.0rc1-py3.6.egg/geopandas/tools/overlay.py", line 362, in overlay
result = _ov... | ValueError |
def _affinity_method(op, left, *args, **kwargs):
# type: (str, GeometryArray, ...) -> GeometryArray
# not all shapely.affinity methods can handle empty geometries:
# affine_transform itself works (as well as translate), but rotate, scale
# and skew fail (they try to unpack the bounds).
# Here: cons... | def _affinity_method(op, left, *args, **kwargs):
# type: (str, GeometryArray, ...) -> GeometryArray
# not all shapely.affinity methods can handle empty geometries:
# affine_transform itself works (as well as translate), but rotate, scale
# and skew fail (they try to unpack the bounds).
# Here: cons... | https://github.com/geopandas/geopandas/issues/1130 | Traceback (most recent call last):
File "intersection_crash.py", line 17, in <module>
intersection_big_gdf = gpd.overlay(concave_polygon_gdf, big_rect_polygon_gdf, how='intersection')
File "/usr/local/lib/python3.6/site-packages/geopandas-0.6.0rc1-py3.6.egg/geopandas/tools/overlay.py", line 362, in overlay
result = _ov... | ValueError |
def interiors(self):
has_non_poly = False
inner_rings = []
for geom in self.data:
interior_ring_seq = getattr(geom, "interiors", None)
# polygon case
if interior_ring_seq is not None:
inner_rings.append(list(interior_ring_seq))
# non-polygon case
else:
... | def interiors(self):
has_non_poly = False
inner_rings = []
for geom in self.data:
interior_ring_seq = getattr(geom, "interiors", None)
# polygon case
if interior_ring_seq is not None:
inner_rings.append(list(interior_ring_seq))
# non-polygon case
else:
... | https://github.com/geopandas/geopandas/issues/1130 | Traceback (most recent call last):
File "intersection_crash.py", line 17, in <module>
intersection_big_gdf = gpd.overlay(concave_polygon_gdf, big_rect_polygon_gdf, how='intersection')
File "/usr/local/lib/python3.6/site-packages/geopandas-0.6.0rc1-py3.6.egg/geopandas/tools/overlay.py", line 362, in overlay
result = _ov... | ValueError |
def buffer(self, distance, resolution=16, **kwargs):
data = data = np.empty(len(self), dtype=object)
if isinstance(distance, np.ndarray):
if len(distance) != len(self):
raise ValueError(
"Length of distance sequence does not match length of the GeoSeries"
)
... | def buffer(self, distance, resolution=16, **kwargs):
if isinstance(distance, np.ndarray):
if len(distance) != len(self):
raise ValueError(
"Length of distance sequence does not match length of the GeoSeries"
)
data = [
geom.buffer(dist, resolution,... | https://github.com/geopandas/geopandas/issues/1130 | Traceback (most recent call last):
File "intersection_crash.py", line 17, in <module>
intersection_big_gdf = gpd.overlay(concave_polygon_gdf, big_rect_polygon_gdf, how='intersection')
File "/usr/local/lib/python3.6/site-packages/geopandas-0.6.0rc1-py3.6.egg/geopandas/tools/overlay.py", line 362, in overlay
result = _ov... | ValueError |
def interpolate(self, distance, normalized=False):
data = data = np.empty(len(self), dtype=object)
if isinstance(distance, np.ndarray):
if len(distance) != len(self):
raise ValueError(
"Length of distance sequence does not match length of the GeoSeries"
)
... | def interpolate(self, distance, normalized=False):
if isinstance(distance, np.ndarray):
if len(distance) != len(self):
raise ValueError(
"Length of distance sequence does not match length of the GeoSeries"
)
data = [
geom.interpolate(dist, normaliz... | https://github.com/geopandas/geopandas/issues/1130 | Traceback (most recent call last):
File "intersection_crash.py", line 17, in <module>
intersection_big_gdf = gpd.overlay(concave_polygon_gdf, big_rect_polygon_gdf, how='intersection')
File "/usr/local/lib/python3.6/site-packages/geopandas-0.6.0rc1-py3.6.egg/geopandas/tools/overlay.py", line 362, in overlay
result = _ov... | ValueError |
def sjoin(
left_df, right_df, how="inner", op="intersects", lsuffix="left", rsuffix="right"
):
"""Spatial join of two GeoDataFrames.
Parameters
----------
left_df, right_df : GeoDataFrames
how : string, default 'inner'
The type of join:
* 'left': use keys from left_df; retain o... | def sjoin(
left_df, right_df, how="inner", op="intersects", lsuffix="left", rsuffix="right"
):
"""Spatial join of two GeoDataFrames.
Parameters
----------
left_df, right_df : GeoDataFrames
how : string, default 'inner'
The type of join:
* 'left': use keys from left_df; retain o... | https://github.com/geopandas/geopandas/issues/251 | Traceback (most recent call last):
File "_test.py", line 21, in <module>
merged = sjoin(polygons, amenities, how='left', op='contains')
File "/Users/mperry/projects/geopandas/geopandas/tools/sjoin.py", line 50, in sjoin
r_idx = np.concatenate(idxmatch.values)
ValueError: need at least one array to concatenate | ValueError |
def sjoin(
left_df,
right_df,
how="inner",
op="intersects",
lsuffix="left",
rsuffix="right",
**kwargs,
):
"""Spatial join of two GeoDataFrames.
left_df, right_df are GeoDataFrames
how: type of join
left -> use keys from left_df; retain only left_df geometry column
... | def sjoin(
left_df,
right_df,
how="inner",
op="intersects",
lsuffix="left",
rsuffix="right",
**kwargs,
):
"""Spatial join of two GeoDataFrames.
left_df, right_df are GeoDataFrames
how: type of join
left -> use keys from left_df; retain only left_df geometry column
... | https://github.com/geopandas/geopandas/issues/190 | Traceback (most recent call last):
File "C:/Users/JKosir/PyCharmProjects/nyctaxi/main.py", line 50, in <module>
for group in sjoin(chunk, nbh, how='inner').groupby('REGIONID'):
File "C:\Python27\lib\site-packages\geopandas\tools\sjoin.py", line 58, in sjoin
l_idx = idxmatch.index.values.repeat(idxmatch.str.len().values... | TypeError |
def _setup_logging(args):
# Set environment to standard to use periods for decimals and avoid localization
locale_to_use = utils.get_locale()
os.environ["LC_ALL"] = locale_to_use
os.environ["LC"] = locale_to_use
os.environ["LANG"] = locale_to_use
config = None
if len(args) == 1 and isinstanc... | def _setup_logging(args):
# Set environment to standard to use periods for decimals and avoid localization
os.environ["LC_ALL"] = "C"
os.environ["LC"] = "C"
os.environ["LANG"] = "C"
config = None
if len(args) == 1 and isinstance(args[0], (list, tuple)):
args = args[0]
for arg in args... | https://github.com/bcbio/bcbio-nextgen/issues/2890 | Traceback (most recent call last):
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 52, in _setup_logging
yield config
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 447, in detect_sv
return ipython.zip_args(apply(structural.d... | UnicodeDecodeError |
def process(args):
"""Run the function in args.name given arguments in args.argfile."""
# Set environment to standard to use periods for decimals and avoid localization
locale_to_use = utils.get_locale()
os.environ["LC_ALL"] = locale_to_use
os.environ["LC"] = locale_to_use
os.environ["LANG"] = l... | def process(args):
"""Run the function in args.name given arguments in args.argfile."""
# Set environment to standard to use periods for decimals and avoid localization
os.environ["LC_ALL"] = "C"
os.environ["LC"] = "C"
os.environ["LANG"] = "C"
setpath.prepend_bcbiopath()
try:
fn = ge... | https://github.com/bcbio/bcbio-nextgen/issues/2890 | Traceback (most recent call last):
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 52, in _setup_logging
yield config
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 447, in detect_sv
return ipython.zip_args(apply(structural.d... | UnicodeDecodeError |
def run_main(
workdir,
config_file=None,
fc_dir=None,
run_info_yaml=None,
parallel=None,
workflow=None,
):
"""Run variant analysis, handling command line options."""
# Set environment to standard to use periods for decimals and avoid localization
locale_to_use = utils.get_locale()
... | def run_main(
workdir,
config_file=None,
fc_dir=None,
run_info_yaml=None,
parallel=None,
workflow=None,
):
"""Run variant analysis, handling command line options."""
# Set environment to standard to use periods for decimals and avoid localization
os.environ["LC_ALL"] = "C"
os.env... | https://github.com/bcbio/bcbio-nextgen/issues/2890 | Traceback (most recent call last):
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 52, in _setup_logging
yield config
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 447, in detect_sv
return ipython.zip_args(apply(structural.d... | UnicodeDecodeError |
def _run_toplevel(
config, config_file, work_dir, parallel, fc_dir=None, run_info_yaml=None
):
"""
Run toplevel analysis, processing a set of input files.
config_file -- Main YAML configuration file with system parameters
fc_dir -- Directory of fastq files to process
run_info_yaml -- YAML config... | def _run_toplevel(
config, config_file, work_dir, parallel, fc_dir=None, run_info_yaml=None
):
"""
Run toplevel analysis, processing a set of input files.
config_file -- Main YAML configuration file with system parameters
fc_dir -- Directory of fastq files to process
run_info_yaml -- YAML config... | https://github.com/bcbio/bcbio-nextgen/issues/2890 | Traceback (most recent call last):
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 52, in _setup_logging
yield config
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 447, in detect_sv
return ipython.zip_args(apply(structural.d... | UnicodeDecodeError |
def _run_delly(bam_files, chrom, ref_file, work_dir, items):
"""Run delly, calling structural variations for the specified type."""
batch = sshared.get_cur_batch(items)
ext = "-%s-svs" % batch if batch else "-svs"
out_file = os.path.join(
work_dir,
"%s%s-%s.bcf"
% (os.path.splite... | def _run_delly(bam_files, chrom, ref_file, work_dir, items):
"""Run delly, calling structural variations for the specified type."""
batch = sshared.get_cur_batch(items)
ext = "-%s-svs" % batch if batch else "-svs"
out_file = os.path.join(
work_dir,
"%s%s-%s.bcf"
% (os.path.splite... | https://github.com/bcbio/bcbio-nextgen/issues/2890 | Traceback (most recent call last):
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 52, in _setup_logging
yield config
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 447, in detect_sv
return ipython.zip_args(apply(structural.d... | UnicodeDecodeError |
def locale_export():
"""Exports for dealing with Click-based programs and ASCII/Unicode errors.
RuntimeError: Click will abort further execution because Python 3 was
configured to use ASCII as encoding for the environment.
Consult https://click.palletsprojects.com/en/7.x/python3/ for mitigation steps.
... | def locale_export():
"""Exports for dealing with Click-based programs and ASCII/Unicode errors.
RuntimeError: Click will abort further execution because Python 3 was
configured to use ASCII as encoding for the environment.
Consult https://click.palletsprojects.com/en/7.x/python3/ for mitigation steps.
... | https://github.com/bcbio/bcbio-nextgen/issues/2890 | Traceback (most recent call last):
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 52, in _setup_logging
yield config
File "/opt/bcbio/anaconda/lib/python3.6/site-packages/bcbio/distributed/ipythontasks.py", line 447, in detect_sv
return ipython.zip_args(apply(structural.d... | UnicodeDecodeError |
def _sge_info(queue):
"""Returns machine information for an sge job scheduler."""
qhost_out = subprocess.check_output(["qhost", "-q", "-xml"]).decode()
qstat_queue = ["-q", queue] if queue and "," not in queue else []
qstat_out = subprocess.check_output(["qstat", "-f", "-xml"] + qstat_queue).decode()
... | def _sge_info(queue):
"""Returns machine information for an sge job scheduler."""
qhost_out = subprocess.check_output(["qhost", "-q", "-xml"]).decode()
qstat_queue = ["-q", queue] if queue and "," not in queue else []
qstat_out = subprocess.check_output(["qstat", "-f", "-xml"] + qstat_queue).decode()
... | https://github.com/bcbio/bcbio-nextgen/issues/3063 | Using GATK jar /export/home/ncit/external/a.mizeranschi/bcbio_nextgen/anaconda/share/gatk4-4.1.4.1-1/gatk-package-4.1.4.1-local.jar
Running:
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -Xms681m -Xmx1g -XX... | subprocess.CalledProcessError |
def picard_reorder(picard, in_bam, ref_file, out_file):
"""Reorder BAM file to match reference file ordering."""
if not file_exists(out_file):
with tx_tmpdir(picard._config) as tmp_dir:
with file_transaction(picard._config, out_file) as tx_out_file:
dict_file = "%s.dict" % os... | def picard_reorder(picard, in_bam, ref_file, out_file):
"""Reorder BAM file to match reference file ordering."""
if not file_exists(out_file):
with tx_tmpdir(picard._config) as tmp_dir:
with file_transaction(picard._config, out_file) as tx_out_file:
opts = [
... | https://github.com/bcbio/bcbio-nextgen/issues/3000 | Uncaught exception occurred
Traceback (most recent call last):
File "/path/anaconda/lib/python3.6/site-packages/bcbio/provenance/do.py", line 26, in run
_do_run(cmd, checks, log_stdout, env=env)
File "/path/anaconda/lib/python3.6/site-packages/bcbio/provenance/do.py", line 106, in _do_run
raise subprocess.CalledProc... | subprocess.CalledProcessError |
def process_alignment(data, alt_input=None):
"""Do an alignment of fastq files, preparing a sorted BAM output file."""
data = cwlutils.normalize_missing(utils.to_single_data(data))
data = cwlutils.unpack_tarballs(data, data)
fastq1, fastq2 = dd.get_input_sequence_files(data)
if alt_input:
fa... | def process_alignment(data, alt_input=None):
"""Do an alignment of fastq files, preparing a sorted BAM output file."""
data = cwlutils.normalize_missing(utils.to_single_data(data))
data = cwlutils.unpack_tarballs(data, data)
fastq1, fastq2 = dd.get_input_sequence_files(data)
if alt_input:
fa... | https://github.com/bcbio/bcbio-nextgen/issues/3000 | Uncaught exception occurred
Traceback (most recent call last):
File "/path/anaconda/lib/python3.6/site-packages/bcbio/provenance/do.py", line 26, in run
_do_run(cmd, checks, log_stdout, env=env)
File "/path/anaconda/lib/python3.6/site-packages/bcbio/provenance/do.py", line 106, in _do_run
raise subprocess.CalledProc... | subprocess.CalledProcessError |
def locate(
visible_markers,
camera_model,
registered_markers_undist,
registered_markers_dist,
):
"""Computes a Surface_Location based on a list of visible markers."""
visible_registered_marker_ids = set(visible_markers.keys()) & set(
registered_markers_undist.keys()
)
# If the... | def locate(
visible_markers,
camera_model,
registered_markers_undist,
registered_markers_dist,
):
"""Computes a Surface_Location based on a list of visible markers."""
visible_registered_marker_ids = set(visible_markers.keys()) & set(
registered_markers_undist.keys()
)
# If the... | https://github.com/pupil-labs/pupil/issues/1876 | 2020-05-13 15:27:43,610 - player - [DEBUG] root: Recalculate Surface Cache!
2020-05-13 15:27:43,656 - Background Data Processor - [DEBUG] background_helper: Entering _wrapper
2020-05-13 15:27:43,661 - Background Data Processor - [DEBUG] surface_tracker.surface: Failed to calculate inverse homography with np.inv()! Tryi... | TypeError |
def _find_homographies(points_A, points_B):
points_A = points_A.reshape((-1, 1, 2))
points_B = points_B.reshape((-1, 1, 2))
B_to_A, mask = cv2.findHomography(points_A, points_B)
# NOTE: cv2.findHomography(A, B) will not produce the inverse of
# cv2.findHomography(B, A)! The errors can actually be q... | def _find_homographies(points_A, points_B):
points_A = points_A.reshape((-1, 1, 2))
points_B = points_B.reshape((-1, 1, 2))
B_to_A, mask = cv2.findHomography(points_A, points_B)
# NOTE: cv2.findHomography(A, B) will not produce the inverse of
# cv2.findHomography(B, A)! The errors can actually be q... | https://github.com/pupil-labs/pupil/issues/1876 | 2020-05-13 15:27:43,610 - player - [DEBUG] root: Recalculate Surface Cache!
2020-05-13 15:27:43,656 - Background Data Processor - [DEBUG] background_helper: Entering _wrapper
2020-05-13 15:27:43,661 - Background Data Processor - [DEBUG] surface_tracker.surface: Failed to calculate inverse homography with np.inv()! Tryi... | TypeError |
def _wrapper(self, pipe, _should_terminate_flag, generator, *args, **kwargs):
"""Executed in background, pipes generator results to foreground
All exceptions are caught, forwarded to the foreground, and raised in
`Task_Proxy.fetch()`. This allows users to handle failure gracefully
as well as raising th... | def _wrapper(self, pipe, _should_terminate_flag, generator, *args, **kwargs):
"""Executed in background, pipes generator results to foreground
All exceptions are caught, forwarded to the foreground, and raised in
`Task_Proxy.fetch()`. This allows users to handle failure gracefully
as well as raising th... | https://github.com/pupil-labs/pupil/issues/1847 | Traceback (most recent call last):
File "/Users/papr/work/pupil/pupil_src/launchables/player.py", line 679, in player
g_pool.plugins.clean()
File "/Users/papr/work/pupil/pupil_src/shared_modules/plugin.py", line 396, in clean
p.cleanup()
File "/Users/papr/work/pupil/pupil_src/shared_modules/surface_tracker/surface_trac... | RuntimeError |
def cleanup(self):
super().cleanup()
self._save_marker_cache()
for proxy in self.export_proxies.copy():
proxy.cancel()
self.export_proxies.remove(proxy)
| def cleanup(self):
super().cleanup()
self._save_marker_cache()
for proxy in self.export_proxies:
proxy.cancel()
self.export_proxies.remove(proxy)
| https://github.com/pupil-labs/pupil/issues/1847 | Traceback (most recent call last):
File "/Users/papr/work/pupil/pupil_src/launchables/player.py", line 679, in player
g_pool.plugins.clean()
File "/Users/papr/work/pupil/pupil_src/shared_modules/plugin.py", line 396, in clean
p.cleanup()
File "/Users/papr/work/pupil/pupil_src/shared_modules/surface_tracker/surface_trac... | RuntimeError |
def scan_path_gaze_for_frame(self, frame):
if self.timeframe == 0.0:
return None
if not self._gaze_data_store.is_valid or not self._gaze_data_store.is_complete:
if not self.is_active and self.g_pool.app == "player":
self._trigger_immediate_scan_path_calculation()
return None... | def scan_path_gaze_for_frame(self, frame):
if self.timeframe == 0.0:
return None
if not self._gaze_data_store.is_valid or not self._gaze_data_store.is_complete:
if not self.is_active:
self._trigger_immediate_scan_path_calculation()
return None
timestamp_cutoff = frame.t... | https://github.com/pupil-labs/pupil/issues/1839 | 2020-03-26 19:12:22,171 - Export World Video - [DEBUG] scan_path.controller: ScanPathController._on_preproc_started
2020-03-26 19:12:22,172 - Export World Video - [INFO] background_helper: Traceback (most recent call last):
File "shared_modules/observable.py", line 256, in call_all_observers
File "shared_modules/observ... | AttributeError |
def on_click(self, pos: Vec2, button: int, action: int) -> bool:
if not self.has_frame or self.model.is_invalid():
return False
if action == glfw.GLFW_PRESS:
clicked_handle = self.get_handle_at(pos)
if clicked_handle != self.active_handle:
self.active_handle = clicked_handle... | def on_click(self, pos: Vec2, button: int, action: int) -> bool:
if action == glfw.GLFW_PRESS:
clicked_handle = self.get_handle_at(pos)
if clicked_handle != self.active_handle:
self.active_handle = clicked_handle
return True
elif action == glfw.GLFW_RELEASE:
if se... | https://github.com/pupil-labs/pupil/issues/1825 | Traceback (most recent call last):
File "/Users/papr/work/pupil/pupil_src/launchables/eye.py", line 633, in eye
if plugin.on_click(pos, button, action):
File "/Users/papr/work/pupil/pupil_src/shared_modules/roi.py", line 287, in on_click
clicked_handle = self.get_handle_at(pos)
File "/Users/papr/work/pupil/pupil_src/sh... | AttributeError |
def _load_recorded_calibrations(self):
notifications = fm.load_pldata_file(self._rec_dir, "notify")
for topic, data in zip(notifications.topics, notifications.data):
if topic == "notify.calibration.calibration_data":
try:
calib_result = model.CalibrationResult(
... | def _load_recorded_calibrations(self):
notifications = fm.load_pldata_file(self._rec_dir, "notify")
for topic, data in zip(notifications.topics, notifications.data):
if topic == "notify.calibration.calibration_data":
try:
calib_result = model.CalibrationResult(
... | https://github.com/pupil-labs/pupil/issues/1498 | player - [INFO] gaze_producer.controller.gaze_mapper_controller: Start gaze mapping for 'Default Gaze Mapper'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/spawn.py", line 105, in spawn_... | NotImplementedError |
def player(rec_dir, ipc_pub_url, ipc_sub_url, ipc_push_url, user_dir, app_version):
# general imports
from time import sleep
import logging
import errno
from glob import glob
from copy import deepcopy
from time import time
# networking
import zmq
import zmq_tools
import num... | def player(rec_dir, ipc_pub_url, ipc_sub_url, ipc_push_url, user_dir, app_version):
# general imports
from time import sleep
import logging
import errno
from glob import glob
from copy import deepcopy
from time import time
# networking
import zmq
import zmq_tools
import num... | https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def __init__(self, name, generator, args=(), kwargs={}):
super().__init__()
self._should_terminate_flag = mp.Value(c_bool, 0)
self._completed = False
self._canceled = False
pipe_recv, pipe_send = mp.Pipe(False)
wrapper_args = [pipe_send, self._should_terminate_flag, generator]
wrapper_args... | def __init__(self, name, generator, args=(), kwargs={}):
super().__init__()
self._should_terminate_flag = mp.Value(c_bool, 0)
self._completed = False
self._canceled = False
pipe_recv, pipe_send = mp.Pipe(False)
wrapper_args = [pipe_send, self._should_terminate_flag, generator]
wrapper_args... | https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def fetch(self):
"""Fetches progress and available results from background"""
while self.pipe.poll(0):
try:
datum = self.pipe.recv()
except EOFError:
logger.debug("Process canceled be user.")
self._canceled = True
self.process = None
re... | def fetch(self):
"""Fetches progress and available results from background"""
while self.pipe.poll(0):
try:
datum = self.pipe.recv()
except EOFError:
logger.debug("Process canceled be user.")
return
else:
if isinstance(datum, StopIteration)... | https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def get_recording_dirs(data_dir):
"""
You can supply a data folder or any folder
- all folders within will be checked for necessary files
- in order to make a visualization
"""
if is_pupil_rec_dir(data_dir):
yield data_dir
for root, dirs, files in os.walk(data_dir):
for d in ... | def get_recording_dirs(data_dir):
"""
You can supply a data folder or any folder
- all folders within will be checked for necessary files
- in order to make a visualization
"""
filtered_recording_dirs = []
if is_pupil_rec_dir(data_dir):
filtered_recording_dirs.append(data_dir)
fo... | https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def __init__(self, g_pool, source_dir="~/", destination_dir="~/"):
super().__init__(g_pool)
self.available_exports = []
self.queued_exports = []
self.active_exports = []
self.destination_dir = os.path.expanduser(destination_dir)
self.source_dir = os.path.expanduser(source_dir)
self.search_... | def __init__(self, g_pool):
super().__init__(g_pool)
# initialize empty menu
# and load menu configuration of last session
self.menu = None
self.exports = []
self.new_exports = []
self.active_exports = []
default_path = os.path.expanduser("~/work/pupil/recordings/demo")
self.destin... | https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def init_ui(self):
self.add_menu()
self.menu.label = "Batch Export Recordings"
self.menu.append(
ui.Info_Text(
"Search will walk through the source direcotry recursively and detect available Pupil recordings."
)
)
self.menu.append(
ui.Text_Input(
"sou... | def init_ui(self):
self.add_menu()
# initialize the menu
self.menu.label = "Batch Export Recordings"
# load the configuration of last session
# add menu to the window
self._update_ui()
| https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def deinit_ui(self):
self.menu.remove(self.avail_recs_menu)
self.avail_recs_menu = None
self.remove_menu()
| def deinit_ui(self):
self.remove_menu()
| https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def set_src_dir(self, new_dir):
new_dir = os.path.expanduser(new_dir)
if os.path.isdir(new_dir):
self.source_dir = new_dir
else:
logger.warning('"{}" is not a directory'.format(new_dir))
return
| def set_src_dir(self, new_dir):
new_dir = new_dir
self.new_exports = []
self.exports = []
new_dir = os.path.expanduser(new_dir)
if os.path.isdir(new_dir):
self.source_dir = new_dir
self.new_exports = get_recording_dirs(new_dir)
else:
logger.warning('"{}" is not a director... | https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def set_dest_dir(self, new_dir):
new_dir = os.path.expanduser(new_dir)
if os.path.isdir(new_dir):
self.destination_dir = new_dir
else:
logger.warning('"{}" is not a directory'.format(new_dir))
return
| def set_dest_dir(self, new_dir):
new_dir = new_dir
new_dir = os.path.expanduser(new_dir)
if os.path.isdir(new_dir):
self.destination_dir = new_dir
else:
logger.warning('"{}" is not a directory'.format(new_dir))
return
self.exports = []
self.add_exports()
self._updat... | https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def recent_events(self, events):
if self.search_task:
recent = [d for d in self.search_task.fetch()]
if recent:
currently_avail = [rec["source"] for rec in self.available_exports]
self.available_exports.extend(
[
{"source": rec, "selected":... | def recent_events(self, events):
frame = events.get("frame")
if not frame:
return
if self.run:
for i in range(len(self.workers)):
if self.workers[i] and self.workers[i].is_alive():
pass
else:
logger.info("starting new job")
... | https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def export(
rec_dir,
user_dir,
min_data_confidence,
start_frame=None,
end_frame=None,
plugin_initializers=(),
out_file_path=None,
pre_computed={},
):
PID = str(os.getpid())
logger = logging.getLogger(__name__ + " with pid: " + PID)
start_status = "Starting video export with p... | def export(
rec_dir,
user_dir,
min_data_confidence,
start_frame=None,
end_frame=None,
plugin_initializers=(),
out_file_path=None,
pre_computed={},
):
logger = logging.getLogger(__name__ + " with pid: " + str(os.getpid()))
start_status = "Starting video export with pid: {}".format... | https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def recent_events(self, events):
for e in self.exports:
try:
recent = [d for d in e.fetch()]
except Exception as e:
self.status, self.progress = "{}: {}".format(type(e).__name__, e), 0
else:
if recent:
e.status, e.progress = recent[-1]
... | def recent_events(self, events):
for e in self.exports:
recent = [d for d in e.fetch()]
if recent:
e.status, e.progress = recent[-1]
if e.canceled:
e.status = "Export has been canceled."
| https://github.com/pupil-labs/pupil/issues/913 | Traceback (most recent call last):
File "/home/papr/work/pupil/pupil_src/launchables/player.py", line 441, in player
p.recent_events(events)
File "/home/papr/work/pupil/pupil_src/shared_modules/batch_exporter.py", line 190, in recent_events
self.workers[i].start()
File "/usr/lib/python3.5/multiprocessing/process.py", l... | AssertionError |
def update_recording_bytes_to_unicode(rec_dir):
logger.info("Updating recording from bytes to unicode.")
# update to python 3
meta_info_path = os.path.join(rec_dir, "info.csv")
def convert(data):
if isinstance(data, bytes):
return data.decode()
elif isinstance(data, str) or... | def update_recording_bytes_to_unicode(rec_dir):
logger.info("Updating recording from bytes to unicode.")
# update to python 3
meta_info_path = os.path.join(rec_dir, "info.csv")
def convert(data):
if isinstance(data, bytes):
return data.decode()
elif isinstance(data, str) or... | https://github.com/pupil-labs/pupil/issues/591 | Traceback (most recent call last):
File "main.py", line 626, in <module>
session(this_session_dir)
File "main.py", line 490, in session
p.on_notify(n)
File "/Users/pabloprietz/work/pupil/pupil_src/shared_modules/annotations.py", line 247, in on_notify
self.export_annotations(notification['range'],notification['export_d... | AttributeError |
def export_annotations(self, export_range, export_dir):
if not self.annotations:
logger.warning("No annotations in this recording nothing to export")
return
annotations_in_section = chain(*self.annotations_by_frame[export_range])
annotations_in_section = list(
{a["index"]: a for a i... | def export_annotations(self, export_range, export_dir):
if not self.annotations:
logger.warning("No annotations in this recording nothing to export")
return
annotations_in_section = chain(*self.annotations_by_frame[export_range])
annotations_in_section = {
a["index"]: a for a in ann... | https://github.com/pupil-labs/pupil/issues/591 | Traceback (most recent call last):
File "main.py", line 626, in <module>
session(this_session_dir)
File "main.py", line 490, in session
p.on_notify(n)
File "/Users/pabloprietz/work/pupil/pupil_src/shared_modules/annotations.py", line 247, in on_notify
self.export_annotations(notification['range'],notification['export_d... | AttributeError |
def load_object(file_path):
file_path = os.path.expanduser(file_path)
# reading to string and loads is 2.5x faster that using the file handle and load.
try:
with open(file_path, "rb") as fh:
return pickle.load(fh, encoding="bytes")
except pickle.UnpicklingError as e:
raise Va... | def load_object(file_path):
file_path = os.path.expanduser(file_path)
# reading to string and loads is 2.5x faster that using the file handle and load.
try:
with open(file_path, "rb") as fh:
return pickle.load(fh, encoding="bytes")
except pickle.UnpicklingError as e:
raise Va... | https://github.com/pupil-labs/pupil/issues/591 | Traceback (most recent call last):
File "main.py", line 626, in <module>
session(this_session_dir)
File "main.py", line 490, in session
p.on_notify(n)
File "/Users/pabloprietz/work/pupil/pupil_src/shared_modules/annotations.py", line 247, in on_notify
self.export_annotations(notification['range'],notification['export_d... | AttributeError |
def save_surface_statsics_to_file(self, export_range, export_dir):
"""
between in and out mark
report: gaze distribution:
- total gazepoints
- gaze points on surface x
- gaze points not on any surface
report: surface visisbility
- to... | def save_surface_statsics_to_file(self, export_range, export_dir):
"""
between in and out mark
report: gaze distribution:
- total gazepoints
- gaze points on surface x
- gaze points not on any surface
report: surface visisbility
- to... | https://github.com/pupil-labs/pupil/issues/591 | Traceback (most recent call last):
File "main.py", line 626, in <module>
session(this_session_dir)
File "main.py", line 490, in session
p.on_notify(n)
File "/Users/pabloprietz/work/pupil/pupil_src/shared_modules/annotations.py", line 247, in on_notify
self.export_annotations(notification['range'],notification['export_d... | AttributeError |
def set_items(self, data, new_items, indexes):
if type(data) in [list, tuple]:
data_out = data.copy() if isinstance(data, list) else list(data)
params = list_match_func[self.list_match_local]([indexes, new_items])
for ind, i in zip(*params):
if self.replace and len(data_out) > in... | def set_items(self, data, new_items, indexes):
if type(data) in [list, tuple]:
data_out = data.copy()
params = list_match_func[self.list_match_local]([indexes, new_items])
for ind, i in zip(*params):
if self.replace and len(data_out) > ind:
data_out.pop(ind)
... | https://github.com/nortikin/sverchok/issues/3834 | Traceback (most recent call last):
File "\sverchok\core\update_system.py", line 384, in do_update_general
node.process()
File "\sverchok\nodes\list_struct\item_insert.py", line 99, in process
out = self.set_items(data, new_item, indexes[0])
File "\sverchok\nodes\list_struct\item_insert.py", line 105, in set_items
data_... | AttributeError |
def simple28_grid_xy(x, y, args):
"""x and y are passed by default so you could add font content"""
geom, config = args
back_color, grid_color, line_color = config.palette
matrix = gpu.matrix.get_projection_matrix()
bg_vertex_shader = """
in vec2 pos;
uniform mat4 viewProjectionMatrix;
... | def simple28_grid_xy(x, y, args):
"""x and y are passed by default so you could add font content"""
geom, config = args
back_color, grid_color, line_color = config.palette
matrix = gpu.matrix.get_projection_matrix()
bg_vertex_shader = """
in vec2 pos;
uniform mat4 viewProjectionMatrix;
... | https://github.com/nortikin/sverchok/issues/3480 | 2020-08-25 10:58:36,292 [ERROR] sverchok.core.update_system: Node Viewer 2D had exception: Shader Compile Error, see console for more details
Traceback (most recent call last):
File "/Users/jimmygunawan/Library/Application Support/Blender/2.83/scripts/addons/sverchok-master/core/update_system.py", line 383, in do_updat... | Exception |
def get_2d_uniform_color_shader():
uniform_2d_vertex_shader = """
in vec2 pos;
uniform mat4 viewProjectionMatrix;
uniform float x_offset;
uniform float y_offset;
void main()
{
gl_Position = viewProjectionMatrix * vec4(pos.x + x_offset, pos.y + y_offset, 0.0f, 1.0f);
}
"""
... | def get_2d_uniform_color_shader():
uniform_2d_vertex_shader = """
in vec2 pos;
uniform mat4 viewProjectionMatrix;
uniform float x_offset;
uniform float y_offset;
void main()
{
gl_Position = viewProjectionMatrix * vec4(pos.x + x_offset, pos.y + y_offset, 0.0f, 1.0f);
}
"""
... | https://github.com/nortikin/sverchok/issues/3480 | 2020-08-25 10:58:36,292 [ERROR] sverchok.core.update_system: Node Viewer 2D had exception: Shader Compile Error, see console for more details
Traceback (most recent call last):
File "/Users/jimmygunawan/Library/Application Support/Blender/2.83/scripts/addons/sverchok-master/core/update_system.py", line 383, in do_updat... | Exception |
def get_2d_smooth_color_shader():
smooth_2d_vertex_shader = """
in vec2 pos;
layout(location=1) in vec4 color;
uniform mat4 viewProjectionMatrix;
uniform float x_offset;
uniform float y_offset;
out vec4 a_color;
void main()
{
gl_Position = viewProjectionMatrix * vec4(pos.x... | def get_2d_smooth_color_shader():
smooth_2d_vertex_shader = """
in vec2 pos;
layout(location=1) in vec4 color;
uniform mat4 viewProjectionMatrix;
uniform float x_offset;
uniform float y_offset;
out vec4 a_color;
void main()
{
gl_Position = viewProjectionMatrix * vec4(pos.x... | https://github.com/nortikin/sverchok/issues/3480 | 2020-08-25 10:58:36,292 [ERROR] sverchok.core.update_system: Node Viewer 2D had exception: Shader Compile Error, see console for more details
Traceback (most recent call last):
File "/Users/jimmygunawan/Library/Application Support/Blender/2.83/scripts/addons/sverchok-master/core/update_system.py", line 383, in do_updat... | Exception |
def get_2d_uniform_color_shader():
# return gpu.shader.from_builtin('2D_UNIFORM_COLOR')
uniform_2d_vertex_shader = """
in vec2 pos;
uniform mat4 viewProjectionMatrix;
uniform float x_offset;
uniform float y_offset;
void main()
{
gl_Position = viewProjectionMatrix * vec4(pos.x + x... | def get_2d_uniform_color_shader():
# return gpu.shader.from_builtin('2D_UNIFORM_COLOR')
uniform_2d_vertex_shader = """
in vec2 pos;
uniform mat4 viewProjectionMatrix;
uniform float x_offset;
uniform float y_offset;
void main()
{
gl_Position = viewProjectionMatrix * vec4(pos.x + x... | https://github.com/nortikin/sverchok/issues/3480 | 2020-08-25 10:58:36,292 [ERROR] sverchok.core.update_system: Node Viewer 2D had exception: Shader Compile Error, see console for more details
Traceback (most recent call last):
File "/Users/jimmygunawan/Library/Application Support/Blender/2.83/scripts/addons/sverchok-master/core/update_system.py", line 383, in do_updat... | Exception |
def get_2d_smooth_color_shader():
# return gpu.shader.from_builtin('2D_SMOOTH_COLOR')
smooth_2d_vertex_shader = """
in vec2 pos;
layout(location=1) in vec4 color;
uniform mat4 viewProjectionMatrix;
uniform float x_offset;
uniform float y_offset;
out vec4 a_color;
void main()
{... | def get_2d_smooth_color_shader():
# return gpu.shader.from_builtin('2D_SMOOTH_COLOR')
smooth_2d_vertex_shader = """
in vec2 pos;
layout(location=1) in vec4 color;
uniform mat4 viewProjectionMatrix;
uniform float x_offset;
uniform float y_offset;
out vec4 a_color;
void main()
... | https://github.com/nortikin/sverchok/issues/3480 | 2020-08-25 10:58:36,292 [ERROR] sverchok.core.update_system: Node Viewer 2D had exception: Shader Compile Error, see console for more details
Traceback (most recent call last):
File "/Users/jimmygunawan/Library/Application Support/Blender/2.83/scripts/addons/sverchok-master/core/update_system.py", line 383, in do_updat... | Exception |
def perform_svtextin_node_object(node, node_ref):
"""
as it's a beta service, old IO json may not be compatible - in this interest
of neat code we assume it finds everything.
"""
texts = bpy.data.texts
params = node_ref.get("params")
# original textin used 'current_text', textin+ uses 'text... | def perform_svtextin_node_object(node, node_ref):
"""
as it's a beta service, old IO json may not be compatible - in this interest
of neat code we assume it finds everything.
"""
texts = bpy.data.texts
params = node_ref.get("params")
current_text = params["current_text"]
# it's not clea... | https://github.com/nortikin/sverchok/issues/2126 | ======================================================================
ERROR: test_import_examples (tree_import_tests.ExamplesImportTest) (file='5.Sverchok_Spread.json')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/portnov/.config/blender/2.79/scr... | KeyError |
def storage_get_data(self, node_dict):
local_storage = {"knots": [], "knotsnames": []}
if "knots" in self.SvLists:
# implies "knotsnames" will be found too.. because that's how it works..
for knot in self.SvLists["knots"].SvSubLists:
local_storage["knots"].append([knot.SvX, knot.SvY... | def storage_get_data(self, node_dict):
local_storage = {"knots": [], "knotsnames": []}
for knot in self.SvLists["knots"].SvSubLists:
local_storage["knots"].append([knot.SvX, knot.SvY, knot.SvZ])
for outname in self.SvLists["knotsnames"].SvSubLists:
local_storage["knotsnames"].append(outnam... | https://github.com/nortikin/sverchok/issues/2118 | Traceback (most recent call last):
File "/home/portnov/.config/blender/2.79/scripts/addons/sverchok-master/utils/sv_IO_panel_operators.py", line 58, in execute
layout_dict = create_dict_of_tree(ng)
File "/home/portnov/.config/blender/2.79/scripts/addons/sverchok-master/utils/sv_IO_panel_tools.py", line 298, in create_d... | KeyError |
def migrate_customfieldvalues(apps, schema_editor):
"""
Copy data from CustomFieldValues into the custom_field_data JSON field on each model instance.
"""
CustomFieldValue = apps.get_model("extras", "CustomFieldValue")
for cfv in CustomFieldValue.objects.prefetch_related("field").exclude(
s... | def migrate_customfieldvalues(apps, schema_editor):
"""
Copy data from CustomFieldValues into the custom_field_data JSON field on each model instance.
"""
CustomFieldValue = apps.get_model("extras", "CustomFieldValue")
for cfv in CustomFieldValue.objects.prefetch_related("field").exclude(
s... | https://github.com/netbox-community/netbox/issues/5573 | Applying extras.0051_migrate_customfields...Traceback (most recent call last):
File "netbox/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/opt/net... | TypeError |
def get_extra_context(self, request, instance):
related_paths = []
# If tracing a PathEndpoint, locate the CablePath (if one exists) by its origin
if isinstance(instance, PathEndpoint):
path = instance._path
# Otherwise, find all CablePaths which traverse the specified object
else:
... | def get_extra_context(self, request, instance):
related_paths = []
# If tracing a PathEndpoint, locate the CablePath (if one exists) by its origin
if isinstance(instance, PathEndpoint):
path = instance._path
# Otherwise, find all CablePaths which traverse the specified object
else:
... | https://github.com/netbox-community/netbox/issues/5374 | Traceback (most recent call last):
File "/usr/local/netbox/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/netbox/venv/lib64/python3.6/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_cal... | NameError |
def custom_links(context, obj):
"""
Render all applicable links for the given object.
"""
content_type = ContentType.objects.get_for_model(obj)
custom_links = CustomLink.objects.filter(content_type=content_type)
if not custom_links:
return ""
# Pass select context data when renderin... | def custom_links(context, obj):
"""
Render all applicable links for the given object.
"""
content_type = ContentType.objects.get_for_model(obj)
custom_links = CustomLink.objects.filter(content_type=content_type)
if not custom_links:
return ""
# Pass select context data when renderin... | https://github.com/netbox-community/netbox/issues/5231 | Traceback (most recent call last):
File "/opt/netbox-2.9.6/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/opt/netbox-2.9.6/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callbac... | KeyError |
def handle(self, *args, **options):
# Gather all available reports
reports = get_reports()
# Run reports
for module_name, report_list in reports:
for report in report_list:
if (
module_name in options["reports"]
or report.full_name in options["reports... | def handle(self, *args, **options):
# Gather all available reports
reports = get_reports()
# Run reports
for module_name, report_list in reports:
for report in report_list:
if (
module_name in options["reports"]
or report.full_name in options["reports... | https://github.com/netbox-community/netbox/issues/5108 | $ python3 manage.py runreport DeviceConnectionsReport
[17:50:53] Running DeviceConnectionsReport.DeviceConnectionsReport...
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line... | TypeError |
def clean(self):
if self.address:
# /0 masks are not acceptable
if self.address.prefixlen == 0:
raise ValidationError({"address": "Cannot create IP address with /0 mask."})
# Enforce unique IP space (if applicable)
if self.role not in IPADDRESS_ROLES_NONUNIQUE and (
... | def clean(self):
if self.address:
# /0 masks are not acceptable
if self.address.prefixlen == 0:
raise ValidationError({"address": "Cannot create IP address with /0 mask."})
# Enforce unique IP space (if applicable)
if self.role not in IPADDRESS_ROLES_NONUNIQUE and (
... | https://github.com/netbox-community/netbox/issues/5035 | Traceback (most recent call last):
File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/opt/netbox/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *... | AttributeError |
def __init__(self, *args, **kwargs):
# Initialize helper selectors
instance = kwargs.get("instance")
initial = kwargs.get("initial", {}).copy()
if instance:
if type(instance.assigned_object) is Interface:
initial["device"] = instance.assigned_object.device
initial["interf... | def __init__(self, *args, **kwargs):
# Initialize helper selectors
instance = kwargs.get("instance")
initial = kwargs.get("initial", {}).copy()
if instance:
if type(instance.assigned_object) is Interface:
initial["device"] = instance.assigned_object.device
initial["interf... | https://github.com/netbox-community/netbox/issues/5022 | Traceback (most recent call last):
File "/home/jstretch/.virtualenvs/netbox-2.9/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/home/jstretch/.virtualenvs/netbox-2.9/lib/python3.6/site-packages/django/core/handlers/base.py", line 179, in _get_res... | AttributeError |
def clean(self):
# Validate that termination A exists
if not hasattr(self, "termination_a_type"):
raise ValidationError("Termination A type has not been specified")
try:
self.termination_a_type.model_class().objects.get(pk=self.termination_a_id)
except ObjectDoesNotExist:
raise V... | def clean(self):
# Validate that termination A exists
if not hasattr(self, "termination_a_type"):
raise ValidationError("Termination A type has not been specified")
try:
self.termination_a_type.model_class().objects.get(pk=self.termination_a_id)
except ObjectDoesNotExist:
raise V... | https://github.com/netbox-community/netbox/issues/4604 | Traceback (most recent call last):
File "/home/jstretch/.virtualenvs/netbox/lib/python3.6/site-packages/django/db/backends/utils.py", line 86, in _execute
return self.cursor.execute(sql, params)
The above exception (duplicate key value violates unique constraint "dcim_interface__connected_interface_id_key"
DETAIL: Ke... | IntegrityError |
def validate(self, data):
# Validate uniqueness of (group, facility_id) since we omitted the automatically-created validator from Meta.
if data.get("facility_id", None):
validator = UniqueTogetherValidator(
queryset=Rack.objects.all(), fields=("group", "facility_id")
)
valida... | def validate(self, data):
# Validate uniqueness of (group, facility_id) since we omitted the automatically-created validator from Meta.
if data.get("facility_id", None):
validator = UniqueTogetherValidator(
queryset=Rack.objects.all(), fields=("group", "facility_id")
)
valida... | https://github.com/netbox-community/netbox/issues/4496 | AttributeError at /api/ipam/vlans/
'UniqueTogetherValidator' object has no attribute 'set_context'
Request Method: POST
Request URL: http://10.0.192.20/api/ipam/vlans/
Django Version: 3.0.5
Python Executable: /opt/netbox/venv/bin/python3
Python Version: 3.7.3
Python Path: ['/opt/netbox/venv/bin', '/opt/netbox/netbox',... | AttributeError |
def validate(self, data):
# Validate uniqueness of (rack, position, face) since we omitted the automatically-created validator from Meta.
if data.get("rack") and data.get("position") and data.get("face"):
validator = UniqueTogetherValidator(
queryset=Device.objects.all(), fields=("rack", "po... | def validate(self, data):
# Validate uniqueness of (rack, position, face) since we omitted the automatically-created validator from Meta.
if data.get("rack") and data.get("position") and data.get("face"):
validator = UniqueTogetherValidator(
queryset=Device.objects.all(), fields=("rack", "po... | https://github.com/netbox-community/netbox/issues/4496 | AttributeError at /api/ipam/vlans/
'UniqueTogetherValidator' object has no attribute 'set_context'
Request Method: POST
Request URL: http://10.0.192.20/api/ipam/vlans/
Django Version: 3.0.5
Python Executable: /opt/netbox/venv/bin/python3
Python Version: 3.7.3
Python Path: ['/opt/netbox/venv/bin', '/opt/netbox/netbox',... | AttributeError |
def validate(self, data):
# Validate uniqueness of name and slug if a site has been assigned.
if data.get("site", None):
for field in ["name", "slug"]:
validator = UniqueTogetherValidator(
queryset=VLANGroup.objects.all(), fields=("site", field)
)
vali... | def validate(self, data):
# Validate uniqueness of name and slug if a site has been assigned.
if data.get("site", None):
for field in ["name", "slug"]:
validator = UniqueTogetherValidator(
queryset=VLANGroup.objects.all(), fields=("site", field)
)
vali... | https://github.com/netbox-community/netbox/issues/4496 | AttributeError at /api/ipam/vlans/
'UniqueTogetherValidator' object has no attribute 'set_context'
Request Method: POST
Request URL: http://10.0.192.20/api/ipam/vlans/
Django Version: 3.0.5
Python Executable: /opt/netbox/venv/bin/python3
Python Version: 3.7.3
Python Path: ['/opt/netbox/venv/bin', '/opt/netbox/netbox',... | AttributeError |
def validate(self, data):
# Validate uniqueness of vid and name if a group has been assigned.
if data.get("group", None):
for field in ["vid", "name"]:
validator = UniqueTogetherValidator(
queryset=VLAN.objects.all(), fields=("group", field)
)
validato... | def validate(self, data):
# Validate uniqueness of vid and name if a group has been assigned.
if data.get("group", None):
for field in ["vid", "name"]:
validator = UniqueTogetherValidator(
queryset=VLAN.objects.all(), fields=("group", field)
)
validato... | https://github.com/netbox-community/netbox/issues/4496 | AttributeError at /api/ipam/vlans/
'UniqueTogetherValidator' object has no attribute 'set_context'
Request Method: POST
Request URL: http://10.0.192.20/api/ipam/vlans/
Django Version: 3.0.5
Python Executable: /opt/netbox/venv/bin/python3
Python Version: 3.7.3
Python Path: ['/opt/netbox/venv/bin', '/opt/netbox/netbox',... | AttributeError |
def get_bound_field(self, form, field_name):
bound_field = BoundField(form, self, field_name)
# Modify the QuerySet of the field before we return it. Limit choices to any data already bound: Options
# will be populated on-demand via the APISelect widget.
data = bound_field.data or bound_field.initial
... | def get_bound_field(self, form, field_name):
bound_field = BoundField(form, self, field_name)
# Modify the QuerySet of the field before we return it. Limit choices to any data already bound: Options
# will be populated on-demand via the APISelect widget.
field_name = "{}{}".format(self.to_field_name or... | https://github.com/netbox-community/netbox/issues/4240 | Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e,... | ValueError |
def post(self, request, **kwargs):
model = self.queryset.model
# If we are editing *all* objects in the queryset, replace the PK list with all matched objects.
if request.POST.get("_all") and self.filterset is not None:
pk_list = [
obj.pk for obj in self.filterset(request.GET, model.obj... | def post(self, request, **kwargs):
model = self.queryset.model
# Create a mutable copy of the POST data
post_data = request.POST.copy()
# If we are editing *all* objects in the queryset, replace the PK list with all matched objects.
if post_data.get("_all") and self.filterset is not None:
... | https://github.com/netbox-community/netbox/issues/4239 | Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e,... | TypeError |
def process_webhook(webhook, data, model_name, event, timestamp, username, request_id):
"""
Make a POST request to the defined Webhook
"""
payload = {
"event": dict(ObjectChangeActionChoices)[event].lower(),
"timestamp": timestamp,
"model": model_name,
"username": usernam... | def process_webhook(webhook, data, model_name, event, timestamp, username, request_id):
"""
Make a POST request to the defined Webhook
"""
payload = {
"event": dict(ObjectChangeActionChoices)[event].lower(),
"timestamp": timestamp,
"model": model_name,
"username": usernam... | https://github.com/netbox-community/netbox/issues/3951 | Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/rq/worker.py", line 812, in perform_job
rv = job.perform()
File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 588, in perform
self._result = self._execute()
File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 594, in _e... | AttributeError |
def __str__(self):
try:
device = self.device
except Device.DoesNotExist:
device = None
if self.role and device and self.name:
return "{} for {} ({})".format(self.role, self.device, self.name)
# Return role and device if no name is set
if self.role and device:
return "... | def __str__(self):
if self.role and self.device and self.name:
return "{} for {} ({})".format(self.role, self.device, self.name)
# Return role and device if no name is set
if self.role and self.device:
return "{} for {}".format(self.role, self.device)
return "Secret"
| https://github.com/netbox-community/netbox/issues/3927 | Internal Server Error: /dcim/devices/1611/delete/
Traceback (most recent call last):
File "/home/jstretch/.virtualenvs/netbox/lib/python3.6/site-packages/django/db/models/fields/related_descriptors.py", line 164, in __get__
rel_obj = self.field.get_cached_value(instance)
File "/home/jstretch/.virtualenvs/netbox/lib/pyt... | KeyError |
def assign_virtualchassis_master(instance, created, **kwargs):
"""
When a VirtualChassis is created, automatically assign its master device to the VC.
"""
# Default to 1 but don't overwrite an existing position (see #2087)
if instance.master.vc_position is not None:
vc_position = instance.ma... | def assign_virtualchassis_master(instance, created, **kwargs):
"""
When a VirtualChassis is created, automatically assign its master device to the VC.
"""
if created:
Device.objects.filter(pk=instance.master.pk).update(
virtual_chassis=instance, vc_position=1
)
| https://github.com/netbox-community/netbox/issues/2087 | [user@netboxserver:netbox] python manage.py dumpdata > ~/VCtest.json
[user@netboxserver:netbox] python manage.py flush --noinput
[user@netboxserver:netbox] python manage.py loaddata ~/VCtest.json
Traceback (most recent call last):
File "/var/netbox_env/lib/python3.6/site-packages/django/db/backends/utils.py", line 64,... | psycopg2.IntegrityError |
def deserialize_value(self, serialized_value):
"""
Convert a string into the object it represents depending on the type of field
"""
if serialized_value == "":
return None
if self.type == CF_TYPE_INTEGER:
return int(serialized_value)
if self.type == CF_TYPE_BOOLEAN:
retur... | def deserialize_value(self, serialized_value):
"""
Convert a string into the object it represents depending on the type of field
"""
if serialized_value is "":
return None
if self.type == CF_TYPE_INTEGER:
return int(serialized_value)
if self.type == CF_TYPE_BOOLEAN:
retur... | https://github.com/netbox-community/netbox/issues/1980 | Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
Fi... | ValueError |
def napalm(self, request, pk):
"""
Execute a NAPALM method on a Device
"""
device = get_object_or_404(Device, pk=pk)
if not device.primary_ip:
raise ServiceUnavailable(
"This device does not have a primary IP address configured."
)
if device.platform is None:
... | def napalm(self, request, pk):
"""
Execute a NAPALM method on a Device
"""
device = get_object_or_404(Device, pk=pk)
if not device.primary_ip:
raise ServiceUnavailable(
"This device does not have a primary IP address configured."
)
if device.platform is None:
... | https://github.com/netbox-community/netbox/issues/1696 | /opt/netbox-2.2.4/netbox# ./manage.py nbshell
NetBox interactive shell
Python 2.7.9 | Django 1.11.7 | NetBox 2.2.4
lsmodels() will show available models. Use help(<model>) for more info.
import napalm
from napalm_base.exceptions import ConnectAuthError, ModuleImportError
Traceback (most recent call last):
File "<consol... | ImportError |
def get_return_url(self, request, imageattachment):
return imageattachment.parent.get_absolute_url()
| def get_return_url(self, request, imageattachment):
return imageattachment.obj.get_absolute_url()
| https://github.com/netbox-community/netbox/issues/1113 | Internal Server Error: /extras/image-attachments/1/delete/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_... | AttributeError |
def secret_add(request, pk):
# Retrieve device
device = get_object_or_404(Device, pk=pk)
secret = Secret(device=device)
session_key = get_session_key(request)
if request.method == "POST":
form = forms.SecretForm(request.POST, instance=secret)
if form.is_valid():
# We ne... | def secret_add(request, pk):
# Retrieve device
device = get_object_or_404(Device, pk=pk)
secret = Secret(device=device)
uk = UserKey.objects.get(user=request.user)
if request.method == "POST":
form = forms.SecretForm(request.POST, instance=secret)
if form.is_valid():
# ... | https://github.com/netbox-community/netbox/issues/1049 | Performing system checks...
System check identified no issues (0 silenced).
April 06, 2017 - 01:41:36
Django version 1.11, using settings 'netbox.settings'
Starting development server at http://0.0.0.0:8002/
Quit the server with CONTROL-C.
Internal Server Error: /dcim/devices/9/add-secret/
Traceback (most recent call ... | TypeError |
def secret_edit(request, pk):
secret = get_object_or_404(Secret, pk=pk)
session_key = get_session_key(request)
if request.method == "POST":
form = forms.SecretForm(request.POST, instance=secret)
if form.is_valid():
# Re-encrypt the Secret if a plaintext and session key have been... | def secret_edit(request, pk):
secret = get_object_or_404(Secret, pk=pk)
if request.method == "POST":
form = forms.SecretForm(request.POST, instance=secret)
if form.is_valid():
# Re-encrypt the Secret if a plaintext and session key have been provided.
session_key = base64... | https://github.com/netbox-community/netbox/issues/1049 | Performing system checks...
System check identified no issues (0 silenced).
April 06, 2017 - 01:41:36
Django version 1.11, using settings 'netbox.settings'
Starting development server at http://0.0.0.0:8002/
Quit the server with CONTROL-C.
Internal Server Error: /dcim/devices/9/add-secret/
Traceback (most recent call ... | TypeError |
def add_message_event(proto_message, span, message_event_type, message_id=1):
"""Adds a MessageEvent to the span based off of the given protobuf
message
"""
span.add_message_event(
time_event.MessageEvent(
datetime.utcnow(),
message_id,
type=message_event_type... | def add_message_event(proto_message, span, message_event_type, message_id=1):
"""Adds a MessageEvent to the span based off of the given protobuf
message
"""
span.add_message_event(
time_event.MessageEvent(
datetime.utcnow(),
message_id,
type=message_event_type... | https://github.com/census-instrumentation/opencensus-python/issues/969 | Traceback (most recent call last):
File "/redacted.py", line 167, in redacted
public_key = client.get_public_key(request={"name": key_name})
File "/usr/local/lib/python3.7/site-packages/google/cloud/kms_v1/services/key_management_service/client.py", line 1026, in get_public_key
response = rpc(request, retry=retry, time... | AttributeError |
def create_time_series_list(self, v_data, option_resource_type, metric_prefix):
"""Create the TimeSeries object based on the view data"""
time_series_list = []
aggregation_type = v_data.view.aggregation.aggregation_type
tag_agg = v_data.tag_value_aggregation_data_map
for tag_value, agg in tag_agg.it... | def create_time_series_list(self, v_data, option_resource_type, metric_prefix):
"""Create the TimeSeries object based on the view data"""
time_series_list = []
aggregation_type = v_data.view.aggregation.aggregation_type
tag_agg = v_data.tag_value_aggregation_data_map
for tag_value, agg in tag_agg.it... | https://github.com/census-instrumentation/opencensus-python/issues/584 | Traceback (most recent call last):
File "/Users/rsa/dev/metrics/.venv/lib/python3.7/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
return callable_(*args, **kwargs)
File "/Users/rsa/dev/metrics/.venv/lib/python3.7/site-packages/grpc/_channel.py", line 549, in __call__
return _end_un... | google.api_core.exceptions.InvalidArgument |
def to_metric(self, desc, tag_values, agg_data):
"""to_metric translate the data that OpenCensus create
to Prometheus format, using Prometheus Metric object
:type desc: dict
:param desc: The map that describes view definition
:type tag_values: tuple of :class:
`~opencensus.tags.tag_value.T... | def to_metric(self, desc, tag_values, agg_data):
"""to_metric translate the data that OpenCensus create
to Prometheus format, using Prometheus Metric object
:type desc: dict
:param desc: The map that describes view definition
:type tag_values: tuple of :class:
`~opencensus.tags.tag_value.T... | https://github.com/census-instrumentation/opencensus-python/issues/480 | Exception happened during processing of request from ('127.0.0.1', 50691)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/socketserver.py", line 625, in process_request_thread
self.finish_request(request, client_address)
File "/Library/Frameworks/Python.framework... | AttributeError |
def register_view(self, view):
"""register_view will create the needed structure
in order to be able to sent all data to Prometheus
"""
v_name = get_view_name(self.options.namespace, view)
if v_name not in self.registered_views:
desc = {
"name": v_name,
"documentatio... | def register_view(self, view):
"""register_view will create the needed structure
in order to be able to sent all data to Prometheus
"""
v_name = get_view_name(self.options.namespace, view)
if v_name not in self.registered_views:
desc = {
"name": v_name,
"documentatio... | https://github.com/census-instrumentation/opencensus-python/issues/468 | Exception happened during processing of request from ('127.0.0.1', 64332)
Traceback (most recent call last):
File "/Users/prakritibansal/anaconda2/lib/python2.7/SocketServer.py", line 596, in process_request_thread
self.finish_request(request, client_address)
File "/Users/prakritibansal/anaconda2/lib/python2.7/SocketSe... | ValueError |
def get_view_name(namespace, view):
"""create the name for the view"""
name = ""
if namespace != "":
name = namespace + "_"
return sanitize(name + view.name)
| def get_view_name(namespace, view):
"""create the name for the view"""
name = ""
if namespace != "":
name = namespace + "_"
return name + view.name
| https://github.com/census-instrumentation/opencensus-python/issues/468 | Exception happened during processing of request from ('127.0.0.1', 64332)
Traceback (most recent call last):
File "/Users/prakritibansal/anaconda2/lib/python2.7/SocketServer.py", line 596, in process_request_thread
self.finish_request(request, client_address)
File "/Users/prakritibansal/anaconda2/lib/python2.7/SocketSe... | ValueError |
def _extract_logs_from_span(span):
if span.time_events is None:
return None
logs = []
for time_event in span.time_events:
annotation = time_event.annotation
if not annotation:
continue
fields = []
if annotation.attributes is not None:
fields ... | def _extract_logs_from_span(span):
if span.time_events is None:
return None
logs = []
for time_event in span.time_events:
annotation = time_event.annotation
if not annotation:
continue
fields = _extract_tags(annotation.attributes)
fields.append(
... | https://github.com/census-instrumentation/opencensus-python/issues/314 | Traceback (most recent call last):
File "main.py", line 37, in <module>
main()
File "main.py", line 33, in main
more_work()
File "/Users/tw/.local/share/virtualenvs/census-K4PTEclS/lib/python3.6/site-packages/opencensus/trace/span.py", line 251, in __exit__
self.context_tracer.end_span()
File "/Users/tw/.local/share/vi... | AttributeError |
def _extract_tags(attr):
if attr is None:
return []
tags = []
for attribute_key, attribute_value in attr.items():
tag = _convert_attribute_to_tag(attribute_key, attribute_value)
if tag is None:
continue
tags.append(tag)
return tags
| def _extract_tags(attr):
if attr is None:
return None
tags = []
for attribute_key, attribute_value in attr.items():
tag = _convert_attribute_to_tag(attribute_key, attribute_value)
if tag is None:
continue
tags.append(tag)
return tags
| https://github.com/census-instrumentation/opencensus-python/issues/314 | Traceback (most recent call last):
File "main.py", line 37, in <module>
main()
File "main.py", line 33, in main
more_work()
File "/Users/tw/.local/share/virtualenvs/census-K4PTEclS/lib/python3.6/site-packages/opencensus/trace/span.py", line 251, in __exit__
self.context_tracer.end_span()
File "/Users/tw/.local/share/vi... | AttributeError |
def parse_get_bucket_location(parsed, http_response, **kwargs):
# s3.GetBucketLocation cannot be modeled properly. To
# account for this we just manually parse the XML document.
# The "parsed" passed in only has the ResponseMetadata
# filled out. This handler will fill in the LocationConstraint
# ... | def parse_get_bucket_location(parsed, http_response, **kwargs):
# s3.GetBucketLocation cannot be modeled properly. To
# account for this we just manually parse the XML document.
# The "parsed" passed in only has the ResponseMetadata
# filled out. This handler will fill in the LocationConstraint
# ... | https://github.com/boto/botocore/issues/1884 | Traceback (most recent call last):
File "untitled.py", line 24, in <module>
client.get_bucket_location(Bucket="meh")
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.7/site-packages/botocore/client.py... | AttributeError |
def _send_request(self, method, url, body, headers, *args, **kwargs):
self._response_received = False
if headers.get("Expect", b"") == b"100-continue":
self._expect_header_set = True
else:
self._expect_header_set = False
self.response_class = self._original_response_cls
rval = HT... | def _send_request(self, method, url, body, headers):
self._response_received = False
if headers.get("Expect", b"") == b"100-continue":
self._expect_header_set = True
else:
self._expect_header_set = False
self.response_class = self._original_response_cls
rval = HTTPConnection._sen... | https://github.com/boto/botocore/issues/1079 | Python 3.6.0b2 (default, Nov 1 2016, 00:18:55)
[GCC 5.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import boto3
s3 = boto3.client('s3')
s3.list_buckets()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/botocore/... | TypeError |
def _send_output(self, message_body=None, *args, **kwargs):
self._buffer.extend((b"", b""))
msg = self._convert_to_bytes(self._buffer)
del self._buffer[:]
# If msg and message_body are sent in a single send() call,
# it will avoid performance problems caused by the interaction
# between delayed ... | def _send_output(self, message_body=None):
self._buffer.extend((b"", b""))
msg = self._convert_to_bytes(self._buffer)
del self._buffer[:]
# If msg and message_body are sent in a single send() call,
# it will avoid performance problems caused by the interaction
# between delayed ack and the Nagle... | https://github.com/boto/botocore/issues/1079 | Python 3.6.0b2 (default, Nov 1 2016, 00:18:55)
[GCC 5.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import boto3
s3 = boto3.client('s3')
s3.list_buckets()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/botocore/... | TypeError |
def _default_serialize(self, xmlnode, params, shape, name):
node = ElementTree.SubElement(xmlnode, name)
node.text = six.text_type(params)
| def _default_serialize(self, xmlnode, params, shape, name):
node = ElementTree.SubElement(xmlnode, name)
node.text = str(params)
| https://github.com/boto/botocore/issues/868 | import boto3
client = boto3.client('s3')
bucket = '<your-bucket-name>'
key = u'日本語でおk'
client.put_object(Bucket=bucket, Key=key)
client.delete_objects(Bucket=bucket, Delete={'Objects': [{'Key': key}]})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ec2-user/Workspace/test/local/lib/p... | UnicodeEncodeError |
def _parse_error_from_body(self, response):
xml_contents = response["body"]
root = self._parse_xml_string_to_dom(xml_contents)
parsed = self._build_name_to_xml_node(root)
self._replace_nodes(parsed)
if root.tag == "Error":
# This is an S3 error response. First we'll populate the
# r... | def _parse_error_from_body(self, response):
xml_contents = response["body"]
root = self._parse_xml_string_to_dom(xml_contents)
parsed = self._build_name_to_xml_node(root)
self._replace_nodes(parsed)
if root.tag == "Error":
# This is an S3 error response. First we'll populate the
# r... | https://github.com/boto/botocore/issues/532 | from boto3.session import Session
sess = Session(region_name='us-east-1')
r53 = sess.client('route53')
zone = r53.list_hosted_zones_by_name(DNSName='example.com.')['HostedZones'][0]
zid = zone['Id']
r53.list_resource_record_sets(HostedZoneId=zid, StartRecordType='SOA')
Traceback (most recent call last):
File "<stdin>",... | KeyError |
def startElement(self, name, attrs):
if name == "elliot":
self.elliottag = True
if name == "exploit" and self.elliottag:
self.exploittag = True
if self.exploittag:
self.tag = name
if self.tag == "name":
self.nametag = True
self.name = ""
elif ... | def startElement(self, name, attrs):
if name == "elliot":
self.elliottag = True
if name == "exploit" and self.elliottag:
self.exploittag = True
if self.exploittag:
self.tag = name
if self.tag == "name":
self.nametag = True
self.name = ""
elif ... | https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def endElement(self, name):
if name == "ref":
if self.cveref != "" and self.cveref:
self.refl.append(self.cveref.rstrip())
self.reftag = False
if name == "name":
self.nametag = False
if name == "url":
self.urltag = False
if name == "ref":
self.reftag =... | def endElement(self, name):
if name == "ref":
if self.cveref != "":
self.refl.append(self.cveref.rstrip())
self.reftag = False
if name == "name":
self.nametag = False
if name == "url":
self.urltag = False
if name == "ref":
self.reftag = False
if na... | https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def apiCVEFor(cpe):
cpe = urllib.parse.unquote_plus(cpe)
cpe = toStringFormattedCPE(cpe)
if not cpe:
cpe = "None"
r = []
cvesp = cves.last(
rankinglookup=False, namelookup=False, vfeedlookup=True, capeclookup=False
)
for x in dbLayer.cvesForCPE(cpe):
r.append(cvesp.ge... | def apiCVEFor(cpe):
cpe = urllib.parse.unquote_plus(cpe)
cpe = toStringFormattedCPE(cpe)
if not cpe:
cpe = "None"
r = []
cvesp = cves.last(
rankinglookup=False, namelookup=False, vfeedlookup=True, capeclookup=False
)
for x in dbLayer.cvesForCPE(cpe):
r.append(cvesp.ge... | https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def apiCVE(cveid):
cvesp = cves.last(
rankinglookup=True, namelookup=True, vfeedlookup=True, capeclookup=True
)
cve = cvesp.getcve(cveid=cveid)
if cve is None:
cve = {}
return jsonify(cve)
| def apiCVE(cveid):
cvesp = cves.last(
rankinglookup=True, namelookup=True, vfeedlookup=True, capeclookup=True
)
cve = cvesp.getcve(cveid=cveid)
if cve is None:
cve = {}
return jsonify(cve)
| https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def apibrowse(vendor=None):
if vendor is not None:
vendor = urllib.parse.quote_plus(vendor).lower()
browseList = getBrowseList(vendor)
if isinstance(browseList, dict):
return jsonify(browseList)
else:
return jsonify({})
| def apibrowse(vendor=None):
if vendor is not None:
vendor = urllib.parse.quote_plus(vendor).lower()
browseList = getBrowseList(vendor)
if isinstance(browseList, dict):
return jsonify(browseList)
else:
return jsonify({})
| https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def apilast():
limit = 30
cvesp = cves.last(
rankinglookup=True, namelookup=True, vfeedlookup=True, capeclookup=True
)
cve = cvesp.get(limit=limit)
return jsonify({"results": cve})
| def apilast():
limit = 30
cvesp = cves.last(
rankinglookup=True, namelookup=True, vfeedlookup=True, capeclookup=True
)
cve = cvesp.get(limit=limit)
return jsonify({"results": cve})
| https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def apisearch(vendor=None, product=None):
if vendor is None or product is None:
return jsonify({})
search = vendor + ":" + product
return json.dumps(dbLayer.cvesForCPE(search), default=json_util.default)
| def apisearch(vendor=None, product=None):
if vendor is None or product is None:
return jsonify({})
search = vendor + ":" + product
return json.dumps(dbLayer.cvesForCPE(search))
| https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def apidbInfo():
return json.dumps(dbLayer.getDBStats(), default=json_util.default)
| def apidbInfo():
return json.dumps(dbLayer.getDBStats())
| https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def apiCVEFor(cpe):
cpe = urllib.parse.unquote_plus(cpe)
cpe = toStringFormattedCPE(cpe)
r = []
cvesp = cves.last(
rankinglookup=False, namelookup=False, vfeedlookup=True, capeclookup=False
)
for x in db.cvesForCPE(cpe):
r.append(cvesp.getcve(x["id"]))
return json.dumps(r, de... | def apiCVEFor(cpe):
cpe = urllib.parse.unquote_plus(cpe)
cpe = toStringFormattedCPE(cpe)
r = []
cvesp = cves.last(
rankinglookup=False, namelookup=False, vfeedlookup=True, capeclookup=False
)
for x in db.cvesForCPE(cpe):
r.append(cvesp.getcve(x["id"]))
return json.dumps(r)
| https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def apisearch(vendor=None, product=None):
if vendor is None or product is None:
return jsonify({})
search = vendor + ":" + product
return json.dumps(db.cvesForCPE(search), default=json_util.default)
| def apisearch(vendor=None, product=None):
if vendor is None or product is None:
return jsonify({})
search = vendor + ":" + product
return json.dumps(db.cvesForCPE(search))
| https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def apidbInfo():
return json.dumps(db.getDBStats(), default=json_util.default)
| def apidbInfo():
return json.dumps(db.getDBStats())
| https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def getFilterSettingsFromPost(r):
filters = dict(request.form)
filters = {x: filters[x][0] for x in filters.keys()}
errors = False
# retrieving data
try:
cve = filter_logic(filters, pageLength, r)
except:
cve = dbLayer.getCVEs(limit=pageLength, skip=r)
errors = True
r... | def getFilterSettingsFromPost(r):
filters = dict(request.form)
filters = {x: filters[x][0] for x in filters.keys()}
errors = False
# retrieving data
try:
cve = filter_logic(filters, pageLength, r)
except:
cve = db.getCVEs(limit=pageLength, skip=r)
errors = True
return... | https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def isURLFilter(s):
return isinstance(s, list)
| def isURLFilter(string):
return isURL(string)
| https://github.com/cve-search/cve-search/issues/129 | Traceback (most recent call last):
File "/home/PidgeyL/git/PidgeyL/cve-search/sbin/db_mgmt_d2sec.py", line 109, in <module>
parser.parse(f)
File "/usr/lib/python3.4/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.4/xml/sax/xmlreader.py", line 123, in pa... | AttributeError |
def masterLogin():
master = input("Master account username: ")
masterPass = buildPassword(getpass.getpass("Master password:"), user=master)
if (
collection.find(
{"username": master, "password": masterPass, "master": True}
).count()
== 0
):
sys.exit("Master us... | def masterLogin():
master = input("Master account username: ")
masterPass = hashlib.sha256(
bytes(getpass.getpass("Master password:"), "utf-8")
).hexdigest()
if (
collection.find(
{"username": master, "password": masterPass, "master": True}
).count()
== 0
... | https://github.com/cve-search/cve-search/issues/34 | Starting vendor
Traceback (most recent call last): ] 0/1440
File ".../cve-search/db_mgmt_vendorstatements.py", line 83, in <module>
bulk.find({'id': statement['id']}).upsert().update({'id': statement['id']}, {"$set":{'statement': statement['statement'], 'id': statement['id'], 'organization': s... | TypeError |
def existsInDB(user):
return True if collection.find({"username": user}).count() > 0 else False
| def existsInDB(user):
return True if collection.find({"username": username}).count() > 0 else False
| https://github.com/cve-search/cve-search/issues/34 | Starting vendor
Traceback (most recent call last): ] 0/1440
File ".../cve-search/db_mgmt_vendorstatements.py", line 83, in <module>
bulk.find({'id': statement['id']}).upsert().update({'id': statement['id']}, {"$set":{'statement': statement['statement'], 'id': statement['id'], 'organization': s... | TypeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.