question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getPath error when convert called with editor pane out of focus

See original GitHub issue

I’m trying to use convertation, an error message shows in Atom with: markdown-pdf: TypeError: atom.workspace.getActivePaneItem(...).getPath is not a function. I’m using Atom version 1.16.0 and Windows 10 x64.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
travscommented, Jun 15, 2017

@holic-cl Ok great, thanks for the quick feedback. I’ve tried converting without saving locally and it works fine, however, when I click the tree-view panel before running convert, I get the originally reported error.

This issue is most likely caused by a loss of focus for the pane containing the file, thus getPath is not a function on this pane item (the tree-view). Fix would be a better method for getting the edited file’s path, even when the pane is not in focus. Will have a look at atom docs and see if they have a better function.

I’ll continue under the assumption that something like this is what happened in both your cases, until I get a report of it happening somehow else.

Thanks again for the report! 😄

0reactions
holic-clcommented, Jun 15, 2017

Ok, i remembered why i got this error, was when i tried to use it, and forgot to save the buffer to a file,

The buffer must to be saved to a existing file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

consider using paths instead of keys #1408 - GitHub
This is just an idea. Right now we use the concept of unique "keys" to keep track of the anchor and focus of...
Read more >
Convert URL to normal windows filename Java - Stack Overflow
So to convert a URL to File, you would say Paths.get(url.toURI()). ... getPath(); System.out.println(path); // prints: c:\foo bar\baz.jpg.
Read more >
File path for Windows standalone build - Unity Forum
Ah alright! So I created a resources directory and moved all of my videos to there. It works in the editor but not...
Read more >
Retrieving file information - Android Developers
To get the data type of a shared file given its content URI, the client app calls ContentResolver.getType() . This method returns the...
Read more >
How Can I Determine the Path to the Folder Where a Script is ...
For this column we wanted the name of the folder where the script ... Explorer window, a window that has the focus set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found