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

bson can't dump python array as root element #67

Open
sweco-secfbr opened this issue Oct 2, 2017 · 4 comments
Open

bson can't dump python array as root element #67

sweco-secfbr opened this issue Oct 2, 2017 · 4 comments
Labels

Comments

@sweco-secfbr
Copy link

AttributeError: 'list' object has no attribute 'keys'

@Parkayun Parkayun added the bug label Oct 2, 2017
@LVSant
Copy link

LVSant commented May 29, 2019

Still happening in version 0.5.8

@Parkayun
Copy link
Member

Anyone attach sample?

@heregoesmarcel
Copy link

A minimal example would be:
bson.dumps(list())

It directly fails with the previously mentioned error message.

@Parkayun
Copy link
Member

Parkayun commented Dec 20, 2019

For if anyone got interested in solve this issue.
bson doesn't support array object exactly. (See bsonspec.org)
But, they support another way like convert to dict with seq number.
This package needs, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants