SublimeText2-FTPSync
SublimeText2-FTPSync copied to clipboard
TypeError: object of type 'NoneType' has no len()
Hi, i just installed the package manager and ftpsync. I set up a config file in the same folder as the default config file but when i try to browse with no file open nothing happens. In the console appears:
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 533, in run_
return self.run(**args)
File "FTPSync in C:\Users\Chazy Chaz\AppData\Roaming\Sublime Text 3\Installed Packages\FTPSync.sublime-package", line 3171, in run
File "./ntpath.py", line 316, in dirname
File "./ntpath.py", line 280, in split
File "./ntpath.py", line 208, in splitdrive
TypeError: object of type 'NoneType' has no len()
How can I fix this?
The config file is:
"host": "192.168.1.11",
"username": "ftp-user", // or null for anonymous login
"password": "123456",
"path": "/home",
"upload_on_save": true, // set *false* if you do not want to upload on save!
"port": 21,
"tls": true,
Thanks.
Hi, it should have failed more gracefully, but- the issue here https://github.com/NoxArt/SublimeText2-FTPSync/blob/master/FTPSync.py#L3171 is that since there's no active view, FTPSync will try to search in the active window among the open folders and somehow it didn't find it.
By "in the same folder as the default config file" you mean somewhere in the Sublime's installation? That is not really the supported use case, you would want to put this ftpsync.settings file inside the root folder of your project, that would correspond with some folder that is (at least for you) the root of your FTP.*
So for example C:\MyWebsites\ProjectX\www\ftpsync.settings <---> ftp.example.com/www/
*) It actually does not need to be a root, you can also just manage only subpart by FTPSync, but since one does usually want to sync the whole project and it syncs everything from the folder where it is and downward, it is the most common use