Skip to content

Silence exceptions when cluster is shutting down.#49

Closed
joaquincasares wants to merge 1 commit intoapache:masterfrom
joaquincasares:del_exceptions
Closed

Silence exceptions when cluster is shutting down.#49
joaquincasares wants to merge 1 commit intoapache:masterfrom
joaquincasares:del_exceptions

Conversation

@joaquincasares
Copy link
Copy Markdown
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
Copy Markdown
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