question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

3.0.2 breaks sublime theme, plugins - AttributeError: 'bytes' object has no attribute 'encode'

See original GitHub issue

After updating from 3.0.1 to 3.0.2 my theme is all messed up and plugins not working.

  • SyncSettings: 3.0.2
  • Sublime: 3189
  • macOS 10.14.3

The console is show lots of errors for Sync Settings after it updated:

Traceback (most recent call last):
  File "/Users/samm/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/sync_manager.py", line 88, in update_files
    edit_content(name, file['content'])
  File "/Users/samm/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/sync_manager.py", line 28, in edit_content
    file_content = content.encode('utf-8', errors='ignore')
AttributeError: 'bytes' object has no attribute 'encode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./python3.3/logging/__init__.py", line 941, in emit
UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 154: ordinal not in range(128)
Logged from file sync_manager.py, line 90
Traceback (most recent call last):
  File "/Users/samm/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/sync_manager.py", line 88, in update_files
    edit_content(name, file['content'])
  File "/Users/samm/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/sync_manager.py", line 28, in edit_content
    file_content = content.encode('utf-8', errors='ignore')
AttributeError: 'bytes' object has no attribute 'encode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./python3.3/logging/__init__.py", line 941, in emit
UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 154: ordinal not in range(128)
Logged from file sync_manager.py, line 90
Traceback (most recent call last):
  File "/Users/samm/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/sync_manager.py", line 88, in update_files
    edit_content(name, file['content'])
  File "/Users/samm/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/sync_manager.py", line 28, in edit_content
    file_content = content.encode('utf-8', errors='ignore')
AttributeError: 'bytes' object has no attribute 'encode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./python3.3/logging/__init__.py", line 941, in emit
UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 157: ordinal not in range(128)
Logged from file sync_manager.py, line 90
Traceback (most recent call last):
  File "/Users/samm/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/sync_manager.py", line 88, in update_files
    edit_content(name, file['content'])
  File "/Users/samm/Library/Application Support/Sublime Text 3/Installed Packages/Sync Settings.sublime-package/sync_settings/sync_manager.py", line 28, in edit_content
    file_content = content.encode('utf-8', errors='ignore')
AttributeError: 'bytes' object has no attribute 'encode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./python3.3/logging/__init__.py", line 941, in emit
UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 154: ordinal not in range(128)
Logged from file sync_manager.py, line 90

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:27 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
sammcjcommented, Feb 28, 2019

It works! It all appears to work!

Thank you so much @mfuentesg 🍻

1reaction
mfuentesgcommented, Feb 27, 2019

Check your package control settings, and remove sync settings from your “pre release”. Then run the command “show logs” and paste the file content here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError:'bytes' object has no attribute 'encode'
chr returns a string that gets multiplied and encoded as bytes. The problem here is that text is bytes. How are you calling...
Read more >
AttributeError: 'bytes' object has no attribute 'encode' · Issue #62
Hello,. I got this exception when importing SRU : Traceback (most recent call last): File "<stdin>", line 1, in <module> File ...
Read more >
Sending mails with attachment results in 'bytes' object has no ...
When trying to send a EMail with attachment, it always failed with the following Exception: 'bytes' object has no attribute 'encode'.
Read more >
I upgraded from Python 2.7 to 3.6 and I broke my ability to ...
AttributeError : 'bytes' object has no attribute 'encode' ... When I don't encode it breaks at the return statement of this function:
Read more >
Bug listing with status UNCONFIRMED as at 2022/12/22 02 ...
... Bug:541516 - "www-apps/roundup-1.5.0 - AttributeError: 'module' object has no attribute 'PKCS5_SALT_LEN'" status:UNCONFIRMED resolution: severity:normal ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found