raven-python icon indicating copy to clipboard operation
raven-python copied to clipboard

raven test from heroku fails: UnicodeEncodeError

Open zvolsky opened this issue 7 years ago • 1 comments

heroku run python manage.py raven test

DEBUG 2018-04-27 13:41:08,384 base 4 139759264282368 Configuring Raven for host: https://sentry.io
DEBUG 2018-04-27 13:41:08,388 base 4 139759264282368 Configuring Raven for host: https://sentry.io
Client configuration:
  base_url       : https://sentry.io
  project        : 1197396
  public_key     : xxxxxx
  secret_key     : xxxxxx

Sending a test message... DEBUG 2018-04-27 13:41:09,934 base 4 139759264282368 Sending message of length 3357 to https://sentry.io/api/1197396/store/
Event ID was '1224cb389f594716bfcc4d52ca756fe6'
ERROR 2018-04-27 13:41:09,948 base 4 139759007602432 Sentry responded with an error: 'ascii' codec can't encode characters in position 17-18: ordinal not in range(128) (url: https://sentry.io/api/1197396/store/)
Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.6/site-packages/raven/transport/threaded.py", line 165, in send_sync
    super(ThreadedHTTPTransport, self).send(url, data, headers)
  File "/app/.heroku/python/lib/python3.6/site-packages/raven/transport/http.py", line 43, in send
    ca_certs=self.ca_certs,
  File "/app/.heroku/python/lib/python3.6/site-packages/raven/utils/http.py", line 66, in urlopen
    return opener.open(url, data, timeout)
  File "/app/.heroku/python/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/app/.heroku/python/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/app/.heroku/python/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/app/.heroku/python/lib/python3.6/site-packages/raven/utils/http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "/app/.heroku/python/lib/python3.6/urllib/request.py", line 1318, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/app/.heroku/python/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/app/.heroku/python/lib/python3.6/http/client.py", line 1250, in _send_request
    self.putrequest(method, url, **skips)
  File "/app/.heroku/python/lib/python3.6/site-packages/raven/breadcrumbs.py", line 372, in putrequest
    return real_putrequest(self, method, url, *args, **kwargs)
  File "/app/.heroku/python/lib/python3.6/http/client.py", line 1117, in putrequest
    self._output(request.encode('ascii'))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 17-18: ordinal not in range(128)
ERROR 2018-04-27 13:41:09,951 base 4 139759007602432 ['This is a test message generated using ``raven test``']

zvolsky avatar Apr 27 '18 11:04 zvolsky

raven==6.7.0

zvolsky avatar Apr 27 '18 11:04 zvolsky