Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When unable to connect to AWS Cloudwatch, AttributeError: 'CloudWatchLogsHandler' object has no attribute 'sink' when shutting down logbeam handler #3

Open
terrisgit opened this issue Jan 24, 2018 · 0 comments

Comments

@terrisgit
Copy link

If you create a logbeam logging handler on a machine that has no Internet access, an error like the following occurs while the application closes:

Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/terris/science37/edc-export-service/edcexport/main.py", line 16, in
EDCExportService().start()
File "/Users/terris/science37/edc-export-service/edcexport/edcexport.py", line 75, in start
loop.run_forever()
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 421, in run_forever
self._run_once()
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 1395, in _run_once
event_list = self._selector.select(timeout)
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/selectors.py", line 577, in select
kev_list = self._kqueue.control(None, max_ev, timeout)
KeyboardInterrupt
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.4_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/logging/init.py", line 1944, in shutdown
h.close()
File "/Users/terris/venv/edc/lib/python3.6/site-packages/logbeam/init.py", line 160, in close
self.sink.shutdown()
AttributeError: 'CloudWatchLogsHandler' object has no attribute 'sink'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant