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 orpca( X, rank, fast=False, lambda1=None, lambda2=None, method=None, learning_rate=None, init=None, training_samples=None, momentum=None, ): """ This function performs Online Robust PCA with missing or corrupted data. Parameters ---------- X : {numpy ...
def orpca( X, rank, fast=False, lambda1=None, lambda2=None, method=None, learning_rate=None, init=None, training_samples=None, momentum=None, ): """ This function performs Online Robust PCA with missing or corrupted data. Parameters ---------- X : {numpy ...
https://github.com/hyperspy/hyperspy/issues/1557
import hyperspy.api as hs from hyperspy.tests.mva.test_rpca import TestORPCA test = TestORPCA() test.setup_method("ml") # why the setup_methods all take a "method" argument, I don't know test.A.shape (256, 1024) s = hs.signals.Signal1D(test.A) s.data[s.data < 0] = 0 s.decomposition(True, algorithm="ORPCA", output_dimen...
ValueError
def fft_correlation(in1, in2, normalize=False): """Correlation of two N-dimensional arrays using FFT. Adapted from scipy's fftconvolve. Parameters ---------- in1, in2 : array normalize: bool If True performs phase correlation """ s1 = np.array(in1.shape) s2 = np.array(in2....
def fft_correlation(in1, in2, normalize=False): """Correlation of two N-dimensional arrays using FFT. Adapted from scipy's fftconvolve. Parameters ---------- in1, in2 : array normalize: bool If True performs phase correlation """ s1 = np.array(in1.shape) s2 = np.array(in2....
https://github.com/hyperspy/hyperspy/issues/1411
Traceback (most recent call last): File "/home/bm424/Documents/phd/dev/test/venv/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-14-1876e2251fb7>", line 1, in <module> roi(dat) File "/home/bm424/Documents/phd/de...
TypeError
def _line_profile_coordinates(src, dst, linewidth=1): """Return the coordinates of the profile of an image along a scan line. Parameters ---------- src : 2-tuple of numeric scalar (float or int) The start point of the scan line. dst : 2-tuple of numeric scalar (float or int) The end ...
def _line_profile_coordinates(src, dst, linewidth=1): """Return the coordinates of the profile of an image along a scan line. Parameters ---------- src : 2-tuple of numeric scalar (float or int) The start point of the scan line. dst : 2-tuple of numeric scalar (float or int) The end ...
https://github.com/hyperspy/hyperspy/issues/1411
Traceback (most recent call last): File "/home/bm424/Documents/phd/dev/test/venv/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 2881, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-14-1876e2251fb7>", line 1, in <module> roi(dat) File "/home/bm424/Documents/phd/de...
TypeError
def __init__( self, signal1D, auto_background=True, auto_add_edges=True, ll=None, GOS=None, dictionary=None, ): Model1D.__init__(self, signal1D) self.signal1D = signal1D self._suspend_auto_fine_structure_width = False self.convolved = False self.low_loss = ll self.GOS...
def __init__( self, signal1D, auto_background=True, auto_add_edges=True, ll=None, GOS=None, dictionary=None, ): Model1D.__init__(self, signal1D) self._suspend_auto_fine_structure_width = False self.convolved = False self.low_loss = ll self.GOS = GOS self.edges = [] ...
https://github.com/hyperspy/hyperspy/issues/1427
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-21-23a6348573b8> in <module>() ----> 1 m = s.create_model() /home/magnunor/Documents/HyperSpy/hyperspy/hyperspy/_signals/eels.py in create_model(self, l...
AttributeError
def signal1D(self, value): if isinstance(value, EELSSpectrum): self._signal = value if self.signal._are_microscope_parameters_missing(): raise ValueError( "The required microscope parameters are not defined in " "the EELS spectrum signal metadata. Use " ...
def signal1D(self, value): if isinstance(value, EELSSpectrum): self._signal = value self.signal._are_microscope_parameters_missing() else: raise ValueError( "This attribute can only contain an EELSSpectrum " "but an object of type %s was provided" % str(type(value...
https://github.com/hyperspy/hyperspy/issues/1427
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-21-23a6348573b8> in <module>() ----> 1 m = s.create_model() /home/magnunor/Documents/HyperSpy/hyperspy/hyperspy/_signals/eels.py in create_model(self, l...
AttributeError
def _get_microscope_name(self, ImageTags): try: if ImageTags.Session_Info.Microscope != "[]": return ImageTags.Session_Info.Microscope except AttributeError: if "Name" in ImageTags["Microscope_Info"].keys(): return ImageTags.Microscope_Info.Name
def _get_microscope_name(self, ImageTags): try: if ImageTags.Session_Info.Microscope != "[]": return ImageTags.Session_Info.Microscope except AttributeError: return ImageTags.Microscope_Info.Name
https://github.com/hyperspy/hyperspy/issues/1293
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-6-98fa7e0685f8> in <module>() ----> 1 wedge = hs.load() C:\Anaconda3\lib\site-packages\hyperspy-1.2+dev-py3.5.egg\hyperspy\io.py in load(filenames, sign...
AttributeError
def get_mapping(self): is_scanning = "DigiScan" in self.imdict.ImageTags.keys() mapping = { "ImageList.TagGroup0.ImageTags.DataBar.Acquisition Date": ( "General.date", self._get_date, ), "ImageList.TagGroup0.ImageTags.DataBar.Acquisition Time": ( "Gene...
def get_mapping(self): is_scanning = "DigiScan" in self.imdict.ImageTags.keys() mapping = { "ImageList.TagGroup0.ImageTags.DataBar.Acquisition Date": ( "General.date", self._get_date, ), "ImageList.TagGroup0.ImageTags.DataBar.Acquisition Time": ( "Gene...
https://github.com/hyperspy/hyperspy/issues/1293
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-6-98fa7e0685f8> in <module>() ----> 1 wedge = hs.load() C:\Anaconda3\lib\site-packages\hyperspy-1.2+dev-py3.5.egg\hyperspy\io.py in load(filenames, sign...
AttributeError
def align_zero_loss_peak( self, calibrate=True, also_align=[], print_stats=True, subpixel=True, mask=None, signal_range=None, show_progressbar=None, **kwargs, ): """Align the zero-loss peak. This function first aligns the spectra using the result of `estimate_zero_loss_p...
def align_zero_loss_peak( self, calibrate=True, also_align=[], print_stats=True, subpixel=True, mask=None, signal_range=None, show_progressbar=None, **kwargs, ): """Align the zero-loss peak. This function first aligns the spectra using the result of `estimate_zero_loss_p...
https://github.com/hyperspy/hyperspy/issues/1301
--------------------------------------------------------------------------- IndexError Traceback (most recent call last) <ipython-input-20-f890f17f75fd> in <module>() ----> 1 s.align_zero_loss_peak() /home/magnunor/Documents/HyperSpy/hyperspy/hyperspy/_signals/eels.py in align_zero_loss_...
IndexError
def get_lines_intensity( self, xray_lines=None, integration_windows=2.0, background_windows=None, plot_result=False, only_one=True, only_lines=("a",), **kwargs, ): """Return the intensity map of selected Xray lines. The intensities, the number of X-ray counts, are computed by ...
def get_lines_intensity( self, xray_lines=None, integration_windows=2.0, background_windows=None, plot_result=False, only_one=True, only_lines=("a",), **kwargs, ): """Return the intensity map of selected Xray lines. The intensities, the number of X-ray counts, are computed by ...
https://github.com/hyperspy/hyperspy/issues/1175
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-18-0c6100594c5b> in <module>() ----> 1 inten = Pt_wedge.get_lines_intensity(integration_windows=iw_Pt, background_windows=bw_Pt) 2 inten[0].plot() /User...
TypeError
def load(self, filename): """Load the results of a previous decomposition and demixing analysis from a file. Parameters ---------- filename : string """ decomposition = np.load(filename) for key, value in decomposition.items(): if value.dtype == np.dtype("object"): v...
def load(self, filename): """Load the results of a previous decomposition and demixing analysis from a file. Parameters ---------- filename : string """ decomposition = np.load(filename) for key, value in decomposition.items(): if value.dtype == np.dtype("object"): v...
https://github.com/hyperspy/hyperspy/issues/1145
s = hs.signals.Signal1D(np.random.rand(10,15, 1024)) s.decomposition(True) s2 = s.get_decomposition_model(9) s.blind_source_separation(9) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-34-ef9c7adc7bb...
AttributeError
def summary(self): """Prints a summary of the decomposition and demixing parameters to the stdout """ print(self._summary())
def summary(self): """Prints a summary of the decomposition and demixing parameters to the stdout """ summary_str = ( "Decomposition parameters:\n" "-------------------------\n\n" + ("Decomposition algorithm : \t%s\n" % self.decomposition_algorithm) + ("Poissonian noise n...
https://github.com/hyperspy/hyperspy/issues/1145
s = hs.signals.Signal1D(np.random.rand(10,15, 1024)) s.decomposition(True) s2 = s.get_decomposition_model(9) s.blind_source_separation(9) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-34-ef9c7adc7bb...
AttributeError
def _load_dictionary(self, file_data_dict): """Load data from dictionary. Parameters ---------- file_data_dict : dictionary A dictionary containing at least a 'data' keyword with an array of arbitrary dimensions. Additionally the dictionary can contain the following items: ...
def _load_dictionary(self, file_data_dict): """Load data from dictionary. Parameters ---------- file_data_dict : dictionary A dictionary containing at least a 'data' keyword with an array of arbitrary dimensions. Additionally the dictionary can contain the following items: ...
https://github.com/hyperspy/hyperspy/issues/1145
s = hs.signals.Signal1D(np.random.rand(10,15, 1024)) s.decomposition(True) s2 = s.get_decomposition_model(9) s.blind_source_separation(9) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-34-ef9c7adc7bb...
AttributeError
def ensure_parameters_in_bounds(self): """For all active components, snaps their free parameter values to be within their boundaries (if bounded). Does not touch the array of values. """ for component in self: if component.active: for param in component.free_parameters: ...
def ensure_parameters_in_bounds(self): """For all active components, snaps their free parameter values to be within their boundaries (if bounded). Does not touch the array of values. """ for component in self: if component.active: for param in component.free_parameters: ...
https://github.com/hyperspy/hyperspy/issues/1062
TypeError Traceback (most recent call last) <ipython-input-9-b81665222e1f> in <module>() ----> 1 m1.multifit(fitter='mpfit', bounded=True, kind='smart') /home/magnunor/Documents/HyperSpy_project/HyperSpy/hyperspy/model.py in multifit(self, mask, fetch_only_fixed, autosave, autosave_ever...
TypeError
def _export_factors( self, factors, folder=None, comp_ids=None, multiple_files=None, save_figures=False, save_figures_format="png", factor_prefix=None, factor_format=None, comp_label=None, cmap=plt.cm.gray, plot_shifts=True, plot_char=4, img_data=None, same_wi...
def _export_factors( self, factors, folder=None, comp_ids=None, multiple_files=None, save_figures=False, save_figures_format="png", factor_prefix=None, factor_format=None, comp_label=None, cmap=plt.cm.gray, plot_shifts=True, plot_char=4, img_data=None, same_wi...
https://github.com/hyperspy/hyperspy/issues/1095
ImportErrorTraceback (most recent call last) <ipython-input-8-b1971df6874d> in <module>() ----> 1 sW.export_decomposition_results(factor_format='msa',loading_format='tif') /home/smc204/anaconda2/envs/hyperspy/lib/python3.5/site-packages/hyperspy/signal.py in export_decomposition_results(self, comp_ids, folder, calibra...
ImportError
def _export_loadings( self, loadings, folder=None, comp_ids=None, multiple_files=None, loading_prefix=None, loading_format=None, save_figures_format="png", comp_label=None, cmap=plt.cm.gray, save_figures=False, same_window=False, calibrate=True, no_nans=True, ...
def _export_loadings( self, loadings, folder=None, comp_ids=None, multiple_files=None, loading_prefix=None, loading_format=None, save_figures_format="png", comp_label=None, cmap=plt.cm.gray, save_figures=False, same_window=False, calibrate=True, no_nans=True, ...
https://github.com/hyperspy/hyperspy/issues/1095
ImportErrorTraceback (most recent call last) <ipython-input-8-b1971df6874d> in <module>() ----> 1 sW.export_decomposition_results(factor_format='msa',loading_format='tif') /home/smc204/anaconda2/envs/hyperspy/lib/python3.5/site-packages/hyperspy/signal.py in export_decomposition_results(self, comp_ids, folder, calibra...
ImportError
def export_to_dictionary(target, whitelist, dic, fullcopy=True): """Exports attributes of target from whitelist.keys() to dictionary dic All values are references only by default. Parameters ---------- target : object must contain the (nested) attributes of the whitelist.keys() ...
def export_to_dictionary(target, whitelist, dic, fullcopy=True): """Exports attributes of target from whitelist.keys() to dictionary dic All values are references only by default. Parameters ---------- target : object must contain the (nested) attributes of the whitelist.keys() ...
https://github.com/hyperspy/hyperspy/issues/997
m = tmp.models.restore('BK_w_fine_structure') --------------------------------------------------------------------------- EOFError Traceback (most recent call last) <ipython-input-349-668408e20346> in <module>() ----> 1 tmp.models.restore('BK_w_fine_structure') /home/josh/git_repos/hyp...
EOFError
def reconstruct_object(flags, value): """Reconstructs the value (if necessary) after having saved it in a dictionary """ if not isinstance(flags, list): flags = parse_flag_string(flags) if "sig" in flags: if isinstance(value, dict): from hyperspy.signal import Signal ...
def reconstruct_object(flags, value): """Reconstructs the value (if necessary) after having saved it in a dictionary """ if not isinstance(flags, list): flags = parse_flag_string(flags) if "sig" in flags: if isinstance(value, dict): from hyperspy.signal import Signal ...
https://github.com/hyperspy/hyperspy/issues/997
m = tmp.models.restore('BK_w_fine_structure') --------------------------------------------------------------------------- EOFError Traceback (most recent call last) <ipython-input-349-668408e20346> in <module>() ----> 1 tmp.models.restore('BK_w_fine_structure') /home/josh/git_repos/hyp...
EOFError
def fit( self, fitter=None, method="ls", grad=False, bounded=False, ext_bounding=False, update_plot=False, **kwargs, ): """Fits the model to the experimental data. The chi-squared, reduced chi-squared and the degrees of freedom are computed automatically when fitting. They a...
def fit( self, fitter=None, method="ls", grad=False, bounded=False, ext_bounding=False, update_plot=False, **kwargs, ): """Fits the model to the experimental data. The chi-squared, reduced chi-squared and the degrees of freedom are computed automatically when fitting. They a...
https://github.com/hyperspy/hyperspy/issues/982
import hyperspy.api as hs import numpy as np s = hs.signals.EELSSpectrum(np.random.random((10, 1000))) s.set_microscope_parameters(100, 1, 10) s.add_elements(("C","O")) m = s.create_model() /home/fjd29/Python/hyperspy3/hyperspy/models/eelsmodel.py:86: VisibleDeprecationWarning: Adding "background" to the user namespace...
TypeError
def multifit( self, mask=None, fetch_only_fixed=False, autosave=False, autosave_every=10, show_progressbar=None, **kwargs, ): """Fit the data to the model at all the positions of the navigation dimensions. Parameters ---------- mask : {None, numpy.array} To mask...
def multifit( self, mask=None, fetch_only_fixed=False, autosave=False, autosave_every=10, show_progressbar=None, **kwargs, ): """Fit the data to the model at all the positions of the navigation dimensions. Parameters ---------- mask : {None, numpy.array} To mask...
https://github.com/hyperspy/hyperspy/issues/982
import hyperspy.api as hs import numpy as np s = hs.signals.EELSSpectrum(np.random.random((10, 1000))) s.set_microscope_parameters(100, 1, 10) s.add_elements(("C","O")) m = s.create_model() /home/fjd29/Python/hyperspy3/hyperspy/models/eelsmodel.py:86: VisibleDeprecationWarning: Adding "background" to the user namespace...
TypeError
def _print_summary(self): string = "\n\tTitle: " string += self.metadata.General.title if self.metadata.has_item("Signal.signal_type"): string += "\n\tSignal type: " string += self.metadata.Signal.signal_type string += "\n\tData dimensions: " string += str(self.axes_manager.shape) ...
def _print_summary(self): string = "\n\tTitle: " string += self.metadata.General.title.decode("utf8") if self.metadata.has_item("Signal.signal_type"): string += "\n\tSignal type: " string += self.metadata.Signal.signal_type string += "\n\tData dimensions: " string += str(self.axes_ma...
https://github.com/hyperspy/hyperspy/issues/924
s = hs.load("*.msa", stack=True) Loading individual files Individual files loaded correctly --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-5-23a60eda1ce6> in <module>() ----> 1 s = hs.load("*.msa", ...
AttributeError
def _binary_operator_ruler(self, other, op_name): exception_message = "Invalid dimensions for this operation" if isinstance(other, Signal): # Both objects are signals oam = other.axes_manager sam = self.axes_manager if ( sam.navigation_shape == oam.navigation_shape ...
def _binary_operator_ruler(self, other, op_name): exception_message = "Invalid dimensions for this operation" if isinstance(other, Signal): # Both objects are signals oam = other.axes_manager sam = self.axes_manager if ( sam.navigation_shape == oam.navigation_shape ...
https://github.com/hyperspy/hyperspy/issues/911
In [23]: s = hs.signals.Signal(np.arange(100.)) In [24]: s1 = s / s.max(0) --------------------------------------------------------------------------- UnboundLocalError Traceback (most recent call last) <ipython-input-24-91a5f30cc65d> in <module>() ----> 1 s1 = s / s.max(0) /home/to266/dev/hype...
UnboundLocalError
def estimate_parameters(self, signal, x1, x2, only_current=False): """Estimate the parameters by the two area method Parameters ---------- signal : Signal instance x1 : float Defines the left limit of the spectral range to use for the estimation. x2 : float Defines the r...
def estimate_parameters(self, signal, x1, x2, only_current=False): """Estimate the parameters by the two area method Parameters ---------- signal : Signal instance x1 : float Defines the left limit of the spectral range to use for the estimation. x2 : float Defines the r...
https://github.com/hyperspy/hyperspy/issues/466
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-3-7c69fa23a4d3> in <module>() ----> 1 s.remove_background(signal_range=(0,100), background_type='Polynomial') /media/storage/PhD/software/hyperspy/dev/h...
TypeError
def estimate_parameters(self, signal, x1, x2, only_current=False): """Estimate the parameters by the two area method Parameters ---------- signal : Signal instance x1 : float Defines the left limit of the spectral range to use for the estimation. x2 : float Defines the r...
def estimate_parameters(self, signal, x1, x2, only_current=False): """Estimate the parameters by the two area method Parameters ---------- signal : Signal instance x1 : float Defines the left limit of the spectral range to use for the estimation. x2 : float Defines the r...
https://github.com/hyperspy/hyperspy/issues/466
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-3-7c69fa23a4d3> in <module>() ----> 1 s.remove_background(signal_range=(0,100), background_type='Polynomial') /media/storage/PhD/software/hyperspy/dev/h...
TypeError
def run(self): """Load skills and update periodically from disk and internet.""" self._remove_git_locks() self._connected_event.wait() if ( not self.skill_updater.defaults_installed() and self.skills_config["auto_update"] ): LOG.info("Not all default skills are installed, per...
def run(self): """Load skills and update periodically from disk and internet.""" self._remove_git_locks() self._connected_event.wait() if ( not self.skill_updater.defaults_installed() and self.skills_config["auto_update"] ): LOG.info("Not all default skills are installed, per...
https://github.com/MycroftAI/mycroft-core/issues/2822
2021-02-04 11:35:41.063 | ERROR | 20080 | mycroft.skills.skill_manager:run:260 | Something really unexpected has occured and the skill manager loop safety harness was hit. Traceback (most recent call last): File "/home/gez/mycroft-core/mycroft/skills/skill_manager.py", line 248, in run self._load_new_skills() File "...
FileNotFoundError
def __init__(self, key_phrase="hey mycroft", config=None, lang="en-us"): super().__init__(key_phrase, config, lang) keyword_file_paths = [ expanduser(x.strip()) for x in self.config.get("keyword_file_path", "hey_mycroft.ppn").split(",") ] sensitivities = self.config.get("sensitivities", ...
def __init__(self, key_phrase="hey mycroft", config=None, lang="en-us"): super(PorcupineHotWord, self).__init__(key_phrase, config, lang) porcupine_path = expanduser( self.config.get("porcupine_path", join("~", ".mycroft", "Porcupine")) ) keyword_file_paths = [ expanduser(x.strip()) ...
https://github.com/MycroftAI/mycroft-core/issues/2720
2020-10-13 18:03:22.296 | INFO | 6577 | mycroft.client.speech.listener:create_wake_word_recognizer:328 | Creating wake word engine 2020-10-13 18:03:22.299 | INFO | 6577 | mycroft.client.speech.listener:create_wake_word_recognizer:351 | Using hotword entry for blueberry 2020-10-13 18:03:22.302 | WARNING | 65...
TypeError
def update(self, chunk): """Update detection state from a chunk of audio data. Arguments: chunk (bytes): Audio data to parse """ pcm = struct.unpack_from("h" * (len(chunk) // 2), chunk) self.audio_buffer += pcm while True: if len(self.audio_buffer) >= self.porcupine.frame_length...
def update(self, chunk): pcm = struct.unpack_from("h" * (len(chunk) // 2), chunk) self.audio_buffer += pcm while True: if len(self.audio_buffer) >= self.porcupine.frame_length: result = self.porcupine.process( self.audio_buffer[0 : self.porcupine.frame_length] ...
https://github.com/MycroftAI/mycroft-core/issues/2720
2020-10-13 18:03:22.296 | INFO | 6577 | mycroft.client.speech.listener:create_wake_word_recognizer:328 | Creating wake word engine 2020-10-13 18:03:22.299 | INFO | 6577 | mycroft.client.speech.listener:create_wake_word_recognizer:351 | Using hotword entry for blueberry 2020-10-13 18:03:22.302 | WARNING | 65...
TypeError
def found_wake_word(self, frame_data): """Check if wakeword has been found. Returns: (bool) True if wakeword was found otherwise False. """ if self.has_found: self.has_found = False return True return False
def found_wake_word(self, frame_data): if self.has_found: self.has_found = False return True return False
https://github.com/MycroftAI/mycroft-core/issues/2720
2020-10-13 18:03:22.296 | INFO | 6577 | mycroft.client.speech.listener:create_wake_word_recognizer:328 | Creating wake word engine 2020-10-13 18:03:22.299 | INFO | 6577 | mycroft.client.speech.listener:create_wake_word_recognizer:351 | Using hotword entry for blueberry 2020-10-13 18:03:22.302 | WARNING | 65...
TypeError
def stop(self): """Stop the hotword engine. Clean up Porcupine library. """ if self.porcupine is not None: self.porcupine.delete()
def stop(self): if self.porcupine is not None: self.porcupine.delete()
https://github.com/MycroftAI/mycroft-core/issues/2720
2020-10-13 18:03:22.296 | INFO | 6577 | mycroft.client.speech.listener:create_wake_word_recognizer:328 | Creating wake word engine 2020-10-13 18:03:22.299 | INFO | 6577 | mycroft.client.speech.listener:create_wake_word_recognizer:351 | Using hotword entry for blueberry 2020-10-13 18:03:22.302 | WARNING | 65...
TypeError
def add(self, name, handler, once=False): """Create event handler for executing intent or other event. Arguments: name (string): IntentParser name handler (func): Method to call once (bool, optional): Event handler will be removed after it has been run onc...
def add(self, name, handler, once=False): """Create event handler for executing intent or other event. Arguments: name (string): IntentParser name handler (func): Method to call once (bool, optional): Event handler will be removed after it has been run onc...
https://github.com/MycroftAI/mycroft-core/issues/2337
12:04:25.758 | INFO | 22386 | mycroft.skills.skill_loader:reload:109 | ATTEMPTING TO RELOAD SKILL: mycroft-alarm.mycroftai 12:04:25.760 | ERROR | 22386 | mycroft.skills.skill_loader:_execute_instance_shutdown:145 | An error occurred while shutting down AlarmSkill Traceback (most recent call last): File "/home/fs...
KeyError
def connect( host="localhost", user=None, password="", db=None, port=3306, unix_socket=None, charset="", sql_mode=None, read_default_file=None, conv=decoders, use_unicode=None, client_flag=0, cursorclass=Cursor, init_command=None, connect_timeout=None, rea...
def connect( host="localhost", user=None, password="", db=None, port=3306, unix_socket=None, charset="", sql_mode=None, read_default_file=None, conv=decoders, use_unicode=None, client_flag=0, cursorclass=Cursor, init_command=None, connect_timeout=None, rea...
https://github.com/aio-libs/aiomysql/issues/297
mysql5 works Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/aiomysql/connection.py", line 464, in _connect await self._request_authentication() File "/usr/local/lib/python3.6/site-packages/aiomysql/connection.py", line 719, in _request_authentication auth_packet = await self._read_pack...
pymysql.err.OperationalError
def __init__( self, host="localhost", user=None, password="", db=None, port=3306, unix_socket=None, charset="", sql_mode=None, read_default_file=None, conv=decoders, use_unicode=None, client_flag=0, cursorclass=Cursor, init_command=None, connect_timeout=No...
def __init__( self, host="localhost", user=None, password="", db=None, port=3306, unix_socket=None, charset="", sql_mode=None, read_default_file=None, conv=decoders, use_unicode=None, client_flag=0, cursorclass=Cursor, init_command=None, connect_timeout=No...
https://github.com/aio-libs/aiomysql/issues/297
mysql5 works Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/aiomysql/connection.py", line 464, in _connect await self._request_authentication() File "/usr/local/lib/python3.6/site-packages/aiomysql/connection.py", line 719, in _request_authentication auth_packet = await self._read_pack...
pymysql.err.OperationalError
async def _request_authentication(self): # https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse if int(self.server_version.split(".", 1)[0]) >= 5: self.client_flag |= CLIENT.MULTI_RESULTS if self.user is None: raise ValueError("Did not spec...
async def _request_authentication(self): # https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse if int(self.server_version.split(".", 1)[0]) >= 5: self.client_flag |= CLIENT.MULTI_RESULTS if self.user is None: raise ValueError("Did not spec...
https://github.com/aio-libs/aiomysql/issues/297
mysql5 works Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/aiomysql/connection.py", line 464, in _connect await self._request_authentication() File "/usr/local/lib/python3.6/site-packages/aiomysql/connection.py", line 719, in _request_authentication auth_packet = await self._read_pack...
pymysql.err.OperationalError
async def _process_auth(self, plugin_name, auth_packet): # These auth plugins do their own packet handling if plugin_name == b"caching_sha2_password": await self.caching_sha2_password_auth(auth_packet) self._auth_plugin_used = plugin_name.decode() elif plugin_name == b"sha256_password": ...
async def _process_auth(self, plugin_name, auth_packet): if plugin_name == b"mysql_native_password": # https://dev.mysql.com/doc/internals/en/ # secure-password-authentication.html#packet-Authentication:: # Native41 data = _auth.scramble_native_password( self._password.en...
https://github.com/aio-libs/aiomysql/issues/297
mysql5 works Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/aiomysql/connection.py", line 464, in _connect await self._request_authentication() File "/usr/local/lib/python3.6/site-packages/aiomysql/connection.py", line 719, in _request_authentication auth_packet = await self._read_pack...
pymysql.err.OperationalError
def _get_full_key(self, key: Optional[Union[DictKeyType, int]]) -> str: ...
def _get_full_key(self, key: Union[str, Enum, int, None]) -> str: ...
https://github.com/omry/omegaconf/issues/554
del cfg["FOO"] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jasha10/omegaconf/omegaconf/dictconfig.py", line 405, in __delitem__ del self.__dict__["_content"][key] KeyError: 'FOO'
KeyError
def _resolve_with_default( self, key: Union[DictKeyType, int], value: Any, default_value: Any = DEFAULT_VALUE_MARKER, ) -> Any: """returns the value with the specified key, like obj.key and obj['key']""" def is_mandatory_missing(val: Any) -> bool: return bool(get_value_kind(val) == Valu...
def _resolve_with_default( self, key: Union[str, int, Enum], value: Any, default_value: Any = DEFAULT_VALUE_MARKER, ) -> Any: """returns the value with the specified key, like obj.key and obj['key']""" def is_mandatory_missing(val: Any) -> bool: return bool(get_value_kind(val) == ValueK...
https://github.com/omry/omegaconf/issues/554
del cfg["FOO"] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jasha10/omegaconf/omegaconf/dictconfig.py", line 405, in __delitem__ del self.__dict__["_content"][key] KeyError: 'FOO'
KeyError
def _get_full_key(self, key: Union[DictKeyType, int, slice, None]) -> str: from .listconfig import ListConfig from .omegaconf import _select_one if not isinstance(key, (int, str, Enum, float, bool, slice, type(None))): return "" def _slice_to_str(x: slice) -> str: if x.step is not None...
def _get_full_key(self, key: Union[str, Enum, int, slice, None]) -> str: from .listconfig import ListConfig from .omegaconf import _select_one if not isinstance(key, (int, str, Enum, slice, type(None))): return "" def _slice_to_str(x: slice) -> str: if x.step is not None: r...
https://github.com/omry/omegaconf/issues/554
del cfg["FOO"] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jasha10/omegaconf/omegaconf/dictconfig.py", line 405, in __delitem__ del self.__dict__["_content"][key] KeyError: 'FOO'
KeyError
def prepand(full_key: str, parent_type: Any, cur_type: Any, key: Any) -> str: if isinstance(key, slice): key = _slice_to_str(key) elif isinstance(key, Enum): key = key.name elif isinstance(key, (int, float, bool)): key = str(key) if issubclass(parent_type, ListConfig): i...
def prepand(full_key: str, parent_type: Any, cur_type: Any, key: Any) -> str: if isinstance(key, slice): key = _slice_to_str(key) elif isinstance(key, Enum): key = key.name if issubclass(parent_type, ListConfig): if full_key != "": if issubclass(cur_type, ListConfig): ...
https://github.com/omry/omegaconf/issues/554
del cfg["FOO"] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jasha10/omegaconf/omegaconf/dictconfig.py", line 405, in __delitem__ del self.__dict__["_content"][key] KeyError: 'FOO'
KeyError
def _s_validate_and_normalize_key(self, key_type: Any, key: Any) -> DictKeyType: if key_type is Any: for t in DictKeyType.__args__: # type: ignore if isinstance(key, t): return key # type: ignore raise KeyValidationError("Incompatible key type '$KEY_TYPE'") elif key...
def _s_validate_and_normalize_key(self, key_type: Any, key: Any) -> DictKeyType: if key_type is Any: for t in DictKeyType.__args__: # type: ignore try: return self._s_validate_and_normalize_key(key_type=t, key=key) except KeyValidationError: pass ...
https://github.com/omry/omegaconf/issues/554
del cfg["FOO"] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jasha10/omegaconf/omegaconf/dictconfig.py", line 405, in __delitem__ del self.__dict__["_content"][key] KeyError: 'FOO'
KeyError
def __delitem__(self, key: DictKeyType) -> None: key = self._validate_and_normalize_key(key) if self._get_flag("readonly"): self._format_and_raise( key=key, value=None, cause=ReadonlyConfigError( "DictConfig in read-only mode does not support deletion"...
def __delitem__(self, key: DictKeyType) -> None: if self._get_flag("readonly"): self._format_and_raise( key=key, value=None, cause=ReadonlyConfigError( "DictConfig in read-only mode does not support deletion" ), ) if self._get_flag(...
https://github.com/omry/omegaconf/issues/554
del cfg["FOO"] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jasha10/omegaconf/omegaconf/dictconfig.py", line 405, in __delitem__ del self.__dict__["_content"][key] KeyError: 'FOO'
KeyError
def _get_full_key(self, key: Optional[Union[DictKeyType, int]]) -> str: parent = self._get_parent() if parent is None: if self._metadata.key is None: return "" else: return str(self._metadata.key) else: return parent._get_full_key(self._metadata.key)
def _get_full_key(self, key: Union[str, Enum, int, None]) -> str: parent = self._get_parent() if parent is None: if self._metadata.key is None: return "" else: return str(self._metadata.key) else: return parent._get_full_key(self._metadata.key)
https://github.com/omry/omegaconf/issues/554
del cfg["FOO"] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jasha10/omegaconf/omegaconf/dictconfig.py", line 405, in __delitem__ del self.__dict__["_content"][key] KeyError: 'FOO'
KeyError
def validate_and_convert_to_enum( enum_type: Type[Enum], value: Any, allow_none: bool = True ) -> Optional[Enum]: if allow_none and value is None: return None if not isinstance(value, (str, int)) and not isinstance(value, enum_type): raise ValidationError( f"Value $VALUE ($VALUE...
def validate_and_convert_to_enum(enum_type: Type[Enum], value: Any) -> Optional[Enum]: if value is None: return None if not isinstance(value, (str, int)) and not isinstance(value, enum_type): raise ValidationError( f"Value $VALUE ($VALUE_TYPE) is not a valid input for {enum_type}" ...
https://github.com/omry/omegaconf/issues/554
del cfg["FOO"] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/jasha10/omegaconf/omegaconf/dictconfig.py", line 405, in __delitem__ del self.__dict__["_content"][key] KeyError: 'FOO'
KeyError
def to_container( cfg: Any, *, resolve: bool = False, enum_to_str: bool = False, exclude_structured_configs: bool = False, ) -> Union[Dict[DictKeyType, Any], List[Any], None, str]: """ Resursively converts an OmegaConf config to a primitive container (dict or list). :param cfg: the confi...
def to_container( cfg: Any, *, resolve: bool = False, enum_to_str: bool = False, exclude_structured_configs: bool = False, ) -> Union[Dict[DictKeyType, Any], List[Any], None, str]: """ Resursively converts an OmegaConf config to a primitive container (dict or list). :param cfg: the confi...
https://github.com/omry/omegaconf/issues/418
Traceback (most recent call last): File "cluster.py", line 24, in start_job OmegaConf.to_container(cfg, resolve=True) AssertionError Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
AssertionError
def _map_merge(dest: "BaseContainer", src: "BaseContainer") -> None: """merge src into dest and return a new copy, does not modified input""" from omegaconf import DictConfig, OmegaConf, ValueNode assert isinstance(dest, DictConfig) assert isinstance(src, DictConfig) src_type = src._metadata.object...
def _map_merge(dest: "BaseContainer", src: "BaseContainer") -> None: """merge src into dest and return a new copy, does not modified input""" from omegaconf import DictConfig, OmegaConf, ValueNode assert isinstance(dest, DictConfig) assert isinstance(src, DictConfig) src_type = src._metadata.object...
https://github.com/omry/omegaconf/issues/431
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/private/home/abaevski/.conda/envs/fairseq-fp16-20200821/lib/python3.6/site-packages/omegaconf/omegaconf.py", line 321, in merge target.merge_with(*others[1:]) File "/private/home/abaevski/.conda/envs/fairseq-fp16-20200821/lib/python3.6/site-p...
omegaconf.errors.ConfigKeyError
def _merge_with( self, *others: Union["BaseContainer", Dict[str, Any], List[Any], Tuple[Any], Any], ) -> None: from .dictconfig import DictConfig from .listconfig import ListConfig from .omegaconf import OmegaConf """merge a list of other Config objects into this one, overriding as needed""" ...
def _merge_with( self, *others: Union["BaseContainer", Dict[str, Any], List[Any], Tuple[Any], Any], ) -> None: from .dictconfig import DictConfig from .listconfig import ListConfig from .omegaconf import OmegaConf """merge a list of other Config objects into this one, overriding as needed""" ...
https://github.com/omry/omegaconf/issues/431
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/private/home/abaevski/.conda/envs/fairseq-fp16-20200821/lib/python3.6/site-packages/omegaconf/omegaconf.py", line 321, in merge target.merge_with(*others[1:]) File "/private/home/abaevski/.conda/envs/fairseq-fp16-20200821/lib/python3.6/site-p...
omegaconf.errors.ConfigKeyError
def _is_missing(self) -> bool: try: self._dereference_node(throw_on_resolution_failure=False, throw_on_missing=True) return False except MissingMandatoryValue: ret = True assert isinstance(ret, bool) return ret
def _is_missing(self) -> bool: try: self._dereference_node(throw_on_missing=True) return False except MissingMandatoryValue: ret = True assert isinstance(ret, bool) return ret
https://github.com/omry/omegaconf/issues/431
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/private/home/abaevski/.conda/envs/fairseq-fp16-20200821/lib/python3.6/site-packages/omegaconf/omegaconf.py", line 321, in merge target.merge_with(*others[1:]) File "/private/home/abaevski/.conda/envs/fairseq-fp16-20200821/lib/python3.6/site-p...
omegaconf.errors.ConfigKeyError
def get_dataclass_data( obj: Any, allow_objects: Optional[bool] = None ) -> Dict[str, Any]: from omegaconf.omegaconf import MISSING, OmegaConf, _maybe_wrap flags = {"allow_objects": allow_objects} if allow_objects is not None else {} dummy_parent = OmegaConf.create({}, flags=flags) d = {} resol...
def get_dataclass_data( obj: Any, allow_objects: Optional[bool] = None ) -> Dict[str, Any]: from omegaconf.omegaconf import MISSING, OmegaConf, _maybe_wrap flags = {"allow_objects": allow_objects} if allow_objects is not None else {} dummy_parent = OmegaConf.create({}, flags=flags) d = {} for f...
https://github.com/omry/omegaconf/issues/303
Traceback (most recent call last): File "test2.py", line 10, in <module> cfg = OmegaConf.structured(Config) File "/private/home/odelalleau/.conda/envs/py37-hydra/lib/python3.7/site-packages/omegaconf/omegaconf.py", line 134, in structured return OmegaConf.create(obj, parent) File "/private/home/odelalleau/.conda/envs/p...
TypeError
def _map_merge(dest: "BaseContainer", src: "BaseContainer") -> None: """merge src into dest and return a new copy, does not modified input""" from omegaconf import DictConfig, OmegaConf, ValueNode assert isinstance(dest, DictConfig) assert isinstance(src, DictConfig) src_type = src._metadata.object...
def _map_merge(dest: "BaseContainer", src: "BaseContainer") -> None: """merge src into dest and return a new copy, does not modified input""" from omegaconf import DictConfig, OmegaConf, ValueNode assert isinstance(dest, DictConfig) assert isinstance(src, DictConfig) src_type = src._metadata.object...
https://github.com/omry/omegaconf/issues/336
Traceback (most recent call last): File "hydra/_internal/config_load er_impl.py", line 610, in _load_config_impl merged = OmegaConf.merge(schema.config, ret.config) File "omegaconf/omegaconf.py", li ne 316, in merge target.merge_with(*others[1:]) File "omegaconf/basecontainer.py" , line 324, in merge_with self._format_...
omegaconf.errors.ValidationError
def expand(node: Container) -> None: type_ = get_ref_type(node) if type_ is not None: _is_optional, type_ = _resolve_optional(type_) if is_dict_annotation(type_): node._set_value({}) elif is_list_annotation(type_): node._set_value([]) else: nod...
def expand(node: Container) -> None: type_ = get_ref_type(node) if type_ is not None: _is_optional, type_ = _resolve_optional(type_) if is_dict_annotation(type_): node._set_value({}) else: node._set_value(type_)
https://github.com/omry/omegaconf/issues/336
Traceback (most recent call last): File "hydra/_internal/config_load er_impl.py", line 610, in _load_config_impl merged = OmegaConf.merge(schema.config, ret.config) File "omegaconf/omegaconf.py", li ne 316, in merge target.merge_with(*others[1:]) File "omegaconf/basecontainer.py" , line 324, in merge_with self._format_...
omegaconf.errors.ValidationError
def _fetch_reference_injections( fn: Callable[..., Any], ) -> Tuple[Dict[str, Any], Dict[str, Any]]: # # Hotfix, see: https://github.com/ets-labs/python-dependency-injector/issues/362 if GenericAlias and fn is GenericAlias: fn = fn.__init__ signature = inspect.signature(fn) injections = {}...
def _fetch_reference_injections( fn: Callable[..., Any], ) -> Tuple[Dict[str, Any], Dict[str, Any]]: signature = inspect.signature(fn) injections = {} closing = {} for parameter_name, parameter in signature.parameters.items(): if not isinstance(parameter.default, _Marker) and not _is_fastap...
https://github.com/ets-labs/python-dependency-injector/issues/362
Traceback (most recent call last): File "/home/ventaquil/Git/project/package/__main__.py", line 86, in <module> sys.exit(main()) File "/home/ventaquil/Git/project/package/__main__.py", line 67, in main container.wire(modules=[http, manager, socketio], packages=[model]) File "src/dependency_injector/containers.pyx", lin...
ValueError
def _fetch_modules(package): modules = [package] for module_info in pkgutil.walk_packages( path=package.__path__, prefix=package.__name__ + ".", ): module = importlib.import_module(module_info.name) modules.append(module) return modules
def _fetch_modules(package): modules = [package] for loader, module_name, is_pkg in pkgutil.walk_packages( path=package.__path__, prefix=package.__name__ + ".", ): module = loader.find_module(module_name).load_module(module_name) modules.append(module) return modules
https://github.com/ets-labs/python-dependency-injector/issues/320
INFO:root:configuration completed INFO:root:Configuration container wired successfully INFO:root:Initializing model... INFO:root:model: <dependency_injector.wiring.Provide object at 0x00000235228E4250> Traceback (most recent call last): File "c:/Users/Federico/Desktop/DeepCleverBot/bot/app.py", line 24, in <module> bot...
TypeError
def main(): # bring our logging stuff up as early as possible debug = logging.DEBUG if "-d" in sys.argv or "--debug" in sys.argv else logging.INFO _init_logger(debug) extension_mgr = _init_extensions() baseline_formatters = [ f.name for f in filter( lambda x: hasattr(x.p...
def main(): # bring our logging stuff up as early as possible debug = logging.DEBUG if "-d" in sys.argv or "--debug" in sys.argv else logging.INFO _init_logger(debug) extension_mgr = _init_extensions() baseline_formatters = [ f.name for f in filter( lambda x: hasattr(x.p...
https://github.com/PyCQA/bandit/issues/362
[main] INFO profile include tests: None [main] INFO profile exclude tests: None [main] INFO cli include tests: None [main] INFO cli exclude tests: None [main] INFO running on Python 3.6.5 [node_visitor] INFO Unable to find qualified name for module: test.py Traceback (most recent call last): Fil...
UnicodeEncodeError
def is_assigned(self, node): assigned = False if self.ignore_nodes: if isinstance(self.ignore_nodes, (list, tuple, object)): if isinstance(node, self.ignore_nodes): return assigned if isinstance(node, ast.Expr): assigned = self.is_assigned(node.value) elif is...
def is_assigned(self, node): assigned = False if self.ignore_nodes: if isinstance(self.ignore_nodes, (list, tuple, object)): if isinstance(node, self.ignore_nodes): return assigned if isinstance(node, ast.Expr): assigned = self.is_assigned(node.value) elif is...
https://github.com/PyCQA/bandit/issues/574
[tester] ERROR Bandit internal error running: django_mark_safe on file ./venv/lib/python3.7/site-packages/django/template/base.py at line 738: 'NoneType' object has no attribute 'id'Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/bandit/core/tester.py", line 64, in run_tests result = tes...
AttributeError
def hashlib_new(context): if isinstance(context.call_function_name_qual, str): qualname_list = context.call_function_name_qual.split(".") func = qualname_list[-1] if "hashlib" in qualname_list and func == "new": args = context.call_args keywords = context.call_keyword...
def hashlib_new(context): if isinstance(context.call_function_name_qual, str): qualname_list = context.call_function_name_qual.split(".") func = qualname_list[-1] if "hashlib" in qualname_list and func == "new": args = context.call_args keywords = context.call_keyword...
https://github.com/PyCQA/bandit/issues/504
$ bandit test_hash_new.py ... [tester] ERROR Bandit internal error running: hashlib_new on file test_hash_new.py at line 4: 'NoneType' object has no attribute 'lower'Traceback (most recent call last): File "/home/pshchelo/.virtualenvs/bandit/lib/python3.6/site-packages/bandit/core/tester.py", line 64, in run_t...
AttributeError
def visit_Str(self, node): """Visitor for AST String nodes add relevant information about node to the context for use in tests which inspect strings. :param node: The node that is being inspected :return: - """ self.context["str"] = node.s if not isinstance(node._bandit_parent, ast.Expr...
def visit_Str(self, node): """Visitor for AST String nodes add relevant information about node to the context for use in tests which inspect strings. :param node: The node that is being inspected :return: - """ self.context["str"] = node.s if not isinstance(node.parent, ast.Expr): # do...
https://github.com/PyCQA/bandit/issues/487
from bandit.core.config import BanditConfig from bandit.core.meta_ast import BanditMetaAst from bandit.core.metrics import Metrics from bandit.core.node_visitor import BanditNodeVisitor from bandit.core.test_set import BanditTestSet from pyflakes.checker import Checker import ast profile = {} bnv = BanditNodeVisitor( ....
AttributeError
def visit_Bytes(self, node): """Visitor for AST Bytes nodes add relevant information about node to the context for use in tests which inspect strings. :param node: The node that is being inspected :return: - """ self.context["bytes"] = node.s if not isinstance(node._bandit_parent, ast.E...
def visit_Bytes(self, node): """Visitor for AST Bytes nodes add relevant information about node to the context for use in tests which inspect strings. :param node: The node that is being inspected :return: - """ self.context["bytes"] = node.s if not isinstance(node.parent, ast.Expr): #...
https://github.com/PyCQA/bandit/issues/487
from bandit.core.config import BanditConfig from bandit.core.meta_ast import BanditMetaAst from bandit.core.metrics import Metrics from bandit.core.node_visitor import BanditNodeVisitor from bandit.core.test_set import BanditTestSet from pyflakes.checker import Checker import ast profile = {} bnv = BanditNodeVisitor( ....
AttributeError
def generic_visit(self, node): """Drive the visitor.""" for _, value in ast.iter_fields(node): if isinstance(value, list): max_idx = len(value) - 1 for idx, item in enumerate(value): if isinstance(item, ast.AST): if idx < max_idx: ...
def generic_visit(self, node): """Drive the visitor.""" for _, value in ast.iter_fields(node): if isinstance(value, list): max_idx = len(value) - 1 for idx, item in enumerate(value): if isinstance(item, ast.AST): if idx < max_idx: ...
https://github.com/PyCQA/bandit/issues/487
from bandit.core.config import BanditConfig from bandit.core.meta_ast import BanditMetaAst from bandit.core.metrics import Metrics from bandit.core.node_visitor import BanditNodeVisitor from bandit.core.test_set import BanditTestSet from pyflakes.checker import Checker import ast profile = {} bnv = BanditNodeVisitor( ....
AttributeError
def linerange_fix(node): """Try and work around a known Python bug with multi-line strings.""" # deal with multiline strings lineno behavior (Python issue #16806) lines = linerange(node) if hasattr(node, "_bandit_sibling") and hasattr(node._bandit_sibling, "lineno"): start = min(lines) d...
def linerange_fix(node): """Try and work around a known Python bug with multi-line strings.""" # deal with multiline strings lineno behavior (Python issue #16806) lines = linerange(node) if hasattr(node, "sibling") and hasattr(node.sibling, "lineno"): start = min(lines) delta = node.sibl...
https://github.com/PyCQA/bandit/issues/487
from bandit.core.config import BanditConfig from bandit.core.meta_ast import BanditMetaAst from bandit.core.metrics import Metrics from bandit.core.node_visitor import BanditNodeVisitor from bandit.core.test_set import BanditTestSet from pyflakes.checker import Checker import ast profile = {} bnv = BanditNodeVisitor( ....
AttributeError
def concat_string(node, stop=None): """Builds a string from a ast.BinOp chain. This will build a string from a series of ast.Str nodes wrapped in ast.BinOp nodes. Something like "a" + "b" + "c" or "a %s" % val etc. The provided node can be any participant in the BinOp chain. :param node: (ast.Str ...
def concat_string(node, stop=None): """Builds a string from a ast.BinOp chain. This will build a string from a series of ast.Str nodes wrapped in ast.BinOp nodes. Something like "a" + "b" + "c" or "a %s" % val etc. The provided node can be any participant in the BinOp chain. :param node: (ast.Str ...
https://github.com/PyCQA/bandit/issues/487
from bandit.core.config import BanditConfig from bandit.core.meta_ast import BanditMetaAst from bandit.core.metrics import Metrics from bandit.core.node_visitor import BanditNodeVisitor from bandit.core.test_set import BanditTestSet from pyflakes.checker import Checker import ast profile = {} bnv = BanditNodeVisitor( ....
AttributeError
def check_risk(node): description = "Potential XSS on mark_safe function." xss_var = node.args[0] secure = False if isinstance(xss_var, ast.Name): # Check if the var are secure parent = node._bandit_parent while not isinstance(parent, (ast.Module, ast.FunctionDef)): ...
def check_risk(node): description = "Potential XSS on mark_safe function." xss_var = node.args[0] secure = False if isinstance(xss_var, ast.Name): # Check if the var are secure parent = node.parent while not isinstance(parent, (ast.Module, ast.FunctionDef)): parent ...
https://github.com/PyCQA/bandit/issues/487
from bandit.core.config import BanditConfig from bandit.core.meta_ast import BanditMetaAst from bandit.core.metrics import Metrics from bandit.core.node_visitor import BanditNodeVisitor from bandit.core.test_set import BanditTestSet from pyflakes.checker import Checker import ast profile = {} bnv = BanditNodeVisitor( ....
AttributeError
def hardcoded_password_string(context): """**B105: Test for use of hard-coded password strings** The use of hard-coded passwords increases the possibility of password guessing tremendously. This plugin test looks for all string literals and checks the following conditions: - assigned to a variable...
def hardcoded_password_string(context): """**B105: Test for use of hard-coded password strings** The use of hard-coded passwords increases the possibility of password guessing tremendously. This plugin test looks for all string literals and checks the following conditions: - assigned to a variable...
https://github.com/PyCQA/bandit/issues/487
from bandit.core.config import BanditConfig from bandit.core.meta_ast import BanditMetaAst from bandit.core.metrics import Metrics from bandit.core.node_visitor import BanditNodeVisitor from bandit.core.test_set import BanditTestSet from pyflakes.checker import Checker import ast profile = {} bnv = BanditNodeVisitor( ....
AttributeError
def _evaluate_ast(node): wrapper = None statement = "" if isinstance(node._bandit_parent, ast.BinOp): out = utils.concat_string(node, node._bandit_parent) wrapper = out[0]._bandit_parent statement = out[1] elif ( isinstance(node._bandit_parent, ast.Attribute) and...
def _evaluate_ast(node): wrapper = None statement = "" if isinstance(node.parent, ast.BinOp): out = utils.concat_string(node, node.parent) wrapper = out[0].parent statement = out[1] elif isinstance(node.parent, ast.Attribute) and node.parent.attr == "format": statement =...
https://github.com/PyCQA/bandit/issues/487
from bandit.core.config import BanditConfig from bandit.core.meta_ast import BanditMetaAst from bandit.core.metrics import Metrics from bandit.core.node_visitor import BanditNodeVisitor from bandit.core.test_set import BanditTestSet from pyflakes.checker import Checker import ast profile = {} bnv = BanditNodeVisitor( ....
AttributeError
def blacklist(context, config): """Generic blacklist test, B001. This generic blacklist test will be called for any encountered node with defined blacklist data available. This data is loaded via plugins using the 'bandit.blacklists' entry point. Please see the documentation for more details. Each ...
def blacklist(context, config): """Generic blacklist test, B001. This generic blacklist test will be called for any encountered node with defined blacklist data available. This data is loaded via plugins using the 'bandit.blacklists' entry point. Please see the documentation for more details. Each ...
https://github.com/PyCQA/bandit/issues/344
ERROR Bandit internal error running: blacklist on file /home/nighty/workspaces/cegeka/usd_api/api_documentation/views.py at line 125: expected string or bufferTraceback (most recent call last): File "/home/nighty/.virtualenvs/usd_api/local/lib/python2.7/site-packages/bandit/core/tester.py", line 62, in run_tests result...
TypeError
def is_assigned(self, node): assigned = False if self.ignore_nodes: if isinstance(self.ignore_nodes, (list, tuple, object)): if isinstance(node, self.ignore_nodes): return assigned if isinstance(node, ast.Expr): assigned = self.is_assigned(node.value) elif is...
def is_assigned(self, node): assigned = False if self.ignore_nodes: if isinstance(self.ignore_nodes, (list, tuple, object)): if isinstance(node, self.ignore_nodes): return assigned if isinstance(node, ast.Expr): assigned = self.is_assigned(node.value) elif is...
https://github.com/PyCQA/bandit/issues/350
Bandit internal error running: django_mark_safe on file /home/travis/build/PyCQA/bandit/examples/mark_safe_secure.py at line 33: 'Call' object has no attribute 'kwargs'Traceback (most recent call last): File "/home/travis/build/PyCQA/bandit/bandit/core/tester.py", line 64, in run_tests result = test(context) File "/hom...
AttributeError
def evaluate_var(xss_var, parent, until, ignore_nodes=None): secure = False if isinstance(xss_var, ast.Name): if isinstance(parent, ast.FunctionDef): for name in parent.args.args: arg_name = name.id if six.PY2 else name.arg if arg_name == xss_var.id: ...
def evaluate_var(xss_var, parent, until, ignore_nodes=None): secure = False if isinstance(xss_var, ast.Name): if isinstance(parent, ast.FunctionDef): for name in parent.args.args: if name.id == xss_var.id: return False # Params are not secure ana...
https://github.com/PyCQA/bandit/issues/350
Bandit internal error running: django_mark_safe on file /home/travis/build/PyCQA/bandit/examples/mark_safe_secure.py at line 33: 'Call' object has no attribute 'kwargs'Traceback (most recent call last): File "/home/travis/build/PyCQA/bandit/bandit/core/tester.py", line 64, in run_tests result = test(context) File "/hom...
AttributeError
def evaluate_call(call, parent, ignore_nodes=None): secure = False evaluate = False if isinstance(call, ast.Call) and isinstance(call.func, ast.Attribute): if isinstance(call.func.value, ast.Str) and call.func.attr == "format": evaluate = True if call.keywords or (six.PY2 and...
def evaluate_call(call, parent, ignore_nodes=None): secure = False evaluate = False if isinstance(call, ast.Call) and isinstance(call.func, ast.Attribute): if isinstance(call.func.value, ast.Str) and call.func.attr == "format": evaluate = True if call.keywords or call.kwargs:...
https://github.com/PyCQA/bandit/issues/350
Bandit internal error running: django_mark_safe on file /home/travis/build/PyCQA/bandit/examples/mark_safe_secure.py at line 33: 'Call' object has no attribute 'kwargs'Traceback (most recent call last): File "/home/travis/build/PyCQA/bandit/bandit/core/tester.py", line 64, in run_tests result = test(context) File "/hom...
AttributeError
def transform2call(var): if isinstance(var, ast.BinOp): is_mod = isinstance(var.op, ast.Mod) is_left_str = isinstance(var.left, ast.Str) if is_mod and is_left_str: new_call = ast.Call() new_call.args = [] new_call.args = [] if six.PY2: ...
def transform2call(var): if isinstance(var, ast.BinOp): is_mod = isinstance(var.op, ast.Mod) is_left_str = isinstance(var.left, ast.Str) if is_mod and is_left_str: new_call = ast.Call() new_call.args = [] new_call.args = [] new_call.starargs = ...
https://github.com/PyCQA/bandit/issues/350
Bandit internal error running: django_mark_safe on file /home/travis/build/PyCQA/bandit/examples/mark_safe_secure.py at line 33: 'Call' object has no attribute 'kwargs'Traceback (most recent call last): File "/home/travis/build/PyCQA/bandit/bandit/core/tester.py", line 64, in run_tests result = test(context) File "/hom...
AttributeError
def check_risk(node): description = "Potential XSS on mark_safe function." xss_var = node.args[0] secure = False if isinstance(xss_var, ast.Name): # Check if the var are secure parent = node.parent while not isinstance(parent, (ast.Module, ast.FunctionDef)): parent ...
def check_risk(node): description = "Potential XSS on mark_safe function." xss_var = node.args[0] secure = False if isinstance(xss_var, ast.Name): # Check if the var are secure parent = node.parent while not isinstance(parent, (ast.Module, ast.FunctionDef)): parent ...
https://github.com/PyCQA/bandit/issues/350
Bandit internal error running: django_mark_safe on file /home/travis/build/PyCQA/bandit/examples/mark_safe_secure.py at line 33: 'Call' object has no attribute 'kwargs'Traceback (most recent call last): File "/home/travis/build/PyCQA/bandit/bandit/core/tester.py", line 64, in run_tests result = test(context) File "/hom...
AttributeError
def has_shell(context): keywords = context.node.keywords result = False if "shell" in context.call_keywords: for key in keywords: if key.arg == "shell": val = key.value if isinstance(val, ast.Num): result = bool(val.n) e...
def has_shell(context): keywords = context.node.keywords if "shell" in context.call_keywords: for key in keywords: if key.arg == "shell": val = key.value if isinstance(val, ast.Num): return bool(val.n) if isinstance(val, ast...
https://github.com/PyCQA/bandit/issues/350
Bandit internal error running: django_mark_safe on file /home/travis/build/PyCQA/bandit/examples/mark_safe_secure.py at line 33: 'Call' object has no attribute 'kwargs'Traceback (most recent call last): File "/home/travis/build/PyCQA/bandit/bandit/core/tester.py", line 64, in run_tests result = test(context) File "/hom...
AttributeError
def mtsac_metaworld_mt50(ctxt=None, seed=1, use_gpu=False, _gpu=0): """Train MTSAC with MT50 environment. Args: ctxt (garage.experiment.ExperimentContext): The experiment configuration used by LocalRunner to create the snapshotter. seed (int): Used to seed the random number generato...
def mtsac_metaworld_mt50(ctxt=None, seed=1, use_gpu=False, _gpu=0): """Train MTSAC with MT50 environment. Args: ctxt (garage.experiment.ExperimentContext): The experiment configuration used by LocalRunner to create the snapshotter. seed (int): Used to seed the random number generato...
https://github.com/rlworkgroup/garage/issues/1903
2020-08-15 02:07:45 | [mtsac_metaworld_mt50] Setting seed to 1 ^T2020-08-15 02:09:26 | [mtsac_metaworld_mt50] Obtaining samples... Traceback (most recent call last): File "examples/torch/mtsac_metaworld_mt50.py", line 103, in <module> mtsac_metaworld_mt50() File "/home/eholly/venv/lib/python3.5/site-packages/click/core...
ValueError
def step(self, action): """Call step on wrapped env. This method is necessary to suppress a deprecated warning thrown by gym.Wrapper. Args: action (np.ndarray): An action provided by the agent. Returns: np.ndarray: Agent's observation of the current environment float: Amou...
def step(self, action): """Call step on wrapped env. This method is necessary to suppress a deprecated warning thrown by gym.Wrapper. Args: action (np.ndarray): An action provided by the agent. Returns: np.ndarray: Agent's observation of the current environment float: Amou...
https://github.com/rlworkgroup/garage/issues/1797
--------------------------------------- -------------- Sampling [####################################] 100% 2020-07-24 12:28:46 | [trpo_gym_tf_cartpole] epoch #3 | Optimizing policy... 2020-07-24 12:28:46 | [trpo_gym_tf_cartpole] epoch #3 | Computing loss before 2020-07-24 12:28:46 | [trpo_gym_tf_cartpole] epoch #3 ...
ValueError
def step(self, action): """Call step on wrapped env. This method is necessary to suppress a deprecated warning thrown by gym.Wrapper. Args: action (np.ndarray): An action provided by the agent. Returns: np.ndarray: Agent's observation of the current environment float: Amou...
def step(self, action): """Call step on wrapped env. This method is necessary to suppress a deprecated warning thrown by gym.Wrapper. Args: action (np.ndarray): An action provided by the agent. Returns: np.ndarray: Agent's observation of the current environment float: Amou...
https://github.com/rlworkgroup/garage/issues/1797
--------------------------------------- -------------- Sampling [####################################] 100% 2020-07-24 12:28:46 | [trpo_gym_tf_cartpole] epoch #3 | Optimizing policy... 2020-07-24 12:28:46 | [trpo_gym_tf_cartpole] epoch #3 | Computing loss before 2020-07-24 12:28:46 | [trpo_gym_tf_cartpole] epoch #3 ...
ValueError
def _gather_rollout(self, rollout_number, last_observation): assert 0 < self._path_lengths[rollout_number] <= self._max_episode_length env_infos = self._env_infos[rollout_number] agent_infos = self._agent_infos[rollout_number] for k, v in env_infos.items(): env_infos[k] = np.asarray(v) for k...
def _gather_rollout(self, rollout_number, last_observation): assert 0 < self._path_lengths[rollout_number] <= self._max_episode_length traj = TrajectoryBatch( env_spec=self._envs[rollout_number].spec, observations=np.asarray(self._observations[rollout_number]), last_observations=np.asarr...
https://github.com/rlworkgroup/garage/issues/1797
--------------------------------------- -------------- Sampling [####################################] 100% 2020-07-24 12:28:46 | [trpo_gym_tf_cartpole] epoch #3 | Optimizing policy... 2020-07-24 12:28:46 | [trpo_gym_tf_cartpole] epoch #3 | Computing loss before 2020-07-24 12:28:46 | [trpo_gym_tf_cartpole] epoch #3 ...
ValueError
def objective_fun(params): global task_id exp_prefix = params.pop("exp_prefix") exp_name = "{exp}_{pid}_{id}".format(exp=exp_prefix, pid=os.getpid(), id=task_id) max_retries = params.pop("max_retries", 0) + 1 result_timeout = params.pop("result_timeout") run_experiment_kwargs = params.pop("run_e...
def objective_fun(params): global task_id exp_prefix = params.pop("exp_prefix") exp_name = "{exp}_{pid}_{id}".format(exp=exp_prefix, pid=os.getpid(), id=task_id) max_retries = params.pop("max_retries", 0) + 1 result_timeout = params.pop("result_timeout") run_experiment_kwargs = params.pop("run_e...
https://github.com/rlworkgroup/garage/issues/239
Traceback (most recent call last): File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 191, in <module> run_experiment(sys.argv) File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 146, in run_experiment logger.log_parameters_lite(params_log_file, args) File "/Users...
TypeError
def launch_hyperopt_search( task_method, eval_method, param_space, hyperopt_experiment_key, hyperopt_db_host="localhost", hyperopt_db_port=1234, hyperopt_db_name="garage", n_hyperopt_workers=1, hyperopt_max_evals=100, result_timeout=1200, max_retries=0, run_experiment_kwa...
def launch_hyperopt_search( task_method, eval_method, param_space, hyperopt_experiment_key, hyperopt_db_host="localhost", hyperopt_db_port=1234, hyperopt_db_name="garage", n_hyperopt_workers=1, hyperopt_max_evals=100, result_timeout=1200, max_retries=0, run_experiment_kwa...
https://github.com/rlworkgroup/garage/issues/239
Traceback (most recent call last): File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 191, in <module> run_experiment(sys.argv) File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 146, in run_experiment logger.log_parameters_lite(params_log_file, args) File "/Users...
TypeError
def run_experiment( method_call=None, batch_tasks=None, exp_prefix="experiment", exp_name=None, log_dir=None, script="scripts/run_experiment.py", python_command="python", mode="local", dry=False, docker_image=None, aws_config=None, env=None, variant=None, use_tf=F...
def run_experiment( stub_method_call=None, batch_tasks=None, exp_prefix="experiment", exp_name=None, log_dir=None, script="scripts/run_experiment.py", python_command="python", mode="local", dry=False, docker_image=None, aws_config=None, env=None, variant=None, use...
https://github.com/rlworkgroup/garage/issues/239
Traceback (most recent call last): File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 191, in <module> run_experiment(sys.argv) File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 146, in run_experiment logger.log_parameters_lite(params_log_file, args) File "/Users...
TypeError
def concretize(obj): if isinstance(obj, dict): # make sure that there's no hidden caveat ret = dict() for k, v in obj.items(): ret[concretize(k)] = concretize(v) return ret elif isinstance(obj, (list, tuple)): return obj.__class__(list(map(concretize, obj))) ...
def concretize(maybe_stub): if isinstance(maybe_stub, StubMethodCall): obj = concretize(maybe_stub.obj) method = getattr(obj, maybe_stub.method_name) args = concretize(maybe_stub.args) kwargs = concretize(maybe_stub.kwargs) return method(*args, **kwargs) elif isinstance(m...
https://github.com/rlworkgroup/garage/issues/239
Traceback (most recent call last): File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 191, in <module> run_experiment(sys.argv) File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 146, in run_experiment logger.log_parameters_lite(params_log_file, args) File "/Users...
TypeError
def log_parameters_lite(log_file, args): log_params = {} for param_name, param_value in args.__dict__.items(): log_params[param_name] = param_value if args.args_data is not None: log_params["json_args"] = dict() mkdir_p(os.path.dirname(log_file)) with open(log_file, "w") as f: ...
def log_parameters_lite(log_file, args): log_params = {} for param_name, param_value in args.__dict__.items(): log_params[param_name] = param_value if args.args_data is not None: stub_method = pickle.loads(base64.b64decode(args.args_data)) method_args = stub_method.kwargs log...
https://github.com/rlworkgroup/garage/issues/239
Traceback (most recent call last): File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 191, in <module> run_experiment(sys.argv) File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 146, in run_experiment logger.log_parameters_lite(params_log_file, args) File "/Users...
TypeError
def log_variant(log_file, variant_data): mkdir_p(os.path.dirname(log_file)) if hasattr(variant_data, "dump"): variant_data = variant_data.dump() with open(log_file, "w") as f: json.dump(variant_data, f, indent=2, sort_keys=True, cls=MyEncoder)
def log_variant(log_file, variant_data): mkdir_p(os.path.dirname(log_file)) if hasattr(variant_data, "dump"): variant_data = variant_data.dump() variant_json = stub_to_json(variant_data) with open(log_file, "w") as f: json.dump(variant_json, f, indent=2, sort_keys=True, cls=MyEncoder)
https://github.com/rlworkgroup/garage/issues/239
Traceback (most recent call last): File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 191, in <module> run_experiment(sys.argv) File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 146, in run_experiment logger.log_parameters_lite(params_log_file, args) File "/Users...
TypeError
def load_progress(progress_csv_path): print("Reading %s" % progress_csv_path) entries = dict() with open(progress_csv_path, "r") as csvfile: reader = csv.DictReader(csvfile) for row in reader: for k, v in row.items(): if k not in entries: entri...
def load_progress(progress_csv_path): print("Reading %s" % progress_csv_path) entries = dict() with open(progress_csv_path, "r") as csvfile: reader = csv.DictReader(csvfile) for row in reader: for k, v in row.items(): if k not in entries: entri...
https://github.com/rlworkgroup/garage/issues/239
Traceback (most recent call last): File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 191, in <module> run_experiment(sys.argv) File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 146, in run_experiment logger.log_parameters_lite(params_log_file, args) File "/Users...
TypeError
def extract_distinct_params( exps_data, excluded_params=("exp_name", "seed", "log_dir"), length=1 ): # all_pairs = unique(flatten([d.flat_params.items() for d in exps_data])) # if logger: # logger("(Excluding {excluded})".format( # excluded=', '.join(excluded_params))) # def cmp(x,y): ...
def extract_distinct_params( exps_data, excluded_params=("exp_name", "seed", "log_dir"), l=1 ): # all_pairs = unique(flatten([d.flat_params.items() for d in exps_data])) # if logger: # logger("(Excluding {excluded})".format(excluded=', '.join(excluded_params))) # def cmp(x,y): # if x < y...
https://github.com/rlworkgroup/garage/issues/239
Traceback (most recent call last): File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 191, in <module> run_experiment(sys.argv) File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 146, in run_experiment logger.log_parameters_lite(params_log_file, args) File "/Users...
TypeError
def run_experiment(argv): default_log_dir = config.LOG_DIR now = datetime.datetime.now(dateutil.tz.tzlocal()) # avoid name clashes when running distributed jobs rand_id = str(uuid.uuid4())[:5] timestamp = now.strftime("%Y_%m_%d_%H_%M_%S_%f_%Z") default_exp_name = "experiment_%s_%s" % (timestam...
def run_experiment(argv): default_log_dir = config.LOG_DIR now = datetime.datetime.now(dateutil.tz.tzlocal()) # avoid name clashes when running distributed jobs rand_id = str(uuid.uuid4())[:5] timestamp = now.strftime("%Y_%m_%d_%H_%M_%S_%f_%Z") default_exp_name = "experiment_%s_%s" % (timestam...
https://github.com/rlworkgroup/garage/issues/239
Traceback (most recent call last): File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 191, in <module> run_experiment(sys.argv) File "/Users/jonathon/Documents/garage/garage/scripts/run_experiment.py", line 146, in run_experiment logger.log_parameters_lite(params_log_file, args) File "/Users...
TypeError
def sync_list_repositories( executable_path, python_file, module_name, working_directory, attribute ): from dagster.grpc.types import ListRepositoriesResponse, ListRepositoriesInput result = check.inst( execute_unary_api_cli_command( executable_path, "list_repositories", ...
def sync_list_repositories( executable_path, python_file, module_name, working_directory, attribute ): from dagster.grpc.types import ListRepositoriesResponse, ListRepositoriesInput return check.inst( execute_unary_api_cli_command( executable_path, "list_repositories", ...
https://github.com/dagster-io/dagster/issues/2772
Traceback (most recent call last): File "/Users/sryza/dagster/python_modules/dagster/dagster/api/utils.py", line 11, in execute_command_in_subprocess subprocess.check_output(parts, stderr=subprocess.STDOUT) File "/Users/sryza/.pyenv/versions/3.6.8/lib/python3.6/subprocess.py", line 356, in check_output **kwargs).stdout...
subprocess.CalledProcessError
def sync_list_repositories_grpc(api_client): from dagster.grpc.client import DagsterGrpcClient from dagster.grpc.types import ListRepositoriesResponse check.inst_param(api_client, "api_client", DagsterGrpcClient) result = check.inst( api_client.list_repositories(), (ListRepositoriesResp...
def sync_list_repositories_grpc(api_client): from dagster.grpc.client import DagsterGrpcClient from dagster.grpc.types import ListRepositoriesResponse check.inst_param(api_client, "api_client", DagsterGrpcClient) return check.inst(api_client.list_repositories(), ListRepositoriesResponse)
https://github.com/dagster-io/dagster/issues/2772
Traceback (most recent call last): File "/Users/sryza/dagster/python_modules/dagster/dagster/api/utils.py", line 11, in execute_command_in_subprocess subprocess.check_output(parts, stderr=subprocess.STDOUT) File "/Users/sryza/.pyenv/versions/3.6.8/lib/python3.6/subprocess.py", line 356, in check_output **kwargs).stdout...
subprocess.CalledProcessError
def list_repositories_command(args): check.inst_param(args, "args", ListRepositoriesInput) python_file, module_name, working_directory, attribute = ( args.python_file, args.module_name, args.working_directory, args.attribute, ) try: loadable_targets = get_loadable...
def list_repositories_command(args): check.inst_param(args, "args", ListRepositoriesInput) python_file, module_name, working_directory, attribute = ( args.python_file, args.module_name, args.working_directory, args.attribute, ) loadable_targets = get_loadable_targets( ...
https://github.com/dagster-io/dagster/issues/2772
Traceback (most recent call last): File "/Users/sryza/dagster/python_modules/dagster/dagster/api/utils.py", line 11, in execute_command_in_subprocess subprocess.check_output(parts, stderr=subprocess.STDOUT) File "/Users/sryza/.pyenv/versions/3.6.8/lib/python3.6/subprocess.py", line 356, in check_output **kwargs).stdout...
subprocess.CalledProcessError
def list_repositories(self): res = self._query("ListRepositories", api_pb2.ListRepositoriesRequest) return deserialize_json_to_dagster_namedtuple( res.serialized_list_repositories_response_or_error )
def list_repositories(self): res = self._query("ListRepositories", api_pb2.ListRepositoriesRequest) return deserialize_json_to_dagster_namedtuple( res.serialized_list_repositories_response )
https://github.com/dagster-io/dagster/issues/2772
Traceback (most recent call last): File "/Users/sryza/dagster/python_modules/dagster/dagster/api/utils.py", line 11, in execute_command_in_subprocess subprocess.check_output(parts, stderr=subprocess.STDOUT) File "/Users/sryza/.pyenv/versions/3.6.8/lib/python3.6/subprocess.py", line 356, in check_output **kwargs).stdout...
subprocess.CalledProcessError
def __init__( self, shutdown_server_event, loadable_target_origin=None, heartbeat=False, heartbeat_timeout=30, ): super(DagsterApiServer, self).__init__() check.bool_param(heartbeat, "heartbeat") check.int_param(heartbeat_timeout, "heartbeat_timeout") check.invariant(heartbeat_timeo...
def __init__( self, shutdown_server_event, loadable_target_origin=None, heartbeat=False, heartbeat_timeout=30, ): super(DagsterApiServer, self).__init__() check.bool_param(heartbeat, "heartbeat") check.int_param(heartbeat_timeout, "heartbeat_timeout") check.invariant(heartbeat_timeo...
https://github.com/dagster-io/dagster/issues/2772
Traceback (most recent call last): File "/Users/sryza/dagster/python_modules/dagster/dagster/api/utils.py", line 11, in execute_command_in_subprocess subprocess.check_output(parts, stderr=subprocess.STDOUT) File "/Users/sryza/.pyenv/versions/3.6.8/lib/python3.6/subprocess.py", line 356, in check_output **kwargs).stdout...
subprocess.CalledProcessError
def _recon_repository_from_origin(self, repository_origin): check.inst_param( repository_origin, "repository_origin", RepositoryOrigin, ) if isinstance(repository_origin, RepositoryGrpcServerOrigin): return ReconstructableRepository( self._repository_symbols_and_...
def _recon_repository_from_origin(self, repository_origin): check.inst_param( repository_origin, "repository_origin", RepositoryOrigin, ) if isinstance(repository_origin, RepositoryGrpcServerOrigin): return ReconstructableRepository( self._repository_code_pointer...
https://github.com/dagster-io/dagster/issues/2772
Traceback (most recent call last): File "/Users/sryza/dagster/python_modules/dagster/dagster/api/utils.py", line 11, in execute_command_in_subprocess subprocess.check_output(parts, stderr=subprocess.STDOUT) File "/Users/sryza/.pyenv/versions/3.6.8/lib/python3.6/subprocess.py", line 356, in check_output **kwargs).stdout...
subprocess.CalledProcessError
def ListRepositories(self, request, _context): try: response = ListRepositoriesResponse( self._repository_symbols_and_code_pointers.loadable_repository_symbols, executable_path=self._loadable_target_origin.executable_path if self._loadable_target_origin else N...
def ListRepositories(self, request, _context): return api_pb2.ListRepositoriesReply( serialized_list_repositories_response=serialize_dagster_namedtuple( ListRepositoriesResponse( self._loadable_repository_symbols, executable_path=self._loadable_target_origin.execu...
https://github.com/dagster-io/dagster/issues/2772
Traceback (most recent call last): File "/Users/sryza/dagster/python_modules/dagster/dagster/api/utils.py", line 11, in execute_command_in_subprocess subprocess.check_output(parts, stderr=subprocess.STDOUT) File "/Users/sryza/.pyenv/versions/3.6.8/lib/python3.6/subprocess.py", line 356, in check_output **kwargs).stdout...
subprocess.CalledProcessError
def _evaluate_composite_solid_config(context): """Evaluates config for a composite solid and returns CompositeSolidEvaluationResult""" # Support config mapping override functions if not is_solid_container_config(context.config_type): return EvaluateValueResult.empty() handle = context.config_ty...
def _evaluate_composite_solid_config(context): """Evaluates config for a composite solid and returns CompositeSolidEvaluationResult""" # Support config mapping override functions if not is_solid_container_config(context.config_type): return EvaluateValueResult.empty() handle = context.config_ty...
https://github.com/dagster-io/dagster/issues/1608
Exception occurred during execution of user config mapping function <lambda> defined by solid prefix_id from definition prefix_id at path root:solids:prefix_id: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/dagster/core/types/evaluator/evaluation.py", line 252, in _evaluate_composite_s...
KeyError
def generate_pbx_build_file(self): self.ofile.write("\n/* Begin PBXBuildFile section */\n") templ = '%s /* %s */ = { isa = PBXBuildFile; fileRef = %s /* %s */; settings = { COMPILER_FLAGS = "%s"; }; };\n' otempl = "%s /* %s */ = { isa = PBXBuildFile; fileRef = %s /* %s */;};\n" for t in self.build.targ...
def generate_pbx_build_file(self): self.ofile.write("\n/* Begin PBXBuildFile section */\n") templ = '%s /* %s */ = { isa = PBXBuildFile; fileRef = %s /* %s */; settings = { COMPILER_FLAGS = "%s"; }; };\n' otempl = "%s /* %s */ = { isa = PBXBuildFile; fileRef = %s /* %s */;};\n" for t in self.build.targ...
https://github.com/mesonbuild/meson/issues/589
Traceback (most recent call last): File "/usr/local/Cellar/meson/0.31.0/lib/python3.5/site-packages/mesonbuild/mesonmain.py", line 254, in run app.generate() File "/usr/local/Cellar/meson/0.31.0/lib/python3.5/site-packages/mesonbuild/mesonmain.py", line 158, in generate g.generate(intr) File "/usr/local/Cellar/meson/0....
KeyError
def __init__( self, name: str, project: str, suite: str, fname: T.List[str], is_cross_built: bool, exe_wrapper: T.Optional[dependencies.ExternalProgram], needs_exe_wrapper: bool, is_parallel: bool, cmd_args: T.List[str], env: build.EnvironmentVariables, should_fail: bool,...
def __init__( self, name: str, project: str, suite: str, fname: T.List[str], is_cross_built: bool, exe_wrapper: T.Optional[dependencies.ExternalProgram], needs_exe_wrapper: bool, is_parallel: bool, cmd_args: T.List[str], env: build.EnvironmentVariables, should_fail: bool,...
https://github.com/mesonbuild/meson/issues/7613
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/mesonbuild/mesonmain.py", line 131, in run return options.run_func(options) File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 1220, in run return th.doit() File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 975, in ...
AttributeError
def __init__(self, old_version: str, current_version: str) -> None: super().__init__( "Build directory has been generated with Meson version {}, " "which is incompatible with the current version {}.".format( old_version, current_version ) ) self.old_version = old_version ...
def __init__(self, old_version: str, current_version: str) -> None: super().__init__( "Build directory has been generated with Meson version {}, " "which is incompatible with current version {}.".format( old_version, current_version ) ) self.old_version = old_version ...
https://github.com/mesonbuild/meson/issues/7613
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/mesonbuild/mesonmain.py", line 131, in run return options.run_func(options) File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 1220, in run return th.doit() File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 975, in ...
AttributeError
def major_versions_differ(v1: str, v2: str) -> bool: return v1.split(".")[0:2] != v2.split(".")[0:2]
def major_versions_differ(v1, v2): return v1.split(".")[0:2] != v2.split(".")[0:2]
https://github.com/mesonbuild/meson/issues/7613
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/mesonbuild/mesonmain.py", line 131, in run return options.run_func(options) File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 1220, in run return th.doit() File "/usr/lib/python3.8/site-packages/mesonbuild/mtest.py", line 975, in ...
AttributeError
def configure(self, extra_cmake_options: T.List[str]) -> None: for_machine = MachineChoice.HOST # TODO make parameter # Find CMake cmake_exe = CMakeExecutor(self.env, ">=3.7", for_machine) if not cmake_exe.found(): raise CMakeException("Unable to find CMake") self.trace = CMakeTraceParser(c...
def configure(self, extra_cmake_options: T.List[str]) -> None: for_machine = MachineChoice.HOST # TODO make parameter # Find CMake cmake_exe = CMakeExecutor(self.env, ">=3.7", for_machine) if not cmake_exe.found(): raise CMakeException("Unable to find CMake") self.trace = CMakeTraceParser(c...
https://github.com/mesonbuild/meson/issues/6801
C:\Users\icherepa\Desktop\bgpscanner> meson --buildtype=release .. The Meson build system Version: 0.53.2 Source dir: C:\Users\icherepa\Desktop\bgpscanner Build dir: C:\Users\icherepa\Desktop Build type: native build Project name: bgpscanner Project version: 2.31 C compiler for the host machine: gcc (gcc 6.3.0 "gcc (Mi...
FileNotFoundError
def pretend_to_be_meson(self) -> CodeBlockNode: if not self.project_name: raise CMakeException("CMakeInterpreter was not analysed") def token(tid: str = "string", val="") -> Token: return Token(tid, self.subdir, 0, 0, 0, None, val) def string(value: str) -> StringNode: return Strin...
def pretend_to_be_meson(self) -> CodeBlockNode: if not self.project_name: raise CMakeException("CMakeInterpreter was not analysed") def token(tid: str = "string", val="") -> Token: return Token(tid, self.subdir, 0, 0, 0, None, val) def string(value: str) -> StringNode: return Strin...
https://github.com/mesonbuild/meson/issues/6801
C:\Users\icherepa\Desktop\bgpscanner> meson --buildtype=release .. The Meson build system Version: 0.53.2 Source dir: C:\Users\icherepa\Desktop\bgpscanner Build dir: C:\Users\icherepa\Desktop Build type: native build Project name: bgpscanner Project version: 2.31 C compiler for the host machine: gcc (gcc 6.3.0 "gcc (Mi...
FileNotFoundError
def _setup_cmake_dir(self, cmake_file: str) -> str: # Setup the CMake build environment and return the "build" directory build_dir = self._get_build_dir() # Insert language parameters into the CMakeLists.txt and write new CMakeLists.txt # Per the warning in pkg_resources, this is *not* a path and os.pa...
def _setup_cmake_dir(self, cmake_file: str) -> str: # Setup the CMake build environment and return the "build" directory build_dir = self._get_build_dir() # Insert language parameters into the CMakeLists.txt and write new CMakeLists.txt src_cmake = Path(__file__).parent / "data" / cmake_file cmake_...
https://github.com/mesonbuild/meson/issues/6801
C:\Users\icherepa\Desktop\bgpscanner> meson --buildtype=release .. The Meson build system Version: 0.53.2 Source dir: C:\Users\icherepa\Desktop\bgpscanner Build dir: C:\Users\icherepa\Desktop Build type: native build Project name: bgpscanner Project version: 2.31 C compiler for the host machine: gcc (gcc 6.3.0 "gcc (Mi...
FileNotFoundError
def sanitize_dir_option_value(self, prefix: str, option: str, value: Any) -> Any: """ If the option is an installation directory option and the value is an absolute path, check that it resides within prefix and return the value as a path relative to the prefix. This way everyone can do f.ex, get_op...
def sanitize_dir_option_value(self, prefix, option, value): """ If the option is an installation directory option and the value is an absolute path, check that it resides within prefix and return the value as a path relative to the prefix. This way everyone can do f.ex, get_option('libdir') and be ...
https://github.com/mesonbuild/meson/issues/6395
$ meson setup build --libdir=E:/Documents/Coding/C/lib The Meson build system Version: 0.52.1 Source dir: E:\Documents\Coding\C\meson_test Build dir: E:\Documents\Coding\C\meson_test\build Build type: native build Traceback (most recent call last): File "C:\Users\<user>\AppData\Roaming\Python\Python38\site-packages\mes...
ValueError
def generate_single_compile( self, target, outfile, src, is_generated=False, header_deps=[], order_deps=[] ): """ Compiles C/C++, ObjC/ObjC++, Fortran, and D sources """ if isinstance(src, str) and src.endswith(".h"): raise AssertionError("BUG: sources should not contain headers {!r}".format...
def generate_single_compile( self, target, outfile, src, is_generated=False, header_deps=[], order_deps=[] ): """ Compiles C/C++, ObjC/ObjC++, Fortran, and D sources """ if isinstance(src, str) and src.endswith(".h"): raise AssertionError("BUG: sources should not contain headers {!r}".format...
https://github.com/mesonbuild/meson/issues/1348
The Meson build system Version: 0.38.0 Source dir: /home/Adama-docs/Adam/MyDocs/praca/IMGW/dev/meson_bug Build dir: /home/Adama-docs/Adam/MyDocs/praca/IMGW/dev/meson_bug/build Build type: native build Project name: simple fortran Native fortran compiler: gfortran (gcc 5.4.1) Build machine cpu family: x86_64 Build machi...
FileNotFoundError
def scan_fortran_module_outputs(self, target): compiler = None for lang, c in self.build.compilers.items(): if lang == "fortran": compiler = c break if compiler is None: self.fortran_deps[target.get_basename()] = {} return modre = re.compile(r"\s*module\s+...
def scan_fortran_module_outputs(self, target): compiler = None for lang, c in self.build.compilers.items(): if lang == "fortran": compiler = c break if compiler is None: self.fortran_deps[target.get_basename()] = {} return modre = re.compile(r"\s*module\s+...
https://github.com/mesonbuild/meson/issues/1348
The Meson build system Version: 0.38.0 Source dir: /home/Adama-docs/Adam/MyDocs/praca/IMGW/dev/meson_bug Build dir: /home/Adama-docs/Adam/MyDocs/praca/IMGW/dev/meson_bug/build Build type: native build Project name: simple fortran Native fortran compiler: gfortran (gcc 5.4.1) Build machine cpu family: x86_64 Build machi...
FileNotFoundError
def __init__(self, subdir, lineno, colno, condition, trueblock, falseblock): self.subdir = subdir self.lineno = lineno self.colno = colno self.condition = condition self.trueblock = trueblock self.falseblock = falseblock
def __init__(self, lineno, colno, condition, trueblock, falseblock): self.lineno = lineno self.colno = colno self.condition = condition self.trueblock = trueblock self.falseblock = falseblock
https://github.com/mesonbuild/meson/issues/2404
Traceback (most recent call last): File "/home/adrian/.local/lib/python3.5/site-packages/mesonbuild/mesonmain.py", line 353, in run app.generate() File "/home/adrian/.local/lib/python3.5/site-packages/mesonbuild/mesonmain.py", line 148, in generate self._generate(env) File "/home/adrian/.local/lib/python3.5/site-packag...
AttributeError