fawazar94 / DirectLink

GNU General Public License v2.0
3 stars 4 forks source link

Error when pressing NVDA+alt+O #2

Closed CyrilleB79 closed 2 years ago

CyrilleB79 commented 2 years ago

Hello

Here is an error seen while testing the add-on.

Steps to reproduce

ERROR - scriptHandler.executeScript (09:44:28.652) - MainThread (3936):
error executing script: <bound method GlobalPlugin.script_openInBrowser of <globalPlugins.DirectLink.GlobalPlugin object at 0x07B4DC10>> with gesture 'alt+NVDA+o'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 212, in executeScript
  File "C:\Users\Cyrille\AppData\Roaming\nvda\addons\directLink\globalPlugins\DirectLink.py", line 189, in script_openInBrowser
    os.startfile(link)
NameError: name 'link' is not defined

Expected result

No error in the log. And a user-friendly message such as: "No link previously converted" or something similar.

Add-on version

2.0, compiled from source (latest master branch)

fawazar94 commented 2 years ago

Hey @CyrilleB79 this should be fixed in the last commit. I've tested on 2021 and 2022.beta. Please let me know if it still there. Thanks.