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.

character maps to <undefined>

See original GitHub issue

Operating System: Windows Python: 3.10.2

Doing promnesia index on a folder of .md files resulted in multiple character maps to <undefined> errors.

They seem to be files with emojis like 🤝 or 🔁 characters like “ instead of "

What might be a good way of dealing with this?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mdroidiancommented, Mar 7, 2022

So I may have found the solution. Python: Use the UTF-8 mode on Windows

I can confirm that using set PYTHONUTF8=1 in Command Prompt, or $Env:PYTHONUTF8="1" in PowerShell also seems to fix the error for me. 😊

1reaction
mdroidiancommented, Mar 5, 2022

~200 files. Only minor annoyance currently.

While knowing that not all of my URLS are indexed would be a deal breaker long term, I have a TON of URLs in other sources (like Todoist), so I still need to build out those sources, which will take awhile. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - UnicodeEncodeError: 'charmap' codec can't encode
UnicodeEncodeError: 'charmap' codec can't encode - character maps to <undefined>, print function [duplicate] · 2. Related: Python, Unicode, and the Windows ...
Read more >
character maps to <undefined> [Help] : r/learnpython - Reddit
character maps to <undefined > [Help]. I have a CSV file and i'm trying write it to console. File: YGS,Matematik,Sayılar,0.
Read more >
UnicodeEncodeError: 'charmap' codec can't encode character ...
UnicodeEncodeError: 'charmap' codec can't encode character u'\u2026' in position 139: character maps to <undefined> #1. Open. baditaflorin opened this issue on ...
Read more >
'charmap' codec can't encode characters in position 0-14 ...
Hi! How to solve "UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-14: character maps to " for this code: stockList ...
Read more >
'charmap' codec can't decode byte 0xX in position X: character ...
UnicodeDecodeError: 'charmap' codec can't decode byte 0xX in position X: character maps to undefined, when trying to #open() and print() a ...
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