热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

pyspider+mongodb部署有问题

如题pyspider-cconfig.json后报错:

如题 pyspider -c config.json 后报错:



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[W 151225 17:29:08 run:398] phantomjs not found, continue running without it.

[I 151225 17:29:10 result_worker:49] result_worker starting...

[I 151225 17:29:11 tornado_fetcher:429] fetcher starting...

[I 151225 17:29:11 scheduler:453] loading projects

[I 151225 17:29:11 processor:208] processor starting...

Exception AttributeError: "'Cursor' object has no attribute '_Cursor__id'" in > ignored

[E 151225 17:29:11 scheduler:463] __init__() got an unexpected keyword argument 'fields'

    Traceback (most recent call last):

      File "/root/miniconda2/lib/python2.7/site-packages/pyspider/scheduler/scheduler.py", line 458, in run

        self.run_once()

      File "/root/miniconda2/lib/python2.7/site-packages/pyspider/scheduler/scheduler.py", line 442, in run_once

        self._update_projects()

      File "/root/miniconda2/lib/python2.7/site-packages/pyspider/scheduler/scheduler.py", line 84, in _update_projects

        for project in self.projectdb.check_update(self._last_update_project):

      File "/root/miniconda2/lib/python2.7/site-packages/pyspider/database/mongodb/projectdb.py", line 61, in check_update

        for project in self.get_all(fields=('updatetime', 'name')):

      File "/root/miniconda2/lib/python2.7/site-packages/pyspider/database/mongodb/projectdb.py", line 49, in get_all

        for each in self.collection.find({}, fields=fields):

      File "/root/miniconda2/lib/python2.7/site-packages/pymongo/collection.py", line 1137, in find

        return Cursor(self, *args, **kwargs)

    TypeError: __init__() got an unexpected keyword argument 'fields'

Exception AttributeError: "'Cursor' object has no attribute '_Cursor__id'" in > ignored

[E 151225 17:29:11 scheduler:463] __init__() got an unexpected keyword argument 'fields'

    Traceback (most recent call last):

      File "/root/miniconda2/lib/python2.7/site-packages/pyspider/scheduler/scheduler.py", line 458, in run

        self.run_once()

      File "/root/miniconda2/lib/python2.7/site-packages/pyspider/scheduler/scheduler.py", line 442, in run_once

        self._update_projects()

      File "/root/miniconda2/lib/python2.7/site-packages/pyspider/scheduler/scheduler.py", line 84, in _update_projects

        for project in self.projectdb.check_update(self._last_update_project):

      File "/root/miniconda2/lib/python2.7/site-packages/pyspider/database/mongodb/projectdb.py", line 61, in check_update

        for project in self.get_all(fields=('updatetime', 'name')):

      File "/root/miniconda2/lib/python2.7/site-packages/pyspider/database/mongodb/projectdb.py", line 49, in get_all

        for each in self.collection.find({}, fields=fields):

      File "/root/miniconda2/lib/python2.7/site-packages/pymongo/collection.py", line 1137, in find

        return Cursor(self, *args, **kwargs)

    TypeError: __init__() got an unexpected keyword argument 'fields'



   



推荐阅读
author-avatar
mobiledu2502910203
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有