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

Fix for python 2.7: Exception AttributeError: "'list' object has no a… #54

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

penfree
Copy link

@penfree penfree commented May 28, 2019

AttributeError: 'list' object has no attribute 'clear'
Exception AttributeError: "'list' object has no attribute 'clear'" in 'rocksdb._rocksdb.DB.dealloc' ignored

…ttribute 'clear'" in 'rocksdb._rocksdb.DB.__dealloc__' ignored
@iFA88
Copy link

iFA88 commented May 28, 2019

Hi.
del variable[:] Should be the correct method for .clear(), and then is python 2 compatible.

…ttribute 'clear'" in 'rocksdb._rocksdb.DB.__dealloc__' ignored
@iFA88
Copy link

iFA88 commented May 28, 2019

>>> data = [1,2,3]
>>> ptr = data
>>> del data[:]
>>> ptr.append(4)
>>> data
[4]
>>> 
>>> 
>>> data = [1,2,3]
>>> ptr = data
>>> data = []
>>> ptr.append(4)
>>> data
[]

…ttribute 'clear'" in 'rocksdb._rocksdb.DB.__dealloc__' ignored
@penfree
Copy link
Author

penfree commented May 28, 2019

Hi.
del variable[:] Should be the correct method for .clear(), and then is python 2 compatible.

ok, i have modified

@oersted
Copy link

oersted commented Jun 19, 2019

Is there an alternative to properly deallocate the DB object in Python 2 from outside until this is released?

@penfree
Copy link
Author

penfree commented Oct 18, 2019

Is there an alternative to properly deallocate the DB object in Python 2 from outside until this is released?

pip install -U https://github.com/penfree/python-rocksdb/archive/master.zip

you can just use my branch or fork and fix it before new release

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.

3 participants