Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

got error when starting the webui #979

Open
shanhai3000 opened this issue Apr 4, 2022 · 7 comments
Open

got error when starting the webui #979

shanhai3000 opened this issue Apr 4, 2022 · 7 comments

Comments

@shanhai3000
Copy link

[W 220404 15:02:18 run:413] phantomjs not found, continue running without it.
[I 220404 15:02:20 result_worker:49] result_worker starting...
[I 220404 15:02:20 processor:211] processor starting...
[I 220404 15:02:20 tornado_fetcher:638] fetcher starting...
[I 220404 15:02:20 scheduler:647] scheduler starting...
[I 220404 15:02:20 scheduler:782] scheduler.xmlrpc listening on 127.0.0.1:23333
[I 220404 15:02:20 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0
[I 220404 15:02:20 app:84] webui exiting...
Traceback (most recent call last):
File "/usr/local/Caskroom/miniconda/base/envs/web/bin/pyspider", line 8, in
sys.exit(main())
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/run.py", line 754, in main
cli()
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 1637, in invoke
super().invoke(ctx)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/run.py", line 165, in cli
ctx.invoke(all)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/run.py", line 497, in all
ctx.invoke(webui, **webui_config)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/run.py", line 384, in webui
app.run(host=host, port=port)
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/webui/app.py", line 59, in run
from .webdav import dav_app
File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/webui/webdav.py", line 207, in
'/': ScriptProvider(app)
TypeError: Can't instantiate abstract class ScriptProvider with abstract methods get_resource_inst

@liuchengts
Copy link

我遇到了类似的问题,启动webui提示找不到字典

@yca
Copy link

yca commented Apr 26, 2022

I have the same problem as well. My environment is:

  • Ubuntu 20.04
  • Python 3.6 installed from ppa:deadsnakes (alongside with default Python3.8 package)
  • Python development libraries are installed
  • Running in a virtual environment

And the application console log is:

$ pyspider 
[W 220426 09:19:52 run:413] phantomjs not found, continue running without it.
[I 220426 09:19:54 result_worker:49] result_worker starting...
[I 220426 09:19:54 processor:211] processor starting...
[I 220426 09:19:54 tornado_fetcher:638] fetcher starting...
[I 220426 09:19:54 scheduler:647] scheduler starting...
[I 220426 09:19:54 scheduler:782] scheduler.xmlrpc listening on 127.0.0.1:23333
[I 220426 09:19:54 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0
[I 220426 09:19:55 app:84] webui exiting...
Traceback (most recent call last):
  File "/home/amenmd/myfs/temp/intergen/omim/env36/bin/pyspider", line 8, in <module>
    sys.exit(main())
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/pyspider/run.py", line 754, in main
    cli()
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/click/core.py", line 1637, in invoke
    super().invoke(ctx)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/pyspider/run.py", line 165, in cli
    ctx.invoke(all)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/pyspider/run.py", line 497, in all
    ctx.invoke(webui, **webui_config)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/pyspider/run.py", line 384, in webui
    app.run(host=host, port=port)
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/pyspider/webui/app.py", line 59, in run
    from .webdav import dav_app
  File "/home/amenmd/myfs/temp/intergen/omim/env36/lib/python3.6/site-packages/pyspider/webui/webdav.py", line 207, in <module>
    '/': ScriptProvider(app)
TypeError: Can't instantiate abstract class ScriptProvider with abstract methods get_resource_inst

@649686211
Copy link

同问?如何解决呢?

@axelning
Copy link

[W 220404 15:02:18 run:413] phantomjs not found, continue running without it. [I 220404 15:02:20 result_worker:49] result_worker starting... [I 220404 15:02:20 processor:211] processor starting... [I 220404 15:02:20 tornado_fetcher:638] fetcher starting... [I 220404 15:02:20 scheduler:647] scheduler starting... [I 220404 15:02:20 scheduler:782] scheduler.xmlrpc listening on 127.0.0.1:23333 [I 220404 15:02:20 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0 [I 220404 15:02:20 app:84] webui exiting... Traceback (most recent call last): File "/usr/local/Caskroom/miniconda/base/envs/web/bin/pyspider", line 8, in sys.exit(main()) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/run.py", line 754, in main cli() File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 1128, in call return self.main(*args, **kwargs) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 1637, in invoke super().invoke(ctx) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/run.py", line 165, in cli ctx.invoke(all) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/run.py", line 497, in all ctx.invoke(webui, **webui_config) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/run.py", line 384, in webui app.run(host=host, port=port) File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/webui/app.py", line 59, in run from .webdav import dav_app File "/usr/local/Caskroom/miniconda/base/envs/web/lib/python3.6/site-packages/pyspider/webui/webdav.py", line 207, in '/': ScriptProvider(app) TypeError: Can't instantiate abstract class ScriptProvider with abstract methods get_resource_inst

看了源码,抽象类定义的是get_resource_inst,而webdav里定义的是getResourceInst,所以抽象类找不到对应的构建函数,就报错了

@axelning
Copy link

应该是webdav的问题,建议不要修改源码,而是给webdav降版本

@axelning
Copy link

同时还有问题的应该还有werkzeug这个包,也是版本更新后有些模块路径变了

@anarkia7115
Copy link

pip install wsgidav==2.4.1
pip uninstall flask
pip install werkzeug==0.16.0 flask

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

No branches or pull requests

6 participants