Description of problem: Tried to paste an image from URL that is not ASCII. To be specific, this one: http://姫路城.blog.so-net.ne.jp/_images/blog/_a90/xn--uisz2cnx0g/E5A7ABE8B7AFE59F8E20E6B7B7E99B9120E5B9B3E697A5.jpg I think the issue is known to the Anki developer. Version-Release number of selected component: anki-2.0.33-1.fc23 Additional info: reporter: libreport-2.6.4 cmdline: python /usr/bin/anki dso_list: python-libs-2.7.10-8.fc23.x86_64 executable: /usr/bin/anki kernel: 4.3.5-300.fc23.x86_64 runlevel: N 5 type: Python uid: 1000 Truncated backtrace: httplib.py:1028:putheader:UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-8: ordinal not in range(128) Traceback (most recent call last): File "/usr/share/anki/aqt/editor.py", line 998, in keyPressEvent self.onPaste() File "/usr/share/anki/aqt/editor.py", line 1017, in onPaste mime = self.mungeClip() File "/usr/share/anki/aqt/editor.py", line 1073, in mungeClip mime = self._processMime(mime) File "/usr/share/anki/aqt/editor.py", line 1102, in _processMime return self._processHtml(mime) File "/usr/share/anki/aqt/editor.py", line 1163, in _processHtml newHtml += self.editor.urlToLink(url) File "/usr/share/anki/aqt/editor.py", line 799, in urlToLink fname = self.urlToFile(url) File "/usr/share/anki/aqt/editor.py", line 817, in urlToFile return self._retrieveURL(url) File "/usr/share/anki/aqt/editor.py", line 842, in _retrieveURL filecontents = urllib2.urlopen(req).read() File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/usr/lib64/python2.7/urllib2.py", line 449, in _open '_open', req) File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/usr/lib64/python2.7/urllib2.py", line 1229, in http_open return self.do_open(httplib.HTTPConnection, req) File "/usr/lib64/python2.7/urllib2.py", line 1196, in do_open h.request(req.get_method(), req.get_selector(), req.data, headers) File "/usr/lib64/python2.7/httplib.py", line 1053, in request self._send_request(method, url, body, headers) File "/usr/lib64/python2.7/httplib.py", line 1092, in _send_request self.putheader(hdr, value) File "/usr/lib64/python2.7/httplib.py", line 1028, in putheader values = [str(v) for v in values] UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-8: ordinal not in range(128) Local variables in innermost frame: header: 'Host' self: <httplib.HTTPConnection instance at 0x7f3fafe2de60> values: (u'\xe5\xa7\xab\xe8\xb7\xaf\xe5\x9f\x8e.blog.so-net.ne.jp',) v: u'\xe5\xa7\xab\xe8\xb7\xaf\xe5\x9f\x8e.blog.so-net.ne.jp'
Created attachment 1134760 [details] File: backtrace
Created attachment 1134761 [details] File: environ
As noted, this issue is tracked upstream: https://anki.tenderapp.com/discussions/ankidesktop/17132-anki-reports-an-error-when-pasting-an-image-from-non-ascii-url Unfortunately, it is not yet solved in the upcoming release 2.0.36.