tushortz / intellekt

A sublime text plugin that attempts to provide intellisense for various programming languages
MIT License
17 stars 1 forks source link

NotADirectoryError #1

Open mazunki opened 4 years ago

mazunki commented 4 years ago

I'm getting the current error after installing:

NotADirectoryError: [Errno 20] Not a directory: '/home/mazunki/.config/sublime-text-3/Installed Packages/Intellekt.sublime-package/data/javase.json'

The traceback is the following:

Traceback (most recent call last):
  File "/opt/sublime_text_3/sublime_plugin.py", line 125, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/opt/sublime_text_3/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/home/mazunki/.config/sublime-text-3/Installed Packages/Intellekt.sublime-package/main.py", line 5, in <module>
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/opt/sublime_text_3/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/home/mazunki/.config/sublime-text-3/Installed Packages/Intellekt.sublime-package/language/_java.py", line 9, in <module>
  File "/home/mazunki/.config/sublime-text-3/Installed Packages/Intellekt.sublime-package/language/helpers.py", line 16, in get_content_to_json

What does it mean, and how do I fix it?

mazunki commented 4 years ago

After some tinkering I've figured out sublime-package files are zip files, and not directories, and since Python can't directly read the contents of a zip file, it fails.

I solved this by unzipping ~/.config/sublime-text-3/Installed\ Packages/Intellekt-sublime-package into a new directory in ~/.config/sublime-text-3/Packages/User/Intellekt, and then removing the Intellekt-sublime-package from the Installed Packages directory.

Now it seems to load, yet I don't see any difference.

tushortz commented 4 years ago

I'll have a look and get back to you

On Fri, 17 Jul 2020, 3:05 am Rolf Vidar Hoksaas, notifications@github.com wrote:

After some tinkering I've figured out sublime-package files are zip files, and not directories, and since Python can't directly read the contents of a zip file, it fails.

I solved this by unzipping ~/.config/sublime-text-3/Installed\ Packages/Intellekt-sublime-package into a new directory in ~/.config/sublime-text-3/Packages/User/Intellekt, and then removing the Intellekt-sublime-package from the Installed Packages directory.

Now it loads, yet I don't see any difference.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tushortz/intellekt/issues/1#issuecomment-659787758, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADEMSEBMRPOVOIIUU646ACLR36WV5ANCNFSM4O5JDRZA .

tushortz commented 4 years ago

After some tinkering I've figured out sublime-package files are zip files, and not directories, and since Python can't directly read the contents of a zip file, it fails.

I solved this by unzipping ~/.config/sublime-text-3/Installed\ Packages/Intellekt-sublime-package into a new directory in ~/.config/sublime-text-3/Packages/User/Intellekt, and then removing the Intellekt-sublime-package from the Installed Packages directory.

Now it seems to load, yet I don't see any difference.

have you restarted sublime text?

mazunki commented 4 years ago

After some tinkering I've figured out sublime-package files are zip files, and not directories, and since Python can't directly read the contents of a zip file, it fails. I solved this by unzipping ~/.config/sublime-text-3/Installed\ Packages/Intellekt-sublime-package into a new directory in ~/.config/sublime-text-3/Packages/User/Intellekt, and then removing the Intellekt-sublime-package from the Installed Packages directory. Now it seems to load, yet I don't see any difference.

have you restarted sublime text?

Multiple times, although I'm not entirely sure if it does in fact load.