sublime_terminal icon indicating copy to clipboard operation
sublime_terminal copied to clipboard

Terminal: No place to open terminal to

Open onmyway133 opened this issue 9 years ago • 29 comments

I installed Terminal package, hit Command+Shift+t on a file, and got this error

Terminal: No place to open terminal to

I use Sublime Text 2 on Yosemite 10.10.2

onmyway133 avatar Aug 29 '15 10:08 onmyway133

I am on vacation for 2 weeks. I don't know any solution for this right now. I will reply in 2 weeks.

twolfson avatar Aug 30 '15 15:08 twolfson

Was it a text file? What version of sublime text and on what platform?

wbond avatar Aug 30 '15 17:08 wbond

It's been 1 month of inactivity from @onmyway133 closing issue for now.

twolfson avatar Oct 11 '15 22:10 twolfson

Having this issue too.

nathanbell avatar Oct 17 '15 15:10 nathanbell

@nathanbell Can you give us more steps to reproduce the error?

  • What OS are you using?
  • What version of Sublime Text are you on?
  • How did you receive the error? (e.g. press a shortcut when viewing a file)

twolfson avatar Oct 17 '15 21:10 twolfson

Hi, I'm hitting the same issue.

What OS are you using? Fedora 22 What version of Sublime Text are you on? Build 3083 How did you receive the error? (e.g. press a shortcut when viewing a file) Input Ctrl+Shift+T

Thanks, Chen

chen57237861 avatar Nov 03 '15 09:11 chen57237861

@chen57237861 Can you provide more information about when the error occurred?

  • Did you have any folders in your sidebar?
  • Did you have an file buffer open?

twolfson avatar Nov 03 '15 09:11 twolfson

Hi @twolfson

Thank you for your reply.

It seems that re-installation solves the problem... But there should not be the problem of the package itself but the difference of my environment before and after the re-installation.

Thank you ! Chen

chen57237861 avatar Nov 03 '15 09:11 chen57237861

What was it that you reinstalled (e.g. the package, Sublime Text)?

Also, did you open any files during reinstallation?

twolfson avatar Nov 03 '15 17:11 twolfson

I just had this same issue. Brand new install of Sublime Text 3 on El Capitan. Uninstalling and reinstalling the Terminal package fixed it. Unfortunately, didn't see this until after I fixed it, but wanted to let you know what exactly was reinstalled.

zburns12 avatar Jan 16 '16 00:01 zburns12

Cool, thanks for the info. I will try to reproduce by using a fresh machine on Sauce Labs by the end of next weekend.

twolfson avatar Jan 17 '16 00:01 twolfson

I have this error when I try to open Terminal on an empty tab. So there is no folder defined where Terminal should start.

katmoon avatar Jan 17 '16 07:01 katmoon

@katmoon I believe that was the original edge case the error was for. Where would expect the terminal to open in that scenario? Maybe we could simply invoke the terminal command and let it open in its default directory?

twolfson avatar Jan 17 '16 22:01 twolfson

Yes, any default directory would be nice.

I didn't notice the tab was empty in the beginning and thought Terminal didn't work at all, googled the issue, found this one and subscribed. Only after some time noticed that I tried to open it in an empty tab, that's why it didn't work.

katmoon avatar Jan 18 '16 05:01 katmoon

@wbond Thoughts on opening in the default cwd (probably Sublime's directory) or home directory?

twolfson avatar Jan 18 '16 06:01 twolfson

I would prefer home directory. Terminals usually start there.

katmoon avatar Jan 18 '16 06:01 katmoon

I also think this needs a better error message. Perhaps something like: This is not a saved file. Cannot open a terminal here.

krisdestruction avatar Feb 16 '16 07:02 krisdestruction

To reproduce:

  1. Open Sublime Text
  2. File / New File
  3. Right click in text editor, 'Open terminal here...'

Expected: Menu item 'Open terminal here' is greyed out (disabled)

What actually happens: You get a silly error "Terminal: No place to open terminal to"

hickford avatar Jun 14 '16 16:06 hickford

@hickford That would be an enhancement and is unrelated to this issue. Please open a separate issue or a PR.

twolfson avatar Jun 14 '16 16:06 twolfson

Done https://github.com/wbond/sublime_terminal/issues/119

hickford avatar Jun 14 '16 19:06 hickford

Guys, this issue can be fixed by saving your opened file. When You start SublimeText and open some file make sure this file is saved, only after that You can use ctrl+shift+T for opening the Terminal.

ghost avatar Jul 17 '16 14:07 ghost

set defult on settings terminal end download sublime 3

MamoniAL avatar Nov 11 '16 19:11 MamoniAL

On macOS Sierra, ST2 (2221), installed Terminal plug with in past few days.

@DVN-Anakin I get this error even when the file is saved, but the file/tab is empty.

Adding a single character, without saving, solves issue and opens a terminal.

Quite minor, but I only know this because I wanted to open the terminal before adding some content. And the error message lead me down the wrong path in wondering what was wrong (I thought I had done something terrible with my git repo).

maegul avatar Jan 31 '17 10:01 maegul

I get the same error Terminal: No place to open terminal to , even though the file is saved and has content.

OSX 10.12.6 Sierra Sublime Text3 3143 iTerm2 Build 3.1.5

{
    "terminal": "iTerm2-v3.sh"
}

inserted in user settings for Terminal.


Update I: After reinstalling Terminal, opening a terminal now works. Except, it does not open within Sublime, but simply starts iTerm and opens a new terminal instance.


Update II: Adding "parameters": ["--open-in-tab"] to the user setting causes the Terminal: No place to open terminal to error.

TMorville avatar Apr 17 '18 12:04 TMorville

What's the shortcut you're using and is the file in a project folder?

twolfson avatar Apr 17 '18 17:04 twolfson

My shortcut is shift-command-T and if you're referring to the file I have open, it's in ~/tmp/.

TMorville avatar Apr 18 '18 07:04 TMorville

So the code that generates the message is:

https://github.com/wbond/sublime_terminal/blob/1.18.0/Terminal.py#L123-L134

If you're invoking via a shortcut, then there should be no paths parameter. This means something is going wrong with active_view().file_name() or folders(). Can you try opening Sublime Text's console and running those to see what's causing the issue?

twolfson avatar Apr 18 '18 07:04 twolfson

OK. For some reason, opening a console allows the shortcut to work... I will see if this is a stable result after some use.

TMorville avatar Apr 18 '18 07:04 TMorville

thanks you

gumblur avatar Oct 04 '20 15:10 gumblur