Vector35 / snippets

plugin for storing and using snippets of useful Binja script
MIT License
22 stars 9 forks source link

Snippets plugin startup error when installed #27

Closed sprout42 closed 2 years ago

sprout42 commented 2 years ago

If the ~/.binaryninja/snippets/update_example_snippets.py file doesn't exist on the latest version of the plugin the following error occurs:

Unable to create /home/user/.binaryninja/snippets or unable to add example updater

Once the IOError try/except in __init__.py is commented out this error can be seen:

Exception ignored on calling ctypes callback function: <bound method PythonScriptingProvider._load_module of <binaryninja.scriptingprovider.PythonScriptingProvider object at 0x7fd2d31d6850>>
Traceback (most recent call last):
  File "/home/user/.local/opt/binaryninja/plugins/../python/binaryninja/scriptingprovider.py", line 837, in _load_module
    __import__(module)
  File "/home/user/.binaryninja/repositories/official/plugins/Vector35_snippets/__init__.py", line 60, in <module>
    shutil.copy(src_examples, dst_examples)
  File "/usr/lib/python3.9/shutil.py", line 426, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.9/shutil.py", line 265, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.binaryninja/repositories/official/plugins/Vector35_snippets/update_example_snippets.py'
psifertex commented 2 years ago

Good catch, sorry about that. 1.17 was just released which fixes this.