UnicodeEncodeError: 'ascii' codec can't encode character '\xa9' in position 84
See original GitHub issueTraceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 389, in run_callback
expr()
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 620, in <lambda>
run_callback('on_hover', callback, lambda: callback.on_hover(v, point, hover_zone))
File "/Users/user/Library/Application Support/Sublime Text 3/Packages/SourceKittenSubl/subl.py", line 35, in on_hover
text = subl_source_kitten.popup(point, file, project_directory, text)
File "/Users/user/Library/Application Support/Sublime Text 3/Packages/SourceKittenSubl/dependencies/../src/subl_source_kitten.py", line 22, in popup
output = source_kitten.cursor_info(offset, file, project_directory, text)
File "/Users/user/Library/Application Support/Sublime Text 3/Packages/SourceKittenSubl/dependencies/../src/source_kitten.py", line 49, in cursor_info
tmp_file = _create_temp_file(text)
File "/Users/user/Library/Application Support/Sublime Text 3/Packages/SourceKittenSubl/dependencies/../src/source_kitten.py", line 163, in _create_temp_file
text_file.write(text)
UnicodeEncodeError: 'ascii' codec can't encode character '\xa9' in position 84: ordinal not in range(128)
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
UnicodeEncodeError: 'ascii' codec can't encode character u ...
The issue is that when you call str(), python uses the default character encoding to try and encode the bytes you gave it,...
Read more >'ascii' codec can't encode character in position | bobbyhadz
The Python "UnicodeEncodeError: 'ascii' codec can't encode character in position" occurs when we use the ascii codec to encode a string that contains ......
Read more >Fix Python UnicodeEncodeError: 'ascii' codec can't encode ...
The UnicodeEncodeError we reproduced earlier, is caused due to the fact that when str() method is called, the interpreter will use the default...
Read more >'ascii' codec can't encode character '\xe9' in position ... - GitHub
Description. UnicodeEncodeError: 'ascii' codec can't encode character '\xe9'. Expected behavior. No response. pip version.
Read more >How To Fix Python Error - UnicodeEncodeError: 'ascii' codec ...
This is a very common error UnicodeEncodeError: 'ascii' codec can't encode character u'xa0' in position x.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue should be fixed in 08d213e (one of the commits from PR #26.)
The solution was to convert to UTF-8 and store the temporary file as binary.
I was referring to
indexing: crawldb not available, indexing abandoned
Ok… That’s good to see the tests pass I guess. Suggests something is different between our Sublime Text setups affecting it.
Could you paste in your preferences file? Might also be worth checking any other plugins you have installed but I’m not sure how’s best to check them without uninstalling them 1 by 1 which I’d understand if you didn’t want to do that.
(re ps: cheers, guess I never tried 😊 I’ll log it)