Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants