Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

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

Open
penfree wants to merge 3 commits into
twmht:master from
penfree:master
Open

Fix for python 2.7: Exception AttributeError: "'list' object has no a... #54
penfree wants to merge 3 commits into
twmht:master from
penfree:master

Conversation

@penfree

@penfree penfree commented May 28, 2019

Copy link
Copy Markdown

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 commented May 28, 2019

Copy link
Copy Markdown

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 commented May 28, 2019

Copy link
Copy Markdown
>>> 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 commented May 28, 2019

Copy link
Copy Markdown
Author

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

ok, i have modified

iFA88 reacted with thumbs up emoji

oersted commented Jun 19, 2019

Copy link
Copy Markdown

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

penfree commented Oct 18, 2019

Copy link
Copy Markdown
Author

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.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /