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.

UnicodeEncodeError: 'ascii' codec can't encode character

See original GitHub issue

I had this UnicodeEncodeError at the import_tables('List of cities in Italy') Googling gave this:

http://stackoverflow.com/questions/9942594/unicodeencodeerror-ascii-codec-cant-encode-character-u-xa0-in-position-20

Replacing this line: https://github.com/bcicen/wikitables/blob/master/wikitables/models.py#L70 with vals = [ p.value.encode('utf-8') for p in node.params if _is_int(p.name) ] fixed the issue. Sorry no PR.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bcicencommented, Jul 12, 2016

Thanks @Hunter-Github, I was able to replicate and have published the fixes in v0.3.2

0reactions
bcicencommented, Jul 13, 2016

great; thanks for the feedback!

Read more comments on GitHub >

github_iconTop 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 >
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 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 >
How To Fix Python Error - UnicodeEncodeError: 'ascii' codec ...
Fix – UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0′: · Set the Python encoding to UTF-8. · Set the environment variables correctly in...
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 >

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