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 __init__(self, ds, *args, **kwargs): self._vector_fields = dict(self._vector_fields) self._fields = ds._field_spec self._ptypes = ds._ptype_spec self.data_files = set([]) gformat, endianswap = ds._header.gadget_format # gadget format 1 original, 2 with block name self._format = gformat ...
def __init__(self, ds, *args, **kwargs): self._vector_fields = dict(self._vector_fields) self._fields = ds._field_spec self._ptypes = ds._ptype_spec self.data_files = set([]) gformat = _get_gadget_format(ds.parameter_filename, ds._header_size) # gadget format 1 original, 2 with block name se...
https://github.com/yt-project/yt/issues/1846
Traceback (most recent call last): File "./plot_solution.py", line 519, in <module> pf.add_field(("gas", "density_squared"), function=_density_squared, units="g**2/cm**6") File "/usr/local/lib/python2.7/dist-packages/yt/data_objects/static_output.py", line 1191, in add_field self.index File "/usr/local/lib/python2.7/di...
TypeError
def _initialize_index(self, data_file, regions): DLE = data_file.ds.domain_left_edge DRE = data_file.ds.domain_right_edge self._float_type = data_file.ds._header.float_type if self.index_ptype == "all": count = sum(data_file.total_particles.values()) return self._get_morton_from_position...
def _initialize_index(self, data_file, regions): DLE = data_file.ds.domain_left_edge DRE = data_file.ds.domain_right_edge self._float_type = data_file.ds._validate_header( data_file.filename, data_file.ds._header_size )[1] if self.index_ptype == "all": count = sum(data_file.total_par...
https://github.com/yt-project/yt/issues/1846
Traceback (most recent call last): File "./plot_solution.py", line 519, in <module> pf.add_field(("gas", "density_squared"), function=_density_squared, units="g**2/cm**6") File "/usr/local/lib/python2.7/dist-packages/yt/data_objects/static_output.py", line 1191, in add_field self.index File "/usr/local/lib/python2.7/di...
TypeError
def __init__(self, outputs, indices, fields=None, suppress_logging=False): indices.sort() # Just in case the caller wasn't careful self.field_data = YTFieldData() self.data_series = outputs self.masks = [] self.sorts = [] self.array_indices = [] self.indices = indices self.num_indices =...
def __init__(self, outputs, indices, fields=None, suppress_logging=False): indices.sort() # Just in case the caller wasn't careful self.field_data = YTFieldData() self.data_series = outputs self.masks = [] self.sorts = [] self.array_indices = [] self.indices = indices self.num_indices =...
https://github.com/yt-project/yt/issues/1541
ValueError Traceback (most recent call last) ~/Documents/These/ramses_tests/MC_tracers/test_feedback/plot.py in <module>() 40 dss = yt.DatasetSeries(outputs[:5], **load_kwa) 41 ---> 42 trajs = dss.particle_trajectories(indices) ~/Documents/prog/yt/yt/data_objects/time_series.py i...
ValueError
def _get_particle_type_counts(self): """Reads the active number of particles for every species. Returns ------- dict keys are ptypes values are integer counts of the ptype """ result = {} f = self.dataset._handle bp = self.dataset.base_path pp = self.dataset.particle...
def _get_particle_type_counts(self): """Reads the active number of particles for every species. Returns ------- dict keys are ptypes values are integer counts of the ptype """ result = {} f = self.dataset._handle bp = self.dataset.base_path pp = self.dataset.particle...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def _detect_output_fields(self): """Populates ``self.field_list`` with native fields (mesh and particle) on disk. Each entry is a tuple of two strings. The first element is the on-disk fluid type or particle type. The second element is the name of the field in yt. This string is later used for accessing th...
def _detect_output_fields(self): """Populates ``self.field_list`` with native fields (mesh and particle) on disk. Each entry is a tuple of two strings. The first element is the on-disk fluid type or particle type. The second element is the name of the field in yt. This string is later used for accessing th...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def _count_grids(self): """Sets ``self.num_grids`` to be the total number of grids in the simulation. The number of grids is determined by their respective memory footprint. """ f = self.dataset._handle bp = self.dataset.base_path mp = self.dataset.meshes_path pp = self.dataset.particles_pa...
def _count_grids(self): """Sets ``self.num_grids`` to be the total number of grids in the simulation. The number of grids is determined by their respective memory footprint. """ f = self.dataset._handle bp = self.dataset.base_path mp = self.dataset.meshes_path pp = self.dataset.particles_pa...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def _parse_index(self): """Fills each grid with appropriate properties (extent, dimensions, ...) This calculates the properties of every OpenPMDGrid based on the total number of grids in the simulation. The domain is divided into ``self.num_grids`` (roughly) equally sized chunks along the x-axis. ``gri...
def _parse_index(self): """Fills each grid with appropriate properties (extent, dimensions, ...) This calculates the properties of every OpenPMDGrid based on the total number of grids in the simulation. The domain is divided into ``self.num_grids`` (roughly) equally sized chunks along the x-axis. ``gri...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def __init__( self, filename, dataset_type="openPMD", storage_filename=None, units_override=None, unit_system="mks", **kwargs, ): self._handle = HDF5FileHandler(filename) self.gridsize = kwargs.pop("open_pmd_virtual_gridsize", 10**9) self.standard_version = StrictVersion(self._ha...
def __init__( self, filename, dataset_type="openPMD", storage_filename=None, units_override=None, unit_system="mks", **kwargs, ): self._handle = HDF5FileHandler(filename) self.gridsize = kwargs.pop("open_pmd_virtual_gridsize", 10**9) self._set_paths(self._handle, path.dirname(fil...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def _set_paths(self, handle, path, iteration): """Parses relevant hdf5-paths out of ``handle``. Parameters ---------- handle : h5py.File path : str (absolute) filepath for current hdf5 container """ iterations = [] if iteration is None: iteration = list(handle["/data"].k...
def _set_paths(self, handle, path): """Parses relevant hdf5-paths out of ``handle``. Parameters ---------- handle : h5py.File path : str (absolute) filepath for current hdf5 container """ iterations = [] encoding = handle.attrs["iterationEncoding"].decode() if "groupBased" i...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def _parse_parameter_file(self): """Read in metadata describing the overall data on-disk.""" f = self._handle bp = self.base_path mp = self.meshes_path self.unique_identifier = 0 self.parameters = 0 self.periodicity = np.zeros(3, dtype=np.bool) self.refine_by = 1 self.cosmological_s...
def _parse_parameter_file(self): """Read in metadata describing the overall data on-disk.""" f = self._handle bp = self.base_path mp = self.meshes_path self.unique_identifier = 0 self.parameters = 0 self.periodicity = np.zeros(3, dtype=np.bool) self.refine_by = 1 self.cosmological_s...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def _is_valid(self, *args, **kwargs): """Checks whether the supplied file can be read by this frontend.""" warn_h5py(args[0]) try: with h5.File(args[0], "r") as f: attrs = list(f["/"].attrs.keys()) for i in opmd_required_attributes: if i not in attrs: ...
def _is_valid(self, *args, **kwargs): """Checks whether the supplied file can be read by this frontend.""" warn_h5py(args[0]) try: f = h5.File(args[0], "r") except (IOError, OSError, ImportError): return False requirements = ["openPMD", "basePath", "meshesPath", "particlesPath"] ...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def __init__(self, ds, field_list): f = ds._handle bp = ds.base_path mp = ds.meshes_path pp = ds.particles_path try: fields = f[bp + mp] for fname in fields.keys(): field = fields[fname] if type(field) is h5.Dataset or is_const_component(field): ...
def __init__(self, ds, field_list): f = ds._handle bp = ds.base_path mp = ds.meshes_path pp = ds.particles_path fields = f[bp + mp] for fname in fields.keys(): field = fields[fname] if type(field) is h5.Dataset or is_const_component(field): # Don't consider axes. Thi...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def _read_fluid_selection(self, chunks, selector, fields, size): """Reads given fields masked by a given selection. Parameters ---------- chunks A list of chunks A chunk is a list of grids selector A region (inside your domain) specifying which parts of the field you want to...
def _read_fluid_selection(self, chunks, selector, fields, size): """Reads given fields masked by a given selection. Parameters ---------- chunks A list of chunks A chunk is a list of grids selector A region (inside your domain) specifying which parts of the field you want to...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def parse_unit_dimension(unit_dimension): """Transforms an openPMD unitDimension into a string. Parameters ---------- unit_dimension : array_like integer array of length 7 with one entry for the dimensional component of every SI unit [0] length L, [1] mass M, [2] time T...
def parse_unit_dimension(unit_dimension): """Transforms an openPMD unitDimension into a string. Parameters ---------- unit_dimension : array_like integer array of length 7 with one entry for the dimensional component of every SI unit [0] length L, [1] mass M, [2] time T...
https://github.com/yt-project/yt/issues/1626
--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-606762cc9ee1> in <module>() ----> 1 yt.load('./example-ptcl/hdf5/data00000400.h5') ~/miniconda3/lib/python3.6/site-packages/yt/convenience.py in load(...
KeyError
def assign_particle_data(ds, pdata, bbox): """ Assign particle data to the grids using MatchPointsToGrids. This will overwrite any existing particle data, so be careful! """ for ptype in ds.particle_types_raw: check_fields = [(ptype, "particle_position_x"), (ptype, "particle_position")] ...
def assign_particle_data(ds, pdata): """ Assign particle data to the grids using MatchPointsToGrids. This will overwrite any existing particle data, so be careful! """ for ptype in ds.particle_types_raw: check_fields = [(ptype, "particle_position_x"), (ptype, "particle_position")] i...
https://github.com/yt-project/yt/issues/1600
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-a9ff1fb7d916> in <module>() 8 bbox = np.array([[-1.5, 1.5], [-1.5, 1.5], [-1.5, 1.5]]) 9 ds = yt.load_uniform_grid(data, data["density"][0].shape, leng...
ValueError
def load_uniform_grid( data, domain_dimensions, length_unit=None, bbox=None, nprocs=1, sim_time=0.0, mass_unit=None, time_unit=None, velocity_unit=None, magnetic_unit=None, periodicity=(True, True, True), geometry="cartesian", unit_system="cgs", ): r"""Load a unif...
def load_uniform_grid( data, domain_dimensions, length_unit=None, bbox=None, nprocs=1, sim_time=0.0, mass_unit=None, time_unit=None, velocity_unit=None, magnetic_unit=None, periodicity=(True, True, True), geometry="cartesian", unit_system="cgs", ): r"""Load a unif...
https://github.com/yt-project/yt/issues/1600
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-a9ff1fb7d916> in <module>() 8 bbox = np.array([[-1.5, 1.5], [-1.5, 1.5], [-1.5, 1.5]]) 9 ds = yt.load_uniform_grid(data, data["density"][0].shape, leng...
ValueError
def refine_amr(base_ds, refinement_criteria, fluid_operators, max_level, callback=None): r"""Given a base dataset, repeatedly apply refinement criteria and fluid operators until a maximum level is reached. Parameters ---------- base_ds : ~yt.data_objects.static_output.Dataset This is any st...
def refine_amr(base_ds, refinement_criteria, fluid_operators, max_level, callback=None): r"""Given a base dataset, repeatedly apply refinement criteria and fluid operators until a maximum level is reached. Parameters ---------- base_ds : ~yt.data_objects.static_output.Dataset This is any st...
https://github.com/yt-project/yt/issues/1600
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-2-a9ff1fb7d916> in <module>() 8 bbox = np.array([[-1.5, 1.5], [-1.5, 1.5], [-1.5, 1.5]]) 9 ds = yt.load_uniform_grid(data, data["density"][0].shape, leng...
ValueError
def _switch_ds(self, new_ds, data_source=None): old_object = self.data_source name = old_object._type_name kwargs = dict((n, getattr(old_object, n)) for n in old_object._con_args) kwargs["center"] = getattr(old_object, "center", None) if data_source is not None: if name != "proj": ...
def _switch_ds(self, new_ds, data_source=None): old_object = self.data_source name = old_object._type_name kwargs = dict((n, getattr(old_object, n)) for n in old_object._con_args) kwargs["center"] = getattr(old_object, "center", None) if data_source is not None: if name != "proj": ...
https://github.com/yt-project/yt/issues/1582
Traceback (most recent call last): File "test.py", line 13, in <module> plot._switch_ds(ds2) File "/Users/goldbaum/Documents/yt-git-fixes/yt/visualization/plot_container.py", line 325, in _switch_ds new_object = getattr(new_ds, name)(**kwargs) AttributeError: 'TipsyDataset' object has no attribute 'Particle'
AttributeError
def _parse_enzo2_parameter_file(self, f): for line in (l.strip() for l in f): if (len(line) < 2) or (line[0] == "#"): continue param, vals = (i.strip() for i in line.split("=", 1)) # First we try to decipher what type of value it is. vals = vals.split() # Special ...
def _parse_enzo2_parameter_file(self, f): for line in (l.strip() for l in f): if len(line) < 2: continue param, vals = (i.strip() for i in line.split("=", 1)) # First we try to decipher what type of value it is. vals = vals.split() # Special case approaching. ...
https://github.com/yt-project/yt/issues/1584
ValueError Traceback (most recent call last) <ipython-input-2-d4d26e2f34da> in <module>() ----> 1 ds = yt.load("RD0027/RD0027") /Users/molly/anaconda2/envs/astroconda/lib/python2.7/site-packages/yt/convenience.pyc in load(*args, **kwargs) 84 candidates = find_lowest_subclasses(candida...
ValueError
def __init__(self, id, filename=None, index=None): super(AMRGridPatch, self).__init__(index.dataset, None) self.id = id self._child_mask = self._child_indices = self._child_index_mask = None self.ds = index.dataset self._index = weakref.proxy(index) self.start_index = None self.filename = fi...
def __init__(self, id, filename=None, index=None): self.field_data = YTFieldData() self.field_parameters = {} self.id = id self._child_mask = self._child_indices = self._child_index_mask = None self.ds = index.dataset self._index = weakref.proxy(index) self.start_index = None self.filena...
https://github.com/yt-project/yt/issues/1571
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-16-ea26250246dd> in <module>() ----> 1 grid['particle_velocity_magnitude'] /home/ychen/src/yt-git/yt/data_objects/grid_patch.py in __getitem__(self, key...
TypeError
def __init__(self, base_region, domain, ds, over_refine_factor=1): super(OctreeSubset, self).__init__(ds, None) self._num_zones = 1 << (over_refine_factor) self._oref = over_refine_factor self.domain = domain self.domain_id = domain.domain_id self.ds = domain.ds self._index = self.ds.index ...
def __init__(self, base_region, domain, ds, over_refine_factor=1): self._num_zones = 1 << (over_refine_factor) self._oref = over_refine_factor self.field_data = YTFieldData() self.field_parameters = {} self.domain = domain self.domain_id = domain.domain_id self.ds = domain.ds self._index...
https://github.com/yt-project/yt/issues/1571
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-16-ea26250246dd> in <module>() ----> 1 grid['particle_velocity_magnitude'] /home/ychen/src/yt-git/yt/data_objects/grid_patch.py in __getitem__(self, key...
TypeError
def __init__(self, mesh_id, filename, connectivity_indices, connectivity_coords, index): super(UnstructuredMesh, self).__init__(index.dataset, None) self.filename = filename self.mesh_id = mesh_id # This is where we set up the connectivity information self.connectivity_indices = connectivity_indices...
def __init__(self, mesh_id, filename, connectivity_indices, connectivity_coords, index): self.field_data = YTFieldData() self.filename = filename self.field_parameters = {} self.mesh_id = mesh_id # This is where we set up the connectivity information self.connectivity_indices = connectivity_indi...
https://github.com/yt-project/yt/issues/1571
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-16-ea26250246dd> in <module>() ----> 1 grid['particle_velocity_magnitude'] /home/ychen/src/yt-git/yt/data_objects/grid_patch.py in __getitem__(self, key...
TypeError
def _fill_fields(self, fields): fields = [f for f in fields if f not in self.field_data] if len(fields) == 0: return # It may be faster to adapt fill_region_float to fill multiple fields # instead of looping here for field in fields: dest = np.zeros(self.ActiveDimensions, dtype="floa...
def _fill_fields(self, fields): fields = [f for f in fields if f not in self.field_data] if len(fields) == 0: return assert len(fields) == 1 field = fields[0] dest = np.zeros(self.ActiveDimensions, dtype="float64") for chunk in self._data_source.chunks(fields, "io"): fill_region_...
https://github.com/yt-project/yt/issues/1527
Traceback (most recent call last): File "yt_arbgridtest.py", line 16, in <module> tracerp = galgas['tracerf'] File "/Users/goldbaum/Documents/yt-git-fixes/yt/data_objects/data_containers.py", line 281, in __getitem__ self.get_data(f) File "/Users/goldbaum/Documents/yt-git-fixes/yt/data_objects/construction_data_contain...
AssertionError
def _setup_filtered_type(self, filter): if not filter.available(self.derived_field_list): raise YTIllDefinedParticleFilter( filter, filter.missing(self.derived_field_list) ) fi = self.field_info fd = self.field_dependencies available = False for fn in self.derived_field_l...
def _setup_filtered_type(self, filter): if not filter.available(self.derived_field_list): return False fi = self.field_info fd = self.field_dependencies available = False for fn in self.derived_field_list: if fn[0] == filter.filtered_type: # Now we can add this ...
https://github.com/yt-project/yt/issues/1278
Traceback (most recent call last): File "test.py", line 22, in <module> width=(2000, 'kpc')) File "/Users/goldbaum/Documents/yt-hg/yt/visualization/particle_plots.py", line 399, in ParticlePlot x_field = ad._determine_fields(x_field)[0] File "/Users/goldbaum/Documents/yt-hg/yt/data_objects/data_containers.py", line 108...
yt.utilities.exceptions.YTFieldNotFound
def _oblique_pixelize(self, data_source, field, bounds, size, antialias): indices = np.argsort(data_source["pdx"])[::-1].astype(np.int_) buff = np.zeros((size[1], size[0]), dtype="f8") pixelize_off_axis_cartesian( buff, data_source["x"], data_source["y"], data_source["z"], ...
def _oblique_pixelize(self, data_source, field, bounds, size, antialias): indices = np.argsort(data_source["pdx"])[::-1] buff = np.zeros((size[1], size[0]), dtype="f8") pixelize_off_axis_cartesian( buff, data_source["x"], data_source["y"], data_source["z"], data_sourc...
https://github.com/yt-project/yt/issues/1254
Traceback (most recent call last): File "C:\Miniconda-x64\envs\test\lib\site-packages\nose\loader.py", line 251, in generate for test in g(): File "c:\projects\yt\yt\utilities\lib\tests\test_alt_ray_tracers.py", line 65, in test_cylindrical_ray_trace t, s, rztheta, inds = cylindrical_ray_trace(p1, p2, left_grid, right_...
ValueError
def __call__(self, plot): x0, x1 = plot.xlim y0, y1 = plot.ylim xx0, xx1 = plot._axes.get_xlim() yy0, yy1 = plot._axes.get_ylim() nx = plot.image._A.shape[1] // self.factor ny = plot.image._A.shape[0] // self.factor indices = np.argsort(plot.data["dx"])[::-1].astype(np.int_) pixX = np.z...
def __call__(self, plot): x0, x1 = plot.xlim y0, y1 = plot.ylim xx0, xx1 = plot._axes.get_xlim() yy0, yy1 = plot._axes.get_ylim() nx = plot.image._A.shape[1] // self.factor ny = plot.image._A.shape[0] // self.factor indices = np.argsort(plot.data["dx"])[::-1] pixX = np.zeros((ny, nx), d...
https://github.com/yt-project/yt/issues/1254
Traceback (most recent call last): File "C:\Miniconda-x64\envs\test\lib\site-packages\nose\loader.py", line 251, in generate for test in g(): File "c:\projects\yt\yt\utilities\lib\tests\test_alt_ray_tracers.py", line 65, in test_cylindrical_ray_trace t, s, rztheta, inds = cylindrical_ray_trace(p1, p2, left_grid, right_...
ValueError
def deposit(self, positions, fields=None, method=None, kernel_name="cubic"): cls = getattr(particle_deposit, "deposit_%s" % method, None) if cls is None: raise YTParticleDepositionNotImplemented(method) # We allocate number of zones, not number of octs. Everything inside # this is fortran ordere...
def deposit(self, positions, fields=None, method=None, kernel_name="cubic"): cls = getattr(particle_deposit, "deposit_%s" % method, None) if cls is None: raise YTParticleDepositionNotImplemented(method) # We allocate number of zones, not number of octs op = cls(self.ActiveDimensions, kernel_name...
https://github.com/yt-project/yt/issues/1379
yt : [INFO ] 2017-05-08 14:18:25,422 integer runtime parameter checkpointfilenumber overwrites a simulation scalar of the same name yt : [INFO ] 2017-05-08 14:18:25,422 integer runtime parameter particlefilenumber overwrites a simulation scalar of the same name yt : [INFO ] 2017-05-08 14:18:25,422 integer r...
IndexError
def deposit(self, positions, fields=None, method=None, kernel_name="cubic"): # Here we perform our particle deposition. cls = getattr(particle_deposit, "deposit_%s" % method, None) if cls is None: raise YTParticleDepositionNotImplemented(method) # We allocate number of zones, not number of octs....
def deposit(self, positions, fields=None, method=None, kernel_name="cubic"): # Here we perform our particle deposition. cls = getattr(particle_deposit, "deposit_%s" % method, None) if cls is None: raise YTParticleDepositionNotImplemented(method) # We allocate number of zones, not number of octs ...
https://github.com/yt-project/yt/issues/1379
yt : [INFO ] 2017-05-08 14:18:25,422 integer runtime parameter checkpointfilenumber overwrites a simulation scalar of the same name yt : [INFO ] 2017-05-08 14:18:25,422 integer runtime parameter particlefilenumber overwrites a simulation scalar of the same name yt : [INFO ] 2017-05-08 14:18:25,422 integer r...
IndexError
def get_vertex_centered_data(self, fields, smoothed=True, no_ghost=False): _old_api = isinstance(fields, (string_types, tuple)) if _old_api: message = ( "get_vertex_centered_data() requires list of fields, rather than " "a single field as an argument." ) warnings....
def get_vertex_centered_data(self, fields, smoothed=True, no_ghost=False): _old_api = isinstance(fields, (string_types, tuple)) if _old_api: message = ( "get_vertex_centered_data() requires list of fields, rather than " "a single field as an argument." ) warnings....
https://github.com/yt-project/yt/issues/1368
Traceback (most recent call last): File "test.py", line 9, in <module> print(sur['x'][0]) File "/Users/goldbaum/Documents/yt-git/yt/data_objects/data_containers.py", line 281, in __getitem__ self.get_data(f) File "/Users/goldbaum/Documents/yt-git/yt/data_objects/construction_data_containers.py", line 1144, in get_data ...
yt.utilities.exceptions.YTUfuncUnitError
def _localize_check(self, fn): if fn is None: return None # If the file exists, use it. If not, set it to None. root_dir = os.path.dirname(self.output_dir) full_fn = os.path.join(root_dir, fn) if os.path.exists(full_fn): return full_fn return None
def _localize_check(self, fn): # If the file exists, use it. If not, set it to None. root_dir = os.path.dirname(self.output_dir) full_fn = os.path.join(root_dir, fn) if os.path.exists(full_fn): return full_fn return None
https://github.com/yt-project/yt/issues/1338
Traceback (most recent call last): File "get_plot.py", line 20, in <module> ds=yt.load(file_name) File "xxx/python2.7/site-packages/yt/convenience.py", line 86, in load return candidates[0](*args, **kwargs) File "xxx/python2.7/site-packages/yt/frontends/boxlib/data_structures.py", line 392, in __init__ self.cparam_file...
TypeError
def __call__(self, plot): from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar # Callback only works for plots with axis ratios of 1 xsize = plot.xlim[1] - plot.xlim[0] # Setting pos overrides corner argument if self.pos is None: if self.corner == "upper_left": ...
def __call__(self, plot): from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar # Callback only works for plots with axis ratios of 1 xsize = plot.xlim[1] - plot.xlim[0] if plot.aspect != 1.0: raise NotImplementedError( "Scale callback has only been implemented for pl...
https://github.com/yt-project/yt/issues/1337
Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/yt/visualization/plot_window.py", line 1007, in run_callbacks callback(cbw) File "/usr/local/lib/python3.5/site-packages/yt/visualization/plot_modifications.py", line 54, in _check_geometry return func(self, plot) File "/usr/local/lib/pytho...
AttributeError
def data(self): """ Return a data container configured like the original used to create this dataset. """ if self._data_obj is None: # Some data containers can't be recontructed in the same way # since this is now particle-like data. data_type = self.parameters.get("data_typ...
def data(self): """ Return a data container configured like the original used to create this dataset. """ if self._data_obj is None: # Some data containers can't be recontructed in the same way # since this is now particle-like data. data_type = self.parameters.get("data_typ...
https://github.com/yt-project/yt/issues/1330
#!python ----------------------------------------------------------------- yt : [INFO ] 2017-03-03 15:06:16,097 Calculating time from 1.000e+00 to be 4.376e+17 seconds yt : [INFO ] 2017-03-03 15:06:16,098 Assuming length units are in kpc/h (comoving) yt : [INFO ] 2017-03-03 15:06:16,127 Parameters: current...
TypeError
def _yt_array_hdf5_attr(fh, attr, val): r"""Save a YTArray or YTQuantity as an hdf5 attribute. Save an hdf5 attribute. If it has units, save an additional attribute with the units. Parameters ---------- fh : an open hdf5 file, group, or dataset The hdf5 file, group, or dataset to whic...
def _yt_array_hdf5_attr(fh, attr, val): r"""Save a YTArray or YTQuantity as an hdf5 attribute. Save an hdf5 attribute. If it has units, save an additional attribute with the units. Parameters ---------- fh : an open hdf5 file, group, or dataset The hdf5 file, group, or dataset to whic...
https://github.com/yt-project/yt/issues/1330
#!python ----------------------------------------------------------------- yt : [INFO ] 2017-03-03 15:06:16,097 Calculating time from 1.000e+00 to be 4.376e+17 seconds yt : [INFO ] 2017-03-03 15:06:16,098 Assuming length units are in kpc/h (comoving) yt : [INFO ] 2017-03-03 15:06:16,127 Parameters: current...
TypeError
def add_deposited_particle_field( self, deposit_field, method, kernel_name="cubic", weight_field="particle_mass" ): """Add a new deposited particle field Creates a new deposited field based on the particle *deposit_field*. Parameters ---------- deposit_field : tuple The field name tupl...
def add_deposited_particle_field( self, deposit_field, method, kernel_name="cubic", weight_field="particle_mass" ): """Add a new deposited particle field Creates a new deposited field based on the particle *deposit_field*. Parameters ---------- deposit_field : tuple The field name tupl...
https://github.com/yt-project/yt/issues/1319
jam:scratch desika$ python vel_proj_idealized.py yt : [INFO ] 2017-02-07 11:14:47,621 Omega Lambda is 0.0, so we are turning off Cosmology. yt : [INFO ] 2017-02-07 11:14:47,630 Parameters: current_time = 0.25 yt : [INFO ] 2017-02-07 11:14:47,630 Parameters: domain_dimensions = [2 2 2] y...
ValueError
def _deposit_field(field, data): """ Create a grid field for particle quantities using given method. """ pos = data[ptype, "particle_position"] fields = [data[ptype, deposit_field]] if method == "weighted_mean": fields.append(data[ptype, weight_field]) fields = [np.ascontiguousarray(...
def _deposit_field(field, data): """ Create a grid field for particle quantities using given method. """ pos = data[ptype, "particle_position"] if method == "weighted_mean": d = data.ds.arr( data.deposit( pos, [data[ptype, deposit_field], data[ptyp...
https://github.com/yt-project/yt/issues/1319
jam:scratch desika$ python vel_proj_idealized.py yt : [INFO ] 2017-02-07 11:14:47,621 Omega Lambda is 0.0, so we are turning off Cosmology. yt : [INFO ] 2017-02-07 11:14:47,630 Parameters: current_time = 0.25 yt : [INFO ] 2017-02-07 11:14:47,630 Parameters: domain_dimensions = [2 2 2] y...
ValueError
def add_deposited_particle_field( self, deposit_field, method, kernel_name="cubic", weight_field="particle_mass" ): """Add a new deposited particle field Creates a new deposited field based on the particle *deposit_field*. Parameters ---------- deposit_field : tuple The field name tupl...
def add_deposited_particle_field( self, deposit_field, method, kernel_name="cubic", weight_field="particle_mass" ): """Add a new deposited particle field Creates a new deposited field based on the particle *deposit_field*. Parameters ---------- deposit_field : tuple The field name tupl...
https://github.com/yt-project/yt/issues/1319
jam:scratch desika$ python vel_proj_idealized.py yt : [INFO ] 2017-02-07 11:14:47,621 Omega Lambda is 0.0, so we are turning off Cosmology. yt : [INFO ] 2017-02-07 11:14:47,630 Parameters: current_time = 0.25 yt : [INFO ] 2017-02-07 11:14:47,630 Parameters: domain_dimensions = [2 2 2] y...
ValueError
def deposit(self, positions, fields=None, method=None, kernel_name="cubic"): r"""Operate on the mesh, in a particle-against-mesh fashion, with exclusively local input. This uses the octree indexing system to call a "deposition" operation (defined in yt/geometry/particle_deposit.pyx) that can take input...
def deposit(self, positions, fields=None, method=None, kernel_name="cubic"): r"""Operate on the mesh, in a particle-against-mesh fashion, with exclusively local input. This uses the octree indexing system to call a "deposition" operation (defined in yt/geometry/particle_deposit.pyx) that can take input...
https://github.com/yt-project/yt/issues/1312
In [1]: run vel_proj yt : [INFO ] 2017-01-17 15:27:33,808 Calculating time from 3.448e-01 to be 1.108e+17 seconds yt : [INFO ] 2017-01-17 15:27:33,808 Assuming length units are in kpc/h (comoving) yt : [INFO ] 2017-01-17 15:27:33,825 Parameters: current_time = 1.10758107325e+17 s yt : [INFO ...
ValueError
def _process_exception(resp, **kwargs): unit = kwargs.get("unit") if unit == 0: err = {"message": "Broadcast message, ignoring errors!!!"} else: if isinstance(resp, ExceptionResponse): err = { "original_function_code": "{} ({})".format( resp.or...
def _process_exception(resp): if isinstance(resp, ExceptionResponse): err = { "original_function_code": "{} ({})".format( resp.original_code, hex(resp.original_code) ), "error_function_code": "{} ({})".format( resp.function_code, hex(resp.f...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def write_coil(self, address, value, **kwargs): """ Write `value` to coil at `address`. :param address: coil offset to write to :param value: bit value to write :param unit: The slave unit this request is targeting :return: """ resp = super(ExtendedRequestSupport, self).write_coil(addre...
def write_coil(self, address, value, **kwargs): """ Write `value` to coil at `address`. :param address: coil offset to write to :param value: bit value to write :param unit: The slave unit this request is targeting :return: """ resp = super(ExtendedRequestSupport, self).write_coil(addre...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def write_coils(self, address, values, **kwargs): """ Write `value` to coil at `address`. :param address: coil offset to write to :param value: list of bit values to write (comma seperated) :param unit: The slave unit this request is targeting :return: """ resp = super(ExtendedRequestSu...
def write_coils(self, address, values, **kwargs): """ Write `value` to coil at `address`. :param address: coil offset to write to :param value: list of bit values to write (comma seperated) :param unit: The slave unit this request is targeting :return: """ resp = super(ExtendedRequestSu...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def write_register(self, address, value, **kwargs): """ Write `value` to register at `address`. :param address: register offset to write to :param value: register value to write :param unit: The slave unit this request is targeting :return: """ resp = super(ExtendedRequestSupport, self)...
def write_register(self, address, value, **kwargs): """ Write `value` to register at `address`. :param address: register offset to write to :param value: register value to write :param unit: The slave unit this request is targeting :return: """ resp = super(ExtendedRequestSupport, self)...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def write_registers(self, address, values, **kwargs): """ Write list of `values` to registers starting at `address`. :param address: register offset to write to :param value: list of register value to write (comma seperated) :param unit: The slave unit this request is targeting :return: """...
def write_registers(self, address, values, **kwargs): """ Write list of `values` to registers starting at `address`. :param address: register offset to write to :param value: list of register value to write (comma seperated) :param unit: The slave unit this request is targeting :return: """...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def main(ctx, verbose, broadcast_support): if verbose: global log import logging format = ( "%(asctime)-15s %(threadName)-15s " "%(levelname)-8s %(module)-15s:%(lineno)-8s %(message)s" ) log = logging.getLogger("pymodbus") logging.basicConfig(...
def main(ctx, verbose): if verbose: global log import logging format = ( "%(asctime)-15s %(threadName)-15s " "%(levelname)-8s %(module)-15s:%(lineno)-8s %(message)s" ) log = logging.getLogger("pymodbus") logging.basicConfig(format=format) ...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def tcp(ctx, host, port, framer): from pymodbus.repl.client import ModbusTcpClient broadcast = ctx.obj.get("broadcast") kwargs = dict(host=host, port=port, broadcast_enable=broadcast) if framer == "rtu": from pymodbus.framer.rtu_framer import ModbusRtuFramer kwargs["framer"] = ModbusRt...
def tcp(ctx, host, port, framer): from pymodbus.repl.client import ModbusTcpClient kwargs = dict(host=host, port=port) if framer == "rtu": from pymodbus.framer.rtu_framer import ModbusRtuFramer kwargs["framer"] = ModbusRtuFramer client = ModbusTcpClient(**kwargs) cli(client)
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def run_serial_forwarder(): # ----------------------------------------------------------------------- # # initialize the datastore(serial client) # Note this would send the requests on the serial client with address = 0 # ----------------------------------------------------------------------- # cli...
def run_serial_forwarder(): # ----------------------------------------------------------------------- # # initialize the datastore(serial client) # ----------------------------------------------------------------------- # client = ModbusClient(method="rtu", port="/dev/ptyp0") store = RemoteSlaveCont...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def async_io_factory(port=None, framer=None, **kwargs): """ Factory to create asyncio based asynchronous serial clients :param port: Serial port :param framer: Modbus Framer :param kwargs: Serial port options :return: asyncio event loop and serial client """ import asyncio from pymo...
def async_io_factory(port=None, framer=None, **kwargs): """ Factory to create asyncio based asynchronous serial clients :param port: Serial port :param framer: Modbus Framer :param kwargs: Serial port options :return: asyncio event loop and serial client """ import asyncio from pymo...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def async_io_factory( host="127.0.0.1", port=Defaults.Port, framer=None, source_address=None, timeout=None, **kwargs, ): """ Factory to create asyncio based asynchronous tcp clients :param host: Host IP address :param port: Port :param framer: Modbus Framer :param source_...
def async_io_factory( host="127.0.0.1", port=Defaults.Port, framer=None, source_address=None, timeout=None, **kwargs, ): """ Factory to create asyncio based asynchronous tcp clients :param host: Host IP address :param port: Port :param framer: Modbus Framer :param source_...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def async_io_factory( host="127.0.0.1", port=Defaults.TLSPort, sslctx=None, server_hostname=None, framer=None, source_address=None, timeout=None, **kwargs, ): """ Factory to create asyncio based asynchronous tls clients :param host: Host IP address :param port: Port :...
def async_io_factory( host="127.0.0.1", port=Defaults.TLSPort, sslctx=None, server_hostname=None, framer=None, source_address=None, timeout=None, **kwargs, ): """ Factory to create asyncio based asynchronous tls clients :param host: Host IP address :param port: Port :...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def async_io_factory( host="127.0.0.1", port=Defaults.Port, framer=None, source_address=None, timeout=None, **kwargs, ): """ Factory to create asyncio based asynchronous udp clients :param host: Host IP address :param port: Port :param framer: Modbus Framer :param source_...
def async_io_factory( host="127.0.0.1", port=Defaults.Port, framer=None, source_address=None, timeout=None, **kwargs, ): """ Factory to create asyncio based asynchronous udp clients :param host: Host IP address :param port: Port :param framer: Modbus Framer :param source_...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def on_receive(self, *args): """ On data recieve call back :param args: data received :return: """ data = args[0] if len(args) > 0 else None if not data: return LOGGER.debug("recv: " + " ".join([hex(byte2int(x)) for x in data])) unit = self.framer.decode_data(data).get("unit...
def on_receive(self, *args): """ On data recieve call back :param args: data received :return: """ data = args[0] if len(args) > 0 else None if not data: return LOGGER.debug("recv: " + " ".join([hex(byte2int(x)) for x in data])) unit = self.framer.decode_data(data).get("uid"...
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def dataReceived(self, data): """ Get response, check for valid message, decode result :param data: The data returned from the server """ unit = self.framer.decode_data(data).get("unit", 0) self.framer.processIncomingPacket(data, self._handleResponse, unit=unit)
def dataReceived(self, data): """ Get response, check for valid message, decode result :param data: The data returned from the server """ unit = self.framer.decode_data(data).get("uid", 0) self.framer.processIncomingPacket(data, self._handleResponse, unit=unit)
https://github.com/riptideio/pymodbus/issues/515
DEBUG transaction :115 Current transaction state - IDLE DEBUG transaction :120 Running transaction 1 DEBUG transaction :219 SEND: 0x1 0x2b 0xe 0x2 0x4 0x71 0x44 DEBUG sync :75 New Transaction state 'SENDING' DEBUG transaction :228 Changing transaction state...
AttributeError
def run_async_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # # The datastores only respond to the addresses that they are initialized to # Therefore, if you...
def run_async_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # # The datastores only respond to the addresses that they are initialized to # Therefore, if you...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def run_callback_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # queue = Queue() devices = read_device_map("device-mapping") block = CallbackDataBlock(de...
def run_callback_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # queue = Queue() devices = read_device_map("device-mapping") block = CallbackDataBlock(de...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def run_custom_db_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # block = CustomDataBlock([0] * 100) store = ModbusSlaveContext(di=block, co=block, hr=block,...
def run_custom_db_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # block = CustomDataBlock([0] * 100) store = ModbusSlaveContext(di=block, co=block, hr=block,...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, address=None, **kwargs): ModbusRequest.__init__(self, **kwargs) self.address = address self.count = 16
def __init__(self, address): ModbusRequest.__init__(self) self.address = address self.count = 16
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, address, **kwargs): """Initializes a new instance :param address: The address to start reading from """ ReadCoilsRequest.__init__(self, address, 16, **kwargs)
def __init__(self, address): """Initializes a new instance :param address: The address to start reading from """ ReadCoilsRequest.__init__(self, address, 16)
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def updating_writer(a): """A worker process that runs every so often and updates live values of the context which resides in an SQLite3 database. It should be noted that there is a race condition for the update. :param arguments: The input arguments to the call """ log.debug("Updating the databa...
def updating_writer(a): """A worker process that runs every so often and updates live values of the context which resides in an SQLite3 database. It should be noted that there is a race condition for the update. :param arguments: The input arguments to the call """ log.debug("Updating the databa...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def run_dbstore_update_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # block = ModbusSequentialDataBlock(0x00, [0] * 0xFF) store = SqlSlaveContext(block) ...
def run_dbstore_update_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # block = ModbusSequentialDataBlock(0x00, [0] * 0xFF) store = SqlSlaveContext(block) ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def run_payload_server(): # ----------------------------------------------------------------------- # # build your payload # ----------------------------------------------------------------------- # builder = BinaryPayloadBuilder(byteorder=Endian.Little, wordorder=Endian.Little) builder.add_string("...
def run_payload_server(): # ----------------------------------------------------------------------- # # build your payload # ----------------------------------------------------------------------- # builder = BinaryPayloadBuilder(byteorder=Endian.Little, wordorder=Endian.Little) builder.add_string("...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def run_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # # The datastores only respond to the addresses that they are initialized to # Therefore, if you initi...
def run_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # # The datastores only respond to the addresses that they are initialized to # Therefore, if you initi...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def run_updating_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # store = ModbusSlaveContext( di=ModbusSequentialDataBlock(0, [17] * 100), co=Mod...
def run_updating_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # store = ModbusSlaveContext( di=ModbusSequentialDataBlock(0, [17] * 100), co=Mod...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def run_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # store = ModbusSlaveContext() context = ModbusServerContext(slaves=store, single=True) # --------...
def run_server(): # ----------------------------------------------------------------------- # # initialize your data store # ----------------------------------------------------------------------- # store = ModbusSlaveContext() context = ModbusServerContext(slaves=store, single=True) # --------...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def execute(self, request=None): """ Executes a transaction :param request: Request to be written on to the bus :return: """ request.transaction_id = self.transaction.getNextTID() def callback(*args): LOGGER.debug("in callback - {}".format(request.transaction_id)) while True...
def execute(self, request=None): """ Executes a transaction :param request: Request to be written on to the bus :return: """ request.transaction_id = self.transaction.getNextTID() def callback(*args): LOGGER.debug("in callback - {}".format(request.transaction_id)) while True...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def callback(*args): LOGGER.debug("in callback - {}".format(request.transaction_id)) while True: waiting = self.stream.connection.in_waiting if waiting: data = self.stream.connection.read(waiting) LOGGER.debug("recv: " + " ".join([hex(byte2int(x)) for x in data])) ...
def callback(*args): LOGGER.debug("in callback - {}".format(request.transaction_id)) while True: waiting = self.stream.connection.in_waiting if waiting: data = self.stream.connection.read(waiting) LOGGER.debug("recv: " + " ".join([hex(byte2int(x)) for x in data])) ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, framer, **kwargs): """Initialize a client instance :param framer: The modbus framer implementation to use """ self.framer = framer self.transaction = DictTransactionManager(self, **kwargs) self._debug = False self._debugfd = None self.broadcast_enable = kwargs.get("br...
def __init__(self, framer, **kwargs): """Initialize a client instance :param framer: The modbus framer implementation to use """ self.framer = framer if isinstance(self.framer, ModbusSocketFramer): self.transaction = DictTransactionManager(self, **kwargs) else: self.transaction ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def _recv(self, size): """Reads data from the underlying descriptor :param size: The number of bytes to read :return: The bytes read """ if not self.socket: raise ConnectionException(self.__str__()) # socket.recv(size) waits until it gets some data from the host but # not necessari...
def _recv(self, size): """Reads data from the underlying descriptor :param size: The number of bytes to read :return: The bytes read """ if not self.socket: raise ConnectionException(self.__str__()) # socket.recv(size) waits until it gets some data from the host but # not necessari...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def connect(self): """Connect to the modbus serial server :returns: True if connection succeeded, False otherwise """ if self.socket: return True try: self.socket = serial.Serial( port=self.port, timeout=self.timeout, bytesize=self.bytesize, ...
def connect(self): """Connect to the modbus serial server :returns: True if connection succeeded, False otherwise """ if self.socket: return True try: self.socket = serial.Serial( port=self.port, timeout=self.timeout, bytesize=self.bytesize, ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def validate(self, fx, address, count=1): """Validates the request to make sure it is in range :param fx: The function we are working with :param address: The starting address :param count: The number of values to test :returns: True if the request in within range, False otherwise """ if no...
def validate(self, fx, address, count=1): """Validates the request to make sure it is in range :param fx: The function we are working with :param address: The starting address :param count: The number of values to test :returns: True if the request in within range, False otherwise """ if no...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def getValues(self, fx, address, count=1): """Get `count` values from datastore :param fx: The function we are working with :param address: The starting address :param count: The number of values to retrieve :returns: The requested values from a:a+c """ if not self.zero_mode: addres...
def getValues(self, fx, address, count=1): """Get `count` values from datastore :param fx: The function we are working with :param address: The starting address :param count: The number of values to retrieve :returns: The requested values from a:a+c """ if not self.zero_mode: addres...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, *args, **kwargs): """Initializes the datastores :param kwargs: Each element is a ModbusDataBlock """ self.table = kwargs.get("table", "pymodbus") self.database = kwargs.get("database", "sqlite:///pymodbus.db") self._db_create(self.table, self.database)
def __init__(self, *args, **kwargs): """Initializes the datastores :param kwargs: Each element is a ModbusDataBlock """ self.table = kwargs.get("table", "pymodbus") self.database = kwargs.get("database", "sqlite:///pymodbus.db") self._db_create(self.table, self.database)
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __str__(self): """Returns a string representation of the context :returns: A string representation of the context """ return "Modbus Slave Context"
def __str__(self): """Returns a string representation of the context :returns: A string representation of the context """ return "Modbus Slave Context"
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def reset(self): """Resets all the datastores to their default values""" self._metadata.drop_all() self._db_create(self.table, self.database)
def reset(self): """Resets all the datastores to their default values""" self._metadata.drop_all() self._db_create(self.table, self.database)
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def validate(self, fx, address, count=1): """Validates the request to make sure it is in range :param fx: The function we are working with :param address: The starting address :param count: The number of values to test :returns: True if the request in within range, False otherwise """ addre...
def validate(self, fx, address, count=1): """Validates the request to make sure it is in range :param fx: The function we are working with :param address: The starting address :param count: The number of values to test :returns: True if the request in within range, False otherwise """ addre...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def getValues(self, fx, address, count=1): """Get `count` values from datastore :param fx: The function we are working with :param address: The starting address :param count: The number of values to retrieve :returns: The requested values from a:a+c """ address = address + 1 # section 4.4 ...
def getValues(self, fx, address, count=1): """Get `count` values from datastore :param fx: The function we are working with :param address: The starting address :param count: The number of values to retrieve :returns: The requested values from a:a+c """ address = address + 1 # section 4.4 ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def setValues(self, fx, address, values, update=True): """Sets the datastore with the supplied values :param fx: The function we are working with :param address: The starting address :param values: The new values to be set :param update: Update existing register in the db """ address = addr...
def setValues(self, fx, address, values): """Sets the datastore with the supplied values :param fx: The function we are working with :param address: The starting address :param values: The new values to be set """ address = address + 1 # section 4.4 of specification _logger.debug("set-valu...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def _db_create(self, table, database): """A helper method to initialize the database and handles :param table: The table name to create :param database: The database uri to use """ self._engine = sqlalchemy.create_engine(database, echo=False) self._metadata = sqlalchemy.MetaData(self._engine) ...
def _db_create(self, table, database): """A helper method to initialize the database and handles :param table: The table name to create :param database: The database uri to use """ self._engine = sqlalchemy.create_engine(database, echo=False) self._metadata = sqlalchemy.MetaData(self._engine) ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def _get(self, type, offset, count): """ :param type: The key prefix to use :param offset: The address offset to start at :param count: The number of bits to read :returns: The resulting values """ query = self._table.select( and_( self._table.c.type == type, ...
def _get(self, type, offset, count): """ :param type: The key prefix to use :param offset: The address offset to start at :param count: The number of bits to read :returns: The resulting values """ query = self._table.select( and_( self._table.c.type == type, ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def _build_set(self, type, offset, values, prefix=""): """A helper method to generate the sql update context :param type: The key prefix to use :param offset: The address offset to start at :param values: The values to set :param prefix: Prefix fields index and type, defaults to empty string ""...
def _build_set(self, type, offset, values, prefix=""): """A helper method to generate the sql update context :param type: The key prefix to use :param offset: The address offset to start at :param values: The values to set :param prefix: Prefix fields index and type, defaults to empty string ""...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def _set(self, type, offset, values): """ :param key: The type prefix to use :param offset: The address offset to start at :param values: The values to set """ if self._check(type, offset, values): context = self._build_set(type, offset, values) query = self._table.insert() ...
def _set(self, type, offset, values): """ :param key: The type prefix to use :param offset: The address offset to start at :param values: The values to set """ if self._check(type, offset, values): context = self._build_set(type, offset, values) query = self._table.insert() ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def _update(self, type, offset, values): """ :param type: The type prefix to use :param offset: The address offset to start at :param values: The values to set """ context = self._build_set(type, offset, values, prefix="x_") query = self._table.update().values(value="value") query = que...
def _update(self, type, offset, values): """ :param type: The type prefix to use :param offset: The address offset to start at :param values: The values to set """ context = self._build_set(type, offset, values, prefix="x_") query = self._table.update().values(name="value") query = quer...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def _validate(self, type, offset, count): """ :param key: The key prefix to use :param offset: The address offset to start at :param count: The number of bits to read :returns: The result of the validation """ query = self._table.select( and_( self._table.c.type == type, ...
def _validate(self, type, offset, count): """ :param key: The key prefix to use :param offset: The address offset to start at :param count: The number of bits to read :returns: The result of the validation """ query = self._table.select( and_( self._table.c.type == type, ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, string): """Initialize the exception :param string: The message to append to the error """ self.string = string
def __init__(self, string): """Initialize the exception :param string: The message to append to the error """ self.string = string
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, string="", function_code=None): """Initialize the exception :param string: The message to append to the error """ self.fcode = function_code self.message = "[Input/Output] %s" % string ModbusException.__init__(self, self.message)
def __init__(self, string="", function_code=None): """Initialize the exception :param string: The message to append to the error """ self.fcode = function_code self.message = "[Input/Output] %s" % string ModbusException.__init__(self, self.message)
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, string=""): """Initialize the exception :param string: The message to append to the error """ message = "[Invalid Parameter] %s" % string ModbusException.__init__(self, message)
def __init__(self, string=""): """Initialize the exception :param string: The message to append to the error """ message = "[Invalid Parameter] %s" % string ModbusException.__init__(self, message)
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, string=""): """Initialize the exception :param string: The message to append to the error """ message = "[No Such Slave] %s" % string ModbusException.__init__(self, message)
def __init__(self, string=""): """Initialize the exception :param string: The message to append to the error """ message = "[No Such Slave] %s" % string ModbusException.__init__(self, message)
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, string=""): """Initialize the exception :param string: The message to append to the error """ message = "[Not Implemented] %s" % string ModbusException.__init__(self, message)
def __init__(self, string=""): """Initialize the exception :param string: The message to append to the error """ message = "[Not Implemented] %s" % string ModbusException.__init__(self, message)
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, string=""): """Initialize the exception :param string: The message to append to the error """ message = "[Connection] %s" % string ModbusException.__init__(self, message)
def __init__(self, string=""): """Initialize the exception :param string: The message to append to the error """ message = "[Connection] %s" % string ModbusException.__init__(self, message)
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self, string=""): """Initialize the exception :param string: The message to append to the error """ message = "[Invalid Message] %s" % string ModbusException.__init__(self, message)
def __init__(self, string=""): """Initialize the exception :param string: The message to append to the error """ message = "[Invalid Message] %s" % string ModbusException.__init__(self, message)
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __init__(self): """Initializes the client lookup tables""" functions = set(f.function_code for f in self.__function_table) self.__lookup = dict([(f.function_code, f) for f in self.__function_table]) self.__sub_lookup = dict((f, {}) for f in functions) for f in self.__sub_function_table: ...
def __init__(self): """Initializes the client lookup tables""" functions = set(f.function_code for f in self.__function_table) self.__lookup = dict([(f.function_code, f) for f in self.__function_table]) self.__sub_lookup = dict((f, {}) for f in functions) for f in self.__sub_function_table: ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def decode(self, message): """Wrapper to decode a request packet :param message: The raw modbus request packet :return: The decoded modbus message or None if error """ try: return self._helper(message) except ModbusException as er: _logger.warning("Unable to decode request %s" %...
def decode(self, message): """Wrapper to decode a request packet :param message: The raw modbus request packet :return: The decoded modbus message or None if error """ try: return self._helper(message) except ModbusException as er: _logger.warning("Unable to decode request %s" %...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def lookupPduClass(self, function_code): """Use `function_code` to determine the class of the PDU. :param function_code: The function code specified in a frame. :returns: The class of the PDU that has a matching `function_code`. """ return self.__lookup.get(function_code, ExceptionResponse)
def lookupPduClass(self, function_code): """Use `function_code` to determine the class of the PDU. :param function_code: The function code specified in a frame. :returns: The class of the PDU that has a matching `function_code`. """ return self.__lookup.get(function_code, ExceptionResponse)
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def _helper(self, data): """ This factory is used to generate the correct request object from a valid request packet. This decodes from a list of the currently implemented request types. :param data: The request packet to decode :returns: The decoded request or illegal function request object ...
def _helper(self, data): """ This factory is used to generate the correct request object from a valid request packet. This decodes from a list of the currently implemented request types. :param data: The request packet to decode :returns: The decoded request or illegal function request object ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def decode(self, message): """Wrapper to decode a response packet :param message: The raw packet to decode :return: The decoded modbus message or None if error """ try: return self._helper(message) except ModbusException as er: _logger.error("Unable to decode response %s" % er) ...
def decode(self, message): """Wrapper to decode a response packet :param message: The raw packet to decode :return: The decoded modbus message or None if error """ try: return self._helper(message) except ModbusException as er: _logger.error("Unable to decode response %s" % er) ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def _helper(self, data): """ This factory is used to generate the correct response object from a valid response packet. This decodes from a list of the currently implemented request types. :param data: The response packet to decode :returns: The decoded request or an exception response object ...
def _helper(self, data): """ This factory is used to generate the correct response object from a valid response packet. This decodes from a list of the currently implemented request types. :param data: The response packet to decode :returns: The decoded request or an exception response object ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def checkFrame(self): """ Check if the next frame is available. Return True if we were successful. 1. Populate header 2. Discard frame if UID does not match """ try: self.populateHeader() frame_size = self._header["len"] data = self._buffer[: frame_size - 2] ...
def checkFrame(self): """ Check if the next frame is available. Return True if we were successful. 1. Populate header 2. Discard frame if UID does not match """ try: self.populateHeader() frame_size = self._header["len"] data = self._buffer[: frame_size - 2] ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def populateResult(self, result): """ Populates the modbus result header The serial packets do not have any header information that is copied. :param result: The response packet """ result.unit_id = self._header["uid"] result.transaction_id = self._header["uid"]
def populateResult(self, result): """ Populates the modbus result header The serial packets do not have any header information that is copied. :param result: The response packet """ result.unit_id = self._header["uid"]
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def processIncomingPacket(self, data, callback, unit, **kwargs): """ The new packet processing pattern This takes in a new request packet, adds it to the current packet stream, and performs framing on it. That is, checks for complete messages, and once found, will process all that exist. This ...
def processIncomingPacket(self, data, callback, unit, **kwargs): """ The new packet processing pattern This takes in a new request packet, adds it to the current packet stream, and performs framing on it. That is, checks for complete messages, and once found, will process all that exist. This ...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def buildPacket(self, message): """ Creates a ready to send modbus packet :param message: The populated request/response to send """ data = message.encode() packet = ( struct.pack(RTU_FRAME_HEADER, message.unit_id, message.function_code) + data ) packet += struct.pack(">H", comp...
def buildPacket(self, message): """ Creates a ready to send modbus packet :param message: The populated request/response to send """ data = message.encode() packet = ( struct.pack(RTU_FRAME_HEADER, message.unit_id, message.function_code) + data ) packet += struct.pack(">H", comp...
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def __new__(cls, *args, **kwargs): """Create a new instance""" if "_inst" not in vars(cls): cls._inst = object.__new__(cls) return cls._inst
def __new__(cls, *args, **kwargs): """Create a new instance""" if "_inst" not in vars(cls): cls._inst = object.__new__(cls) return cls._inst
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError
def decode(self, message): """Wrapper to decode a given packet :param message: The raw modbus request packet :return: The decoded modbus message or None if error """ raise NotImplementedException("Method not implemented by derived class")
def decode(self, message): """Wrapper to decode a given packet :param message: The raw modbus request packet :return: The decoded modbus message or None if error """ raise NotImplementedException("Method not implemented by derived class")
https://github.com/riptideio/pymodbus/issues/377
client = ModbusSerialClient(port='notexist', method='rtu') client.connect() Traceback (most recent call last): File "<input>", line 1, in <module> File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect self.socket.interCharTimeout = self.inter_char_timeout AttributeError: 'NoneType' object has...
AttributeError