-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
The following code:
from pymongoarrow.monkey import patch_all patch_all() from pymongoarrow.api import Schema schema = Schema({'_id': int, 'measure': float, 'status': pyarrow.string(), 'installed_on': datetime}) df_a = col.aggregate_pandas_all([{'$match':{'status':'active'}}], schema=schema) df_a df_a = col.aggregate_pandas_all([{'$match':{'status':'active'}}])
Raises this error:
Traceback (most recent call last): File "/Users/julius/source.py", line 60, in <module> df_a = col.aggregate_pandas_all([{'$match':{'status':'active'}}]) File "/Users/julius/Work/mongo-arrow/bindings/python/pymongoarrow/api.py", line 192, in aggregate_pandas_all return _arrow_to_pandas(aggregate_arrow_all(collection, pipeline, schema=schema, **kwargs)) File "/Users/julius/Work/mongo-arrow/bindings/python/pymongoarrow/api.py", line 133, in aggregate_arrow_all pipeline.append({"$project": schema._get_projection()}) AttributeError: 'NoneType' object has no attribute '_get_projection'