python-slack-sdk icon indicating copy to clipboard operation
python-slack-sdk copied to clipboard

Unexpected error: 'latin-1' codec can't encode character '\u201c'

Open s1ddok opened this issue 9 months ago • 1 comments

Getting

Unexpected error validating channel: 'latin-1' codec can't encode character '\u201c' in position 7: ordinal not in range(256)

during this call:

response = client.conversations_info(channel=channel_name_or_id)

I've printed the variable char by char and am sure it doesn't contain and quotation marks.

s1ddok avatar May 26 '25 11:05 s1ddok

Hi @s1ddok 👋🏻

I think you're correct to be looking for quotation marks. This appears to be a common error when a strong is surrounded by instead of ". Sometimes this happens when copying & pasting from outside a code editor (e.g. Slack message or Google Docs). A few people with similar issues were here and here.

Can you check that your channel_name_or_id doesn't contain any quotes? You may also want to check your exported API Tokens.

mwbrooks avatar May 26 '25 19:05 mwbrooks

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

github-actions[bot] avatar Jun 30 '25 00:06 github-actions[bot]

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

github-actions[bot] avatar Jul 14 '25 00:07 github-actions[bot]