naokazuterada / MarkdownTOC

SublimeText3 plugin which generate a table of contents (TOC) in a markdown document.
https://packagecontrol.io/packages/MarkdownTOC
MIT License
301 stars 48 forks source link

Disabled with ZipImportError #138

Closed aboy021 closed 5 years ago

aboy021 commented 5 years ago

How can the issue be reproduced

Install MarkdownTOC

What was expected

What actually occurred

Menu item visible (Tools > MarkdownTOC) but Insert TOC and Update TOC commands greyed out.

Console Error:

reloading plugin MarkdownTOC.__init__
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/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
zipimport.ZipImportError: bad local file header in /Users/arthurboyer/Library/Application Support/Sublime Text 3/Installed Packages/MarkdownTOC.sublime-package

What was the version of the involved component

Sublime Text version 3.2.1, Build 3207 MarkdownTOC v3.0.4

Additional Notes

I have Python 2.7.15 and Python 3.7.2 installed on my mac.

I read about a similar issue that involved a system wide installation of setuptools. Upgrading my setuptools versions with pip did not resolve this issue.

naokazuterada commented 5 years ago

I tried to uninstall and re-install. And my log is here and with no-preblem.

reloading plugin MarkdownTOC.__init__
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/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 1529, in _find_and_load_unlocked
ImportError: No module named 'MarkdownTOC.__init__'
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings

I'm not sure what's going wrong. 🤕

Would you mind to show me /Users/arthurboyer/Library/Application Support/Sublime Text 3/Installed Packages/MarkdownTOC.sublime-package for in reference? And please try re-install after remove it.

aboy021 commented 5 years ago

For reasons I don't properly understand the issue is now resolved. The steps I used were:

My guess is that a file was locked for some reason.

Thanks for your help