mfuentesg/SyncSettings

Failed to do a "Create and Upload" - in Ubuntu 20.04 Sublime Text

chaicopadillag opened this issue ยท 10 comments

WARNING:Sync Settings.sync_settings.libs.logger:{'documentation_url': 'https://developer.github.com/v3/gists/#create-a-gist', 'message': 'Problems parsing JSON'}
ERROR:Sync Settings.sync_settings.libs.logger:Unexpected Error, Reason: Problems parsing JSON
Traceback (most recent call last):
File "/home/gerard/.config/sublime-text-3/Installed Packages/Sync Settings.sublime-package/sync_settings/commands/create_and_upload.py", line 45, in create
).create(data)
File "/home/gerard/.config/sublime-text-3/Installed Packages/Sync Settings.sublime-package/sync_settings/libs/gist.py", line 36, in auth_wrapper
return func(self, *args, **kwargs)
File "/home/gerard/.config/sublime-text-3/Installed Packages/Sync Settings.sublime-package/sync_settings/libs/gist.py", line 66, in create
return self.__do_request('post', self.make_uri(), data=sublime.encode_value(data, True)).json()
File "/home/gerard/.config/sublime-text-3/Installed Packages/Sync Settings.sublime-package/sync_settings/libs/gist.py", line 104, in __do_request
raise UnexpectedError('Unexpected Error, Reason: {}'.format(response.json()['message']))
Sync Settings.sync_settings.libs.gist.UnexpectedError: Unexpected Error, Reason: Problems parsing JSON

@TheSecEng ^

Fix in the pipeline

Just FYI, this issue is because we moved from json to sublime functions. JSON ensured ASCII characters. Gist API requires valid JSON, and valid JSON requires UTF-8. We will have to add a encode("UTF-8") before posting to Gist

@codecodero i have created a new version along to @TheSecEng to solve this issue, please once this is available in package control, let me know if it solves your issue.

Just FYI, this issue is because we moved from json to sublime functions. JSON ensured ASCII characters. Gist API requires valid JSON, and valid JSON requires UTF-8. We will have to add a encode("UTF-8") before posting to Gist

Hello greetings from Peru, I just installed in Windows 10 and I still have the same problem, the UFT-8 that you mention in part is configured, since it is not mentioned in the plugin documentation
๐Ÿ‘‡
{
// Brings write permission to Sync Settings over your gists (edit, delete and create).
// This option is not required, if you only want to download your backups
"access_token": "",

// Identifier of your backup on gist.github.com.
"gist_id": "",

// In simple words, this option is a black list. Which means, every file
// that match with the defined pattern, will be ignored on sync.
"excluded_files": [
    "*.dmg",
    "*.DS_Store*",
    "*.exe",
    "*.Spotlight-V100",
    "*.Trashes",
    "*ehthumbs.db",
    "*oscrypto-ca-bundle.crt",
    "*Package Control.cache/*",
    "*Package Control.last-run",
    "*Package Control.merged-ca-bundle",
    "*Package Control.system-ca-bundle",
    "*Package Control.user-ca-bundle",
    "*Thumbs.db"
],

// An HTTP proxy server to use for requests.
"http_proxy": "",

// An HTTPS proxy server to use for requests.
"https_proxy": "",

// In simple words, this option is a white list. Which means, every file that
// match with the defined pattern, will be included on sync, even if it was
// included on `excluded_files` option.
"included_files": [],

// If is `true`, your settings will be synced with the latest settings on
// gist.github.com when Sublime Text startup
"auto_upgrade": false

}

imagen

Hey @codecodero new version has not been upgraded in package control . Wait for version v3.0.8.

Hey @codecodero new version has not been upgraded in package control . Wait for version v3.0.8.

Thanks for warning, I installed it from the GitHub repository and was able to gist my Sublime Text settings. SUCCESSS!!!!

This plugin is amazing, ๐Ÿ‘Œ๐Ÿ™Œ

@codecodero good to read it.

Eres bienvenido a contribuir cuando quieras!

Saludos desde Chile

@codecodero done. Please let me know if everything is ok. If yes, please close this issue.

Fixed