reminiscence icon indicating copy to clipboard operation
reminiscence copied to clipboard

'ascii' codec can't encode character

Open sah1376 opened this issue 6 years ago • 7 comments

When I add a link, when I try ro read the page it returns an error

'ascii' codec can't encode character '\u2026' in position 8422: ordinal not in range(128)

Full error log here

Using the Chrome-HTML option works fine.

I've had a search, but cant find anything relating, so any suggestions welcome!

sah1376 avatar Dec 29 '18 09:12 sah1376

It seems default HTTP client failed to recognize character encoding scheme. If possible, can you provide the link to the webpage?

kanishka-linux avatar Dec 30 '18 11:12 kanishka-linux

This has happened on sites I have tried so far except 1 or 2.

This is one that produces the error:

https://stackoverflow.com/questions/38882721/python3-unicodeencodeerror-ascii-codec-cant-encode-character-xfc

This page works fine:

http://ubuntuhandbook.org/index.php/2017/07/install-python-3-6-1-in-ubuntu-16-04-lts/

but this doesn't:

http://ubuntuhandbook.org/

sah1376 avatar Dec 30 '18 15:12 sah1376

Thanks for links.

All the above links are working fine on my setup.

Can you mention distro and python version? Are you using git master branch or v0.2.1 release? I'm not able to access the log. Lot of things have been fixed in master branch since last release.

For better experience, you can consider ubuntu 18.04 LTS or anything based on it and then in settings.py file modify VINANTI_BACKEND = ' urllib' to VINANTI_BACKEND = 'aiohttp'.

If you're comfortable with docker, then it will take care of most of the things including settings.

kanishka-linux avatar Dec 30 '18 17:12 kanishka-linux

Ubuntu 16.04 lxc container, python 3.6.7, git master branch.

Here's a fresh log link

I'll try 18.04 and those settings. Docker is not really an option unfortunately as I'm using containers in proxmox.

Thanks for your help!

sah1376 avatar Dec 30 '18 17:12 sah1376

I had the same issue. I am running python 3.8.1 on Arch Linux. The archiving does not work for the webpages on Matters.

example

If I have to guess, it is the cjk characters messing up with codecs? I have zero knowledge with that tho.

Thanks again for your help.

zoenglinghou avatar Dec 27 '19 20:12 zoenglinghou

I was thinking may be it was due to some mismatch between python version and associated dependencies on some linux distros. But still not sure about exact cause, since it is difficult to reproduce the bug.

kanishka-linux avatar Dec 28 '19 17:12 kanishka-linux

I've also tested the link posted by you. It is working fine on my setup.

kanishka-linux avatar Dec 28 '19 18:12 kanishka-linux