mfuentesg / SyncSettings

Sync Settings - The cross-platform solution to keep Sublime Text configuration synchronized
https://mfuentesg.dev/SyncSettings
MIT License
288 stars 38 forks source link

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

Closed chaicopadillag closed 4 years ago

chaicopadillag commented 4 years ago

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

mfuentesg commented 4 years ago

@TheSecEng ^

TerminalFi commented 4 years ago

Fix in the pipeline

TerminalFi commented 4 years ago

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

mfuentesg commented 4 years ago

@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.

chaicopadillag commented 4 years ago

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

mfuentesg commented 4 years ago

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

chaicopadillag commented 4 years ago

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, 👌🙌

mfuentesg commented 4 years ago

@codecodero good to read it.

Eres bienvenido a contribuir cuando quieras!

Saludos desde Chile

mfuentesg commented 4 years ago

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

mfuentesg commented 4 years ago

Fixed