Skip to content

Clicking on the vbiview window prints the line, but throws an "out of bounds" error and crashes #82

@PEevoo

Description

@PEevoo

Recently, I've been facing with this issue where I click on a line, inside vbiview, and it crashes, throwing an out of bounds error:

    print(md, s[steps])
IndexError: index 1838 is out of bounds for axis 0 with size 1440
GLUT Mouse callback <bound method VBIViewer.mouse of <teletext.vbi.viewer.VBIViewer object at 0x0000022E533F8AF0>> with (0, 0, 46, 135),{} failed: returning None index 1838 is out of bounds for axis 0 with size 1440

With some help, I managed to fix it, by changing the number "2048" on this line of viewer.py:
steps = np.floor(np.linspace(0, 2048 - 5, num=11)).astype(np.uint32)[[1, 5, 9]]

to

steps = np.floor(np.linspace(0, 1440 - 5, num=11)).astype(np.uint32)[[1, 5, 9]]

Card used: Hauppauge USB-Live2 (SAA7131)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions