Repository navigation
Shell Setting is None #2
Copy link
Copy link
Closed
Description
Hey there! This looks like absolutely terrific work; thanks so much for the Linux/OS X port! I'm having a little trouble, though: it looks like the package is looking for a setting that isn't defined. Here's the traceback, which ST3 spits out as soon as I try connecting to a server:
SSH[0] 10:52:32: Start work loopSFTP[0] 10:52:32: Start work loop
Traceback (most recent call last):
File "/Users/danielsh/Library/Application Support/Sublime Text 3/Packages/RemoteEdit/RemoteEdit.py", line 329, in handle_server_select
self.start_server(self.items[selection - 2])
File "/Users/danielsh/Library/Application Support/Sublime Text 3/Packages/RemoteEdit/RemoteEdit.py", line 399, in start_server
self.open_server()
File "/Users/danielsh/Library/Application Support/Sublime Text 3/Packages/RemoteEdit/RemoteEdit.py", line 416, in open_server
self.run_ssh_command(cmd, callback=self.handle_server_info)
File "/Users/danielsh/Library/Application Support/Sublime Text 3/Packages/RemoteEdit/RemoteEdit.py", line 2924, in run_ssh_command
(q, a) = self.get_arithmetic()
File "/Users/danielsh/Library/Application Support/Sublime Text 3/Packages/RemoteEdit/RemoteEdit.py", line 2900, in get_arithmetic
if "csh" in self.get_settings().get("%s:shell" % self.serverName):
TypeError: argument of type 'NoneType' is not iterable
And here's the server's settings file, sans comments, which is saved as daniel_sh.sublime-settings:
{
"host": "daniel.sh",
"user": "danielsh",
"remote_path": "/www/",
"enable_cat": false,
"cat_path": "/example/path/",
"fuzzy_path": "",
"order_by": "name",
"order_reverse": false,
"show_hidden": true,
"browsing_mode": "maintenance",
"show_file_info": true,
"sftp_only": false,
"prompt_contains": "$",
"temp_path": "/tmp",
"dont_edit_ext": [
"zip", "gz", "tar", "7z", "rar", "jpg", "jpeg", "png", "gif", "exe",
"mp3", "wav", "bz", "pyc", "ico"
],
"cat_exclude_folders": [".svn", ".git"]
}
I noticed that there was some manipulation of settings files in your code, so I didn't want to just go sticking new settings in willy-nilly. Let me know if I can provide any more information, and thanks in advance for your help!
Metadata
Metadata
Assignees
Labels
No labels
Activity
CodeEffect commentedon Jun 16, 2013
Oops, schoolboy error there. I added an echo "UNIQUE_STRING" method to SSH commands as on nix the prompt didn't come back in stdout so I had nothing to check for to confirm the command was finished. Unfortunately the echo was dependent on the shell version that itself required an ssh command to determine.
I've just realised that the [t]csh echo "UNIQUE_STRING" runs fine under bash anyway so no need for the shell version check there. I've just put 2 commits through, I realised that the first one wasn't going to work as I was typing this explanation out LMAO. Second one should have you up and running.
Please let me know how you get on. I've not been able to test on OSX at all so your feedback really is appreciated :)
bianjiang commentedon Jun 16, 2013
@phyllisstein you are fast... just post this to the forum.
bianjiang commentedon Jun 16, 2013
I think the fix you just committed introduced this ?
Traceback (most recent call last):
File "/Users/jiangbian/Library/Application Support/Sublime Text 3/Packages/RemoteEdit/RemoteEdit.py", line 329, in handle_server_select
self.start_server(self.items[selection - 2])
File "/Users/jiangbian/Library/Application Support/Sublime Text 3/Packages/RemoteEdit/RemoteEdit.py", line 399, in start_server
self.open_server()
File "/Users/jiangbian/Library/Application Support/Sublime Text 3/Packages/RemoteEdit/RemoteEdit.py", line 402, in open_server
reData = self.window.active_view().settings().get("reData", None)
CodeEffect commentedon Jun 16, 2013
Is there any more to the traceback please? It doesn't advise what is wrong that I can see.
phyllisstein commentedon Jun 16, 2013
Fabulous! Your new commits work great for me---I'm able to connect, browse, and download files remotely. Well done!
CodeEffect commentedon Jun 16, 2013
Woo hoo! Cheers chap. Let me know if you spot any further issues.
Can I ask if you are using passwords or SSH keys to auth please?
phyllisstein commentedon Jun 16, 2013
Sure thing: I'm using a key pair. When I tried with a username and password, it listed the system's welcome message and then reported that the connection had failed:
CodeEffect commentedon Jun 16, 2013
Just committed what should be a fix for this one. If you have a mo would you mind updating the code, restarting subime then attempting password auth again please?
phyllisstein commentedon Jun 16, 2013
Same result, I'm afraid:
CodeEffect commentedon Jun 16, 2013
Hmmm, just to clarify, it is connecting but it's not recognising that it's connected right?
Could you post the rest of the welcome message if at all possible please? Obviously strip anything personal but I'm trying to figure out why it isn't seeing the prompt (possibly not sent to stdout) or why it's not seeing the echo '$' (is possible it stops collecting stdout before that).
I've bunged in another await_response, see if that grabs enough data. Big thanks for all this help debugging :) If this one fails I'll see if I can reproduce under linux at this end and have a play, cheers!
EDIT: Should say, will need to restart sublime again as the worker has been updated, ta.
bianjiang commentedon Jun 16, 2013
I am getting the same issue when using password...
Install ssh-askpass actually made it work... (It prompt you the password, and list the folders)
This is the log without ssh-askpass
This is the log with ssh-askpass...
phyllisstein commentedon Jun 16, 2013
Looks like whatever you changed did the trick! I'll post the complete output anyway, but it seems to work fine now.
CodeEffect commentedon Jun 16, 2013
@jiang It looks as though there might be a network issue with the top trace. Could you possibly try it again please after a restart of sublime?
Also, what system are you connecting into?
lsis throwing that illegal option message that I'll need to fix. Could you possibly post the output of "ls --version" on the target machine too please?@dan, lovely stuff! Looks as though there was just too much text for it to process in the number of listens it was doing, I just added another one which was enough to capture those $'s.
bianjiang commentedon Jun 16, 2013
Yeah. Restarted sublime, same issue.
ah, "ls --version" explains it. I'm trying to ssh to another mac system, which on mac, it's "ls -version" (one less dash) for list folders.
bianjiang commentedon Jun 16, 2013
Just throw an idea :) I think git://github.com/paramiko/paramiko.git supports sftp on all platforms, and its pure python code, so no C binding involved
CodeEffect commentedon Jun 16, 2013
I'll have to take a look at this one tomorrow now but could you possibly help me out with a ls --help (or whatever the equivalent is please?).
Paramiko would be nice but doesn't do Python 3 yet unfortunately. Was one of the first things I looked at when starting the project.
bianjiang commentedon Jun 16, 2013
Oh... didn't realize paramiko hasn't ported to py3k yet...
Sorry, actually ls -version isn't a valid command either... it just didn't throw an error.
Here is the man page for ls on mac os x.
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/ls.1.html
Fix schoolboy error caused by fixing last schoolboy error. The arithm…
CodeEffect commentedon Jun 17, 2013
Cheers, any chance of an example "ls -lapT" on a folder with a few files / folders in it please? Also a "grep --version" and an "echo $SHELL" would be really useful too (on the Mac target if poss).
bianjiang commentedon Jun 17, 2013
here is "ls -lapT"
here is "grep --version"
and "echo $SHELL"
CodeEffect commentedon Jun 17, 2013
Balls, nothing so far to really distinguish it from BSD. Could I have a "uname -a" and a "uname -o" please?
bianjiang commentedon Jun 17, 2013
sublime.platform() shows 'osx' on mac.
but here is uname
CodeEffect commentedon Jun 17, 2013
Closing this one as it's gone off topic and opening a new issue at #5 for the OSX target issue. Thanks all :)