pichillilorenzo / JavaScript-Completions

JavaScript Completions for sublime text. It helps you to write your scripts more quickly with hints and completions.
MIT License
356 stars 77 forks source link

Permissions break "Can I Use" feature #45

Open FeBe95 opened 7 years ago

FeBe95 commented 7 years ago

Error on starup:

Exception in thread DownloadCanIuseJsonData:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "./python3.3/threading.py", line 858, in run
  File "C:\Users\*****\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\_generated_2017_04_09_at_16_06_42.py", line 783, in donwload_can_i_use_json_data
    os.rename(path_to_test_can_i_use_data, path_to_can_i_use_data)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\*****\\AppData\\Roaming\\Sublime Text 3\\Packages\\JavaScript Completions\\helper\\can_i_use\\can_i_use_data.json'

Error when calling the can i use function via the context menu:

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 818, in run_
    return self.run(edit)
  File "C:\Users\*****\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\_generated_2017_04_09_at_16_06_42.py", line 951, in run
    can_i_use_data = can_i_use_file.get("data")
AttributeError: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 389, in run_callback
    expr()
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 620, in <lambda>
    run_callback('on_hover', callback, lambda: callback.on_hover(v, point, hover_zone))
  File "C:\Users\*****\AppData\Roaming\Sublime Text 3\Packages\JavaScript Completions\_generated_2017_04_09_at_16_06_42.py", line 211, in on_hover
    str_selected = result.get("region_string_stripped")
AttributeError: 'NoneType' object has no attribute 'get'
mmcintyre123 commented 6 years ago

I also have this issue

pichillilorenzo commented 6 years ago

@mmcintyre123 Try my new plugin https://github.com/pichillilorenzo/JavaScriptEnhancements