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

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 106-107: ordinal not in range(256) #164

Closed monnerHenster closed 4 years ago

monnerHenster commented 4 years ago

ERROR:Sync Settings.sync_settings.libs.logger:'latin-1' codec can't encode characters in position 106-107: ordinal not in range(256) Traceback (most recent call last): File "D:\软件\sublime Text\Data\Installed Packages\Sync Settings.sublime-package\sync_settings/commands/create_and_upload.py", line 45, in create ).create(data) File "D:\软件\sublime Text\Data\Installed Packages\Sync Settings.sublime-package\sync_settings/libs/gist.py", line 36, in auth_wrapper return func(self, *args, kwargs) File "D:\软件\sublime Text\Data\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 "D:\软件\sublime Text\Data\Installed Packages\Sync Settings.sublime-package\sync_settings/libs/gist.py", line 92, in do_request response = getattr(requests, verb)(url, headers=self.headers, proxies=self.proxies, kwargs) File "D:\软件\SUBLIM~2\Data\Packages\requests\all\requests\api.py", line 112, in post return request('post', url, data=data, json=json, kwargs) File "D:\软件\SUBLIM~2\Data\Packages\requests\all\requests\api.py", line 58, in request return session.request(method=method, url=url, kwargs) File "D:\软件\SUBLIM~2\Data\Packages\requests\all\requests\sessions.py", line 522, in request resp = self.send(prep, send_kwargs) File "D:\软件\SUBLIM~2\Data\Packages\requests\all\requests\sessions.py", line 642, in send r = adapter.send(request, kwargs) File "D:\软件\SUBLIM~2\Data\Packages\requests\all\requests\adapters.py", line 439, in send timeout=timeout File "D:\软件\SUBLIM~2\Data\Packages\requests\all\requests\packages\urllib3\connectionpool.py", line 600, in urlopen chunked=chunked) File "D:\软件\SUBLIM~2\Data\Packages\requests\all\requests\packages\urllib3\connectionpool.py", line 356, in _make_request conn.request(method, url, **httplib_request_kw) File "./python3.3/http/client.py", line 1065, in request File "./python3.3/http/client.py", line 1102, in _send_request UnicodeEncodeError: 'latin-1' codec can't encode characters in position 106-107: ordinal not in range(256)

marcovirtual commented 4 years ago

The same is happenning to me.

sublime_text_mopOjDdDRw

The plugin was working fine until this weekend. Maybe something in the last update broke it? 🤔

Help pls!

mfuentesg commented 4 years ago

@TheSecEng ^

TerminalFi commented 4 years ago

Looking into this.

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

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.

mfuentesg commented 4 years ago

@marcovirtual can you confirm if the issue is fixed? If yes, please close this issue.

marcovirtual commented 4 years ago

Thank you @mfuentesg and @TheSecEng, I can confirm the issue has been resolved on my machines!

Unfortunately as I'm not the one who opened the issue, I see no option to close it. Pinging @monnerHenster

mfuentesg commented 4 years ago

Fixed