Skip to content

IndexError on opening file #13

@mishaturnbull

Description

@mishaturnbull

I've just installed binglide on Debian 4.18 (specifically, Kali Linux) and am having an error whenever I try to open a file. Binglide opens fine, and I can click the Open button and select a file, but as soon as I try to load the file I get the following error message in the console.

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/binglide/gui.py", line 108, in open_file
    self.read_file(f)
  File "/usr/local/lib/python3.6/dist-packages/binglide/gui.py", line 102, in read_file
    self.update_data()
  File "/usr/local/lib/python3.6/dist-packages/binglide/gui.py", line 116, in update_data
    self.calc_entropy.set_data(self.data)
  File "/usr/local/lib/python3.6/dist-packages/binglide/calcs.py", line 241, in set_data
    calc_entropy(data, self.s, shannon, hist, window, increments, decrements)
  File "/usr/local/lib/python3.6/dist-packages/binglide/calcs.py", line 201, in calc_entropy
    ent += increments[fo]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

I'm not entirely convinced this isn't related to issue #8, but I'm also not convinced it is. They're both errors on startup, but applying the patch in PR #11 didn't help me. I'd be happy to open a PR to fix this, but I'm not quite familiar enough with binglide to do so.

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