MarkdownLivePreview icon indicating copy to clipboard operation
MarkdownLivePreview copied to clipboard

there is nothing in the preview part

Open A-Little-Nut opened this issue 4 years ago • 10 comments

Thanks a lot for your works. I met some problems. Uploading 捕获.PNG…

Traceback (most recent call last):
  File "C:\Users\蒋磊\AppData\Roaming\Sublime Text 3\Installed Packages\MarkdownLivePreview.sublime-package\MarkdownLivePreview.py", line 218, in _update_preview
  File "./python3.3/ntpath.py", line 256, in dirname
  File "./python3.3/ntpath.py", line 220, in split
  File "./python3.3/ntpath.py", line 162, in splitdrive
TypeError: object of type 'NoneType' has no len()

How should I do?

A-Little-Nut avatar May 08 '20 05:05 A-Little-Nut

same issue Traceback (most recent call last): File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 525, in on_load_async callback.on_load_async(v) File "C:\xxx\Sublime Text 3\Installed Packages\MarkdownLivePreview.sublime-package\MarkdownLivePreview.py", line 146, in on_load_async self._update_preview(markdown_view) File "C:xxx\Sublime Text 3\Installed Packages\MarkdownLivePreview.sublime-package\MarkdownLivePreview.py", line 204, in _update_preview if time.time() - self.last_update < DELAY / 1000: TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

lorddoumer avatar May 18 '20 11:05 lorddoumer

Same problem on Mac OS:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 525, in on_load_async
    callback.on_load_async(v)
  File "/Users/narene/Library/Application Support/Sublime Text 3/Installed Packages/MarkdownLivePreview.sublime-package/MarkdownLivePreview.py", line 146, in on_load_async
    self._update_preview(markdown_view)
  File "/Users/narene/Library/Application Support/Sublime Text 3/Installed Packages/MarkdownLivePreview.sublime-package/MarkdownLivePreview.py", line 204, in _update_preview
    if time.time() - self.last_update < DELAY / 1000:
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

chirul0 avatar May 19 '20 20:05 chirul0

Same problem, Sublime 3.2.2(3211) on macOS 10.15.4. I'm not seeing any error messages or stack traces. It does open a new two-pane window, but the pane on the right looks like a normal text editor - in fact it allows me to type and shows line numbers as I enter text there.

kg4zow avatar May 24 '20 00:05 kg4zow

Same issue. Sublime 3.2.2(3211) on macOS 10.15.5.

mattpopovich avatar Jun 01 '20 00:06 mattpopovich

+1

jmbeuken avatar Jun 09 '20 08:06 jmbeuken

Same here on macOS 10.15.6

Traceback (most recent call last):
  File "/Users/gquittet/Library/Application Support/Sublime Text 3/Installed Packages/MarkdownLivePreview.sublime-package/MarkdownLivePreview.py", line 218, in _update_preview
  File "./python3.3/posixpath.py", line 151, in dirname
AttributeError: 'NoneType' object has no attribute 'rfind'
Unable to parse command: drag_select {"additive": true, "event": {"button": 1, "x": nan.0, "y": nan.0}}

gquittet avatar Aug 31 '20 11:08 gquittet

I have the exact same error:

Traceback (most recent call last):
  File "C:\Users\MyName\AppData\Roaming\Sublime Text 3\Installed Packages\MarkdownLivePreview.sublime-package\MarkdownLivePreview.py", line 218, in _update_preview
  File "./python3.3/ntpath.py", line 256, in dirname
  File "./python3.3/ntpath.py", line 220, in split
  File "./python3.3/ntpath.py", line 162, in splitdrive
TypeError: object of type 'NoneType' has no len()

ST3 v3.2.2 Build 3211 Windows 10 Pro 2004

After looking at the code and testing with a named file instead of a new untitled file, I believe the issue could be when the code is checking the name/path of a file that doesn't exist:

basepath = os.path.dirname(markdown_view.file_name()) Here's a link to the line in the repo.

CalamitousCode avatar Sep 02 '20 03:09 CalamitousCode

Same problem, Sublime 3.2.2(3211) on macOS 10.15.4. I'm not seeing any error messages or stack traces. It does open a new two-pane window, but the pane on the right looks like a normal text editor - in fact it allows me to type and shows line numbers as I enter text there.

I was experiencing the same issue. I found that the live preview doesn't render if you try to include an image in your document. Once I removed all references to images, I was able to see the live preview

hophopkhangaroo avatar Jan 02 '21 21:01 hophopkhangaroo

I solved this by simply restarting sublime text.

dportalesr avatar Dec 17 '21 06:12 dportalesr

Seems to happen when trying to preview an unsaved file, just closed off the preview tab and reopened and it's working now. Restarting Sublime should also work, of course.

arkssheo avatar Jul 05 '22 22:07 arkssheo