scrapinghub / portia

Visual scraping for Scrapy
BSD 3-Clause "New" or "Revised" License
9.3k stars 1.4k forks source link

portia安装问题 #693

Closed LiuSandy closed 7 years ago

LiuSandy commented 7 years ago

当我运行 twistd -n slyd 时报错,提示模块没有安装,当我安装模块的时候又会提示我没有这个模块

(portia) [root@bogon slyd]# twistd -n slyd
Traceback (most recent call last):
  File "/home/lius/portia/bin/twistd", line 18, in <module>
    run()
  File "/home/lius/portia/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 29, in run
    app.run(runApp, ServerOptions)
  File "/home/lius/portia/lib/python2.7/site-packages/twisted/application/app.py", line 617, in run
    runApp(config)
  File "/home/lius/portia/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 25, in runApp
    _SomeApplicationRunner(config).run()
  File "/home/lius/portia/lib/python2.7/site-packages/twisted/application/app.py", line 348, in run
    self.application = self.createOrGetApplication()
  File "/home/lius/portia/lib/python2.7/site-packages/twisted/application/app.py", line 408, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/home/lius/portia/portia/slyd/slyd/tap.py", line 88, in makeService
    root = create_root(config, settings_module)
  File "/home/lius/portia/portia/slyd/slyd/tap.py", line 51, in create_root
    configure_django(settings)
  File "/home/lius/portia/portia/slyd/slyd/tap.py", line 44, in configure_django
    django.setup()
  File "/home/lius/portia/lib/python2.7/site-packages/django/__init__.py", line 22, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/home/lius/portia/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/home/lius/portia/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/lius/portia/lib/python2.7/site-packages/django/conf/__init__.py", line 97, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named portia_server.settings
starrify commented 7 years ago

Quick translation:

当我运行 twistd -n slyd 时报错,提示模块没有安装,当我安装模块的时候又会提示我没有这个模块

It gives an error when I execute twistd -n slyd, saying something like "module is not installed". However when I try installing the module, it says "no such module".

zhangyoushu commented 7 years ago

export PYTHONPATH. see https://github.com/scrapinghub/portia/issues/667

ruairif commented 7 years ago

The simplest way to use Portia is to install Docker and then run:

docker run -v ~/portia_projects:/app/data/projects:rw -p 9001:9001 scrapinghub/portia