-1

I am using mongodb with python but when I implementing bsonnumpy with aggregation, it is giving error as "bsonnumpy.error: unsupported BSON type: Null"

import numpy as np

import bsonnumpy as bn

import pymongo

data_pipe = [{'$match': {'_id': {'$in': results['hash']}}}]

dtype = np.dtype([('_id', np.int64), ('n', np.double)]) data_results = bn.sequence_to_ndarray(coll_analysis.aggregate_raw_batches(data_pipe), dtype, coll_analysis.count())

I have installed bsonnumpy=="0.1". Can anyone suggest how could I resolve this error?

put on hold as off-topic by Izzy Aug 13 at 23:29

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.