Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Error of dac and file permission #3

Open
checkitmore opened this issue Oct 9, 2023 · 1 comment
Open

Getting Error of dac and file permission #3

checkitmore opened this issue Oct 9, 2023 · 1 comment

Comments

@checkitmore
Copy link

Hi,

I am not familiar and quickly installed this plugin script and it does not work. When I see console I found this. Can you please help?

Traceback (most recent call last):
File "C:\Users\KB\AppData\Roaming\Notepad++\plugins\Config\PythonScript\scripts\dictautocomp\dictautocomp.py", line 207, in
dac
NameError: name 'dac' is not defined. Did you mean: 'DAC'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\KB\AppData\Roaming\Notepad++\plugins\Config\PythonScript\scripts\dictautocomp\dictautocomp.py", line 209, in
dac = DAC()
File "C:\Users\KB\AppData\Roaming\Notepad++\plugins\Config\PythonScript\scripts\dictautocomp\dictautocomp.py", line 81, in init
self.load_settings()
File "C:\Users\KB\AppData\Roaming\Notepad++\plugins\Config\PythonScript\scripts\dictautocomp\dictautocomp.py", line 128, in load_settings
from dictautocomp.get_pythonscript_autocompletions import autocomp_file # regenerate autocompletions
File "C:\Program Files (x86)\Notepad++\plugins\PythonScript\scripts\dictautocomp\get_pythonscript_autocompletions.py", line 36, in
with autocomp_file.open('w') as f:
File "C:\Program Files (x86)\Notepad++\plugins\PythonScript\lib\pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
PermissionError: [Errno 13] Permission denied: 'C:\Program Files (x86)\Notepad++\plugins\PythonScript\scripts\dictautocomp\pythonscript_autocompletions.txt'

@molsonkiko
Copy link
Owner

molsonkiko commented Oct 9, 2023

Hi @checkitmore , thanks for letting me know about this issue! I'm sorry you had this problem.

I think the issue is that SYSTEM doesn't have issue to the %AppData%/Roaming/Notepad++/plugins/Config/PythonScript/scripts/dictautocomp folder where this script lives, and because of this my script can't write the config files that the plugin needs in order to function.

I can't actually replicate this on my computer, so helping you is going to be a bit tricky, but what I recommend is opening up the %AppData%/Roaming/Notepad++/plugins/Config/PythonScript/scripts folder (the folder that contains this script's folder) in File Explorer, right-clicking on the dictautocomp folder, choosing Properties from the drop-down, then navigating to the Security tab, then choosing SYSTEM, then checking Full control, then clicking Apply. So here's a picture summarizing what you need to do:
grant_write_modify_permissions

Please let me know if doing that helps! If it does, I will add it to my README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants