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

there is nothing in the preview part #108

Open
A-Little-Nut opened this issue May 8, 2020 · 10 comments
Open

there is nothing in the preview part #108

A-Little-Nut opened this issue May 8, 2020 · 10 comments

Comments

@A-Little-Nut
Copy link

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?

@lorddoumer
Copy link

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'

@chirul0
Copy link

chirul0 commented May 19, 2020

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'

@kg4zow
Copy link

kg4zow commented May 24, 2020

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.

@mattpopovich
Copy link

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

@jmbeuken
Copy link

jmbeuken commented Jun 9, 2020

+1

@gquittet
Copy link

gquittet commented Aug 31, 2020

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}}

@CalamitousCode
Copy link

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.

@hophopkhangaroo
Copy link

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

@dportalesr
Copy link

I solved this by simply restarting sublime text.

@arkssheo
Copy link

arkssheo commented Jul 5, 2022

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.

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