8000 Silence exceptions when cluster is shutting down. by joaquincasares · Pull Request #49 · datastax/python-driver · GitHub
[go: up one dir, main page]

Skip to content

Silence exceptions when cluster is shutting down. #49

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

Closed

Conversation

joaquincasares
Copy link
Contributor

I'm not sure if this is the best patch, but I did notice that close() was called elsewhere so I figured just to check for variable existence. Worst case: it showcases where the exceptions on cluster.shutdown() were coming from.

Here are the exceptions that I was getting on a normal program exit:

Exception AttributeError: AttributeError("'NoneType' object has no attribute 'debug'",) in <bound method Session.__del__ of <cassandra.cluster.Session object at 0x10e50bc10>> ignored
Exception AttributeError: "'NoneType' object has no attribute 'debug'" in <bound method Cluster.__del__ of <cassandra.cluster.Cluster object at 0x10e4c8ad0>> ignored

I realized that log was None, much like:
https://github.com/datastax/python-driver/blob/master/cassandra/cluster.py#L1526

As were _loop_lock and ConnectionShutdown.

@thobbs
Copy link
Contributor
thobbs commented Apr 17, 2014

This should be fixed in the 2.0 branch now. The __del__() methods are gone, and proper cleanup is done on the event loop thread before interpreter shutdown.

@thobbs thobbs closed this Apr 17, 2014
stef1927 pushed a commit to stef1927/python-driver that referenced this pull request Mar 25, 2015
Fixed error in sample code in documentation
TheRealFalcon pushed a commit that referenced this pull request Jan 17, 2020
PYTHON-778: Implement serializers for the Graph String API
TheRealFalcon pushed a commit that referenced this pull request Feb 26, 2020
Remove temporarily the core engine graph documentation
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

Successfully merging this pull request may close these issues.

2 participants
0