Home Download Buy Blog Forum Support

Problem with WinSCP integration

Re: Problem with WinSCP integration

Postby gpfsmurf on Tue Feb 02, 2010 4:17 pm

Looks like an encoding issue. I think you're either encountering a non-english character or an extended ASCII char (in that case, the "cent" sign)

Can you try changing the line 48 in BrowseFTP.py from this:
Code: Select all
sublime.setTimeout(lambda: sublime.statusMessage(l), 0)
to this:
Code: Select all
sublime.setTimeout(lambda: sublime.statusMessage(repr(l)), 0)


There's probably a prettier way to deal with the encoding, but this should work.
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: Problem with WinSCP integration

Postby jfcg on Wed Feb 03, 2010 2:46 am

Thanks for your answer!

Now I have the following console output:

Error: Can't connect to ftp
Traceback (most recent call last):
File "C:\Users\pedro\AppData\Roaming\SUBLIM~1\Packages\AAALOA~1\scheduler.py", line 168, in callback
next(send=value, throwing=1)
File "C:\Users\pedro\AppData\Roaming\SUBLIM~1\Packages\AAALOA~1\scheduler.py", line 153, in next
next(send=e, throwing=1)
File "C:\Users\pedro\AppData\Roaming\SUBLIM~1\Packages\AAALOA~1\scheduler.py", line 155, in next
raise Exception('\n\n'.join(reversed(exceptions)))
Exception: Traceback (most recent call last):
File ".\scheduler.py", line 130, in next
ret = routines[-1].throw(send)
File ".\BrowseFTP.py", line 89, in run
IOError: Can't connect to ftp

Traceback (most recent call last):
File ".\scheduler.py", line 130, in next
ret = routines[-1].throw(send)
File ".\BrowseFTP.py", line 219, in connect
IOError: Can't connect to ftp

Traceback (most recent call last):
File ".\scheduler.py", line 86, in threaded
for a in gen: pass
File ".\WinSCP.py", line 263, in connect
IOError: Can't connect to ftp
jfcg
 
Posts: 10
Joined: Fri Dec 11, 2009 10:27 pm

Re: Problem with WinSCP integration

Postby gpfsmurf on Wed Feb 03, 2010 4:43 pm

Can you send me the rest of the console output?
"Connecting to ftp" etc.
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: Problem with WinSCP integration

Postby jfcg on Wed Feb 03, 2010 6:28 pm

I changed the WinSCP interface language in order to send you the console log in English, and I have found that was the problem. The package doesn't work with the WinSCP Spanish interface. There are several special characters in the connection log, such as "Sesión iniciada", and I think they were causing the issue. I have no problem with the English interface. If you want to test it against the Spanish interface, maybe others could be grateful to you.

Thank you very much for your support,
jfcg
jfcg
 
Posts: 10
Joined: Fri Dec 11, 2009 10:27 pm

Re: Problem with WinSCP integration

Postby jfcg on Thu Feb 04, 2010 11:31 am

By the way :)

Is it easy to change the default temp folder of the script to "My documents" for example?

Thank you!
jfcg
 
Posts: 10
Joined: Fri Dec 11, 2009 10:27 pm

Re: Problem with WinSCP integration

Postby gpfsmurf on Thu Feb 04, 2010 3:02 pm

You're right, it currently only works if WinSCP sends back English messages. Making it work in other languages is a simple task but I don't have the time to do it at the moment.

To change the temporary directory, look for the variable "temp_dir" which is populated in WinSCP.py's "connect" method.
BE VERY CAREFUL though, when disconnecting, it'll delete files in the temp_dir, so don't set it to "My Documents" directly! Rather, create an empty directory under My Documents, and assign it to temp_dir.

If you're comfortable with Python and the plugin, you can checkout the "projectSupport" branch. It has basic support for projects, including a temp dir specific to the project.
It's working but not finished yet - I'll continue working on this when I'm less busy.
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: Problem with WinSCP integration

Postby jfcg on Thu Feb 04, 2010 3:36 pm

Thank you very much gpfsmurf.

I am very comfortable with the plugin, but I have no background in Python (although I know Java, C++ and other programming languages). For example, how could I start a new project in that branch?
jfcg
 
Posts: 10
Joined: Fri Dec 11, 2009 10:27 pm

Re: Problem with WinSCP integration

Postby gpfsmurf on Thu Feb 04, 2010 4:11 pm

For more info about the project integration check this bitbucket thread:
http://bitbucket.org/gpfsmurf/winscp/issue/2/project-features-recursive-browsing-of-one-given-remote
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: Problem with WinSCP integration

Postby jfcg on Thu Feb 04, 2010 4:23 pm

Ok! Thank you very much!

Best,
jfcg
jfcg
 
Posts: 10
Joined: Fri Dec 11, 2009 10:27 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 22 guests