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

MarkdownTOC v4.1.0 Not Working #157

Closed tajmone closed 8 months ago

tajmone commented 4 years ago

After the update to v4.1.0 I noticed that MarkdownTOC stopped working — no TOC is generated at save time.

I've tried to comment out all my custom settings but the problem remains.

Using ST Dev Build 3210, under Win 10 x64.

Anyone experienced the same problem?

tajmone commented 4 years ago

Mhh... this log might shed some light on what's going on:

ignored packages updated to: ["Markdown", "Rust", "SublimeLinter", "SublimeLinter-contrib-markdownlint", "Vintage"]
reloading plugin MarkdownTOC.__init__
Traceback (most recent call last):
  File "C:\Program Files\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
zipimport.ZipImportError: bad local file header in C:\Users\XXXXXXXX\AppData\Roaming\Sublime Text 3\Installed Packages\MarkdownTOC.sublime-package
tajmone commented 4 years ago

OK, after closing an restarting ST various times the problem seems to have fixed itself.

I have a feeling that this might be due to the recent Win 10 v2004 update, because I've experienced some problems with various tools.

Maybe the Issue should be left open for a short while (e.g. a week), just in case some people are experiencing the same.

Apparently, ST was also having trouble accessing the default settings file (again, experienced this with other apps too, after the 2004 update).

Possibly, one of the main problems is that the 2004 update (being a major update, and practically a re-installation of Win 10 over the previous version) has reset all the installation dates of the applications on the system, which might affect some tools which rely on dates for checking whether an update is needed — if I go in CPanel/Installed Application, all apps show up as if they had been installed on the day of the v2004 update. This might have affected also files creation/last modified dates in various system folders too.

Or maybe it's just another one of Win 10's "break-it-all" updates .... who knows.

szymonpk commented 4 years ago

It is not isolated to the Windows, I had to restart my Sublime after the upgrade on Linux as well.

tajmone commented 4 years ago

It is not isolated to the Windows, I had to restart my Sublime after the upgrade on Linux as well.

Interesting. So it looks like that for some reason ST needs to be restarted multiple times to finish updating some packages.

The strange thing that I noticed in my ST console log was that my default settings file was being reported as "not found" in a couple of occasions (hence my though it was Windows blocking it).

I wonder what changed, after all the ST app hasn't been updated for quite a while. Maybe the package manager was updated in the background?

aboy021 commented 3 years ago

Thanks @tajmone, opening and closing Sublime Text multiple times resolved the issue for me on MacOS.

0xdevalias commented 8 months ago

See also: