opbeat_python
opbeat_python copied to clipboard
Activating logging=True in Flask cause errors
Hi,
I wanted to have Opbeat log to a file, so I initialized it like this :
opbeat_client = Opbeat(
app,
organization_id=ID',
app_id='ID2',
secret_token='TOKEN',
logging=True
)
But the flask dev server printed this message and then nothing while still serving content :
Unable to reach Opbeat server: <urlopen error [Errno 2] _ssl.c:510: The operation did not complete (read)> (url: https://intake.opbeat.com/api/v1/organizations/ID/apps/ID2/errors/)
Failed to submit message: u'Loaded extension app.configuration.extensions.opbeat_ext'
Traceback (most recent call last):
File "/home/mustak_n/dev/envs/massive2/local/lib/python2.7/site-packages/opbeat/transport/http.py", line 90, in send_sync
url = HTTPTransport.send(self, data, headers)
File "/home/mustak_n/dev/envs/massive2/local/lib/python2.7/site-packages/opbeat/transport/http.py", line 63, in send
raise TransportException(message, data, print_trace=print_trace)
TransportException: Unable to reach Opbeat server: <urlopen error [Errno 2] _ssl.c:510: The operation did not complete (read)> (url: https://intake.opbeat.com/api/v1/organizations/ID/apps/ID2/errors/)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/mustak_n/dev/envs/massive2/local/lib/python2.7/site-packages/opbeat/contrib/async_worker.py", line 141, in _target
self._queue.task_done()
File "/usr/lib/python2.7/Queue.py", line 64, in task_done
raise ValueError('task_done() called too many times')
ValueError: task_done() called too many times
Any ideas ? Thanks !