Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
927 stars 209 forks source link

open_view / load API errors with invalid path are unhelpfully wrong #4096

Closed psifertex closed 1 year ago

psifertex commented 1 year ago

If using any of the open_view or load APIs to load a file via CLI and you use a bad path, the error is incredibly unhelpful:

>>> import binaryninja
>>> bv = binaryninja.load('/bogus')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Applications/Binary Ninja-dev.app/Contents/Resources/python/binaryninja/__init__.py", line 335, in load
    raise Exception("Unable to create new BinaryView")
Exception: Unable to create new BinaryView
bpotchik commented 1 year ago

Fixed in 3.5.4458-dev.