You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python main.py
Traceback (most recent call last):
File "main.py", line 42, in
aggregateFactor.aggregate(stockCode, grab_time)
File "/Users/linkerlin/gits/pyspider-stock/east_sentiment/aggregateFactor.py", line 22, in aggregate
for result in documents['result']:
TypeError: 'CommandCursor' object has no attribute 'getitem'
The text was updated successfully, but these errors were encountered:
coll2 = db[date+'SentimentFactor']
for result in documents['result']:
coll2.insert_one({
"sentiment_factor": result['sentiment_factor'],
"last_date": date
})
问题出在for 这一行。 documents[]的写法貌似不对
$ python main.py
Traceback (most recent call last):
File "main.py", line 42, in
aggregateFactor.aggregate(stockCode, grab_time)
File "/Users/linkerlin/gits/pyspider-stock/east_sentiment/aggregateFactor.py", line 22, in aggregate
for result in documents['result']:
TypeError: 'CommandCursor' object has no attribute 'getitem'
The text was updated successfully, but these errors were encountered: