Did I find the right examples for you? yes no

All Samples(19)  |  Call(18)  |  Derive(1)  |  Import(0)
Buffer error.

src/m/e/messytables-0.13.0/messytables/core.py   messytables(Download)
    def readline(self):
        if self.len < self.offset < self.fp_offset:
            raise BufferError('Line is not available anymore')
        if self.offset >= self.len:
            line = self._next_line()
 
        if self.len < self.offset < self.fp_offset:
            raise BufferError('Data is not available anymore')
        if self.offset >= self.len:
            byte = self._read(n)
    def seek(self, offset):
        if self.len < offset < self.fp_offset:
            raise BufferError('Cannot seek because data is not buffered here')
        self.offset = offset
        if offset < self.len:

src/m/e/messytables-HEAD/messytables/core.py   messytables(Download)
    def readline(self):
        if self.len < self.offset < self.fp_offset:
            raise BufferError('Line is not available anymore')
        if self.offset >= self.len:
            line = self._next_line()
 
        if self.len < self.offset < self.fp_offset:
            raise BufferError('Data is not available anymore')
        if self.offset >= self.len:
            byte = self._read(n)
    def seek(self, offset):
        if self.len < offset < self.fp_offset:
            raise BufferError('Cannot seek because data is not buffered here')
        self.offset = offset
        if offset < self.len:

src/c/o/cobs-1.0.0/python3/cobs/cobsr/_cobsr_py.py   cobs(Download)
def _get_buffer_view(in_bytes):
    mv = memoryview(in_bytes)
    if mv.ndim > 1 or mv.itemsize > 1:
        raise BufferError('object must be a single-dimension buffer of bytes.')
    return mv

src/c/o/cobs-1.0.0/python3/cobs/cobs/_cobs_py.py   cobs(Download)
def _get_buffer_view(in_bytes):
    mv = memoryview(in_bytes)
    if mv.ndim > 1 or mv.itemsize > 1:
        raise BufferError('object must be a single-dimension buffer of bytes.')
    return mv

src/c/r/crcmod-1.7/python3/crcmod/_crcfunpy.py   crcmod(Download)
    mv = memoryview(in_obj)
    if mv.ndim > 1:
        raise BufferError('Buffer must be single dimension')
    return mv
 

src/v/o/vosae-app-HEAD/www/vosae_utils/pipeline.py   vosae-app(Download)
            return self.obj
        except:
            raise BufferError("cannot perform image operations")
 
 

src/l/e/Legume-0.5/legume/connection.py   Legume(Download)
    def _add_message_bytes_to_output_list(self, message_id,
                                     message_bytes, require_ack=False):
        if len(message_bytes) > self.MTU:
            raise BufferError('Packet is too large. size=%s, mtu=%s' % (
                len(message_bytes), self.MTU))

src/r/i/ringbuffer-0.0.2/ringbuffer/ring.py   ringbuffer(Download)
        self.pieces = max(pieces, 1)
        if len(sequence) > self.pieces:
            raise BufferError("Sequence is too long, increase pieces.")
        OrderedDict.__init__(self, sequence, *args, **kwargs)
 

src/r/e/refinery-platform-HEAD/refinery/file_server/tdf_file.py   refinery-platform(Download)
class InsufficientBytesError(BufferError):
    '''Insufficient number of bytes read for conversion from stream.
 
    '''
    def __init__(self, bytes_requested, bytes_read):

src/p/y/pygame_cffi-HEAD/test/test_utils/buftools.py   pygame_cffi(Download)
    def _get_buffer(self, view, flags):
        from ctypes import addressof
        if (flags & PyBUF_WRITABLE) == PyBUF_WRITABLE and self.readonly:
            raise BufferError("buffer is read-only")
        if ((flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS and
            not self.is_contiguous('C')):
            raise BufferError("data is not C contiguous")
        if ((flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS and
            not self.is_contiguous('F')):
            raise BufferError("data is not F contiguous")
        if ((flags & PyBUF_ANY_CONTIGUOUS) == PyBUF_ANY_CONTIGUOUS and
            not self.is_contiguous('A')):
            raise BufferError("data is not contiguous")
        view.buf = self.buf
        view.readonly = self.readonly
        else:
            raise BufferError(
                "shape required for {} dimensional data".format(self.ndim))
        if (flags & PyBUF_STRIDES) == PyBUF_STRIDES:
            view.strides = ctypes.addressof(self._strides)