SublimeText2-FTPSync
SublimeText2-FTPSync copied to clipboard
ftpsync.settings JSON error
I just installed the plugin via Package control > Install package. Then I went into a website local directory and created a ftpsync.settings file like this:
{ 'primary': { host: '192.168.1.1', username: 'YYY', password: 'XXX', path: '/Black_Sitez/test/' } }
The error shown at the bottom is:
Line 1 column2 Failed parsing configuration file:{
...however, JSON lint told me it was valid!
Then I tried to:
- use the 'Setup FTPSync in this folder' template
- use " instead of '
- download the latest build and upgrade
Nothing solved that problem. Please help. Thank you.
Hi, so if you use Setup FTPSync in this folder
and just change values, it throws this error? No special character in username/password used?
Oh...by any chance it does not include //
a value?
my username is normal, no special chars... just 'admin'. my pw is like 'ONE111_two&three'
Can you try using " instead of ' + wrapping property names in quotes? host => "host"? Sorry if you've tried already
{ "primary": { "host": "192.168.1.1", "username": "admin", "password": "ONE111_two&three", "path": "/Black_Sitez/test/" } }
The error is still there :((
That's very odd, I've tested it in ST2 and ST3 and both were OK. Can you please tell me your OS and Sublime version? I assume you've tried restarting it. Or perhaps try copying back this text so that any unintentiall characters like shift+space are (hopefully) removed
Ubuntu Desktop 13.04 (32-bit) ST v. 2.0.2 build 2221
I only have access to Ubuntu 11 x64 ST2, but it's OK there too.
I added a debug option, can you please go to Preferences > Packages > FTPSync > Settings - User
and add
{
"debug_json":true
}
restart Sublime and then try to use FTPSync (save a file in a folder with ftpsync.settings
file) and look into console (View > Show console
) to see what exact string is being parsed? Thank you!
FYI: my mate is using Windows 8, same ST version, and having the same error.
FTPSync > Debug JSON:
{ "primary": { "host": "192.168.1.1", "username": "admin", "password": "ONE111_two&three", "path": "/Black_Sitez/xxx/" }
}
Writing file /home/fabio/Siti/klepsoo/ftpsync.settings with encoding UTF-8
FTPSync > Debug JSON:
FTPSync > Failed parsing configuration file: {/home/fabio/Siti/klepsoo/ftpsync.settings} (commas problem?) [Exception: argument 1 must be string without null bytes, not str]
FTPSync > Exception in user code:
Traceback (most recent call last): File "./FTPSync.py", line 777, in loadConfig File "./FTPSync.py", line 663, in parseJson
TypeError: argument 1 must be string without null bytes, not str
Exception in thread Thread-4: Traceback (most recent call last): File ".\threading.py", line 532, in __bootstrap_inner File "./FTPSync.py", line 2584, in run
TypeError: 'NoneType' object is unsubscriptable
The error, however, is changed into: " Exception: argument 1 must be string without null bytes, not str "
Oh ... I think the problem is somewhere else, the thing is I have not ideal try-catch clause, give me a moment, I'll get back to you
Ok, I guess that was premature. As for mentions of this errors on the internet there aren't many, mostly concerning unescaped backslashes, but I don't think you have any in the config...
I changed the way config is parsed in f3920a0, did it help or is there still an issue?
I'm having the same issue