Closed riebling closed 7 years ago
Sorry, it appears a Google search had led me to an older setup instructions. This explains the discrepancy I noted where one install instructions recommended Docker, then another one recommended Vagrant. This also probably explains why I'm seeing these errors. (Though I'd like to leave this Issue available should someone else encounter this same error)
i had this error on my debian jessie environnement when trying to run portia locally...
Same error, even following the 'latest' instructions, which mandates that you install several other things on the host You will need Vagrant, VirtualBox, Node.js, Bower and ember-cli installed.
vagrant@portia:~$ sudo service slyd start
slyd: unrecognized service
And again trying to run manually (this time, in the way the "running locally" instructions suggest) results in the same error ImportError: No module named portia_server.settings
:
vagrant@portia:/vagrant$ slyd/bin/slyd -p 9002 -r portiaui/dist
2017-03-09 20:03:27+0000 [-] Log opened.
2017-03-09 20:03:27.055345 [-] Splash version: 2.3.2
2017-03-09 20:03:27.057434 [-] WARNING: Lua scripting is not available because 'lupa' Python package is not installed
2017-03-09 20:03:27.057703 [-] Qt 5.5.1, PyQt 5.5.1, WebKit 538.1, sip 4.17, Twisted 16.1.1
2017-03-09 20:03:27.057889 [-] Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]
2017-03-09 20:03:27.058158 [-] Open files limit: 1024
2017-03-09 20:03:27.058323 [-] Open files limit increased from 1024 to 4096
2017-03-09 20:03:27.163178 [-] Xvfb is started: ['Xvfb', ':1669549243', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']
2017-03-09 20:03:27.512904 [-] Traceback (most recent call last):
2017-03-09 20:03:27.513073 [-] File "slyd/bin/slyd", line 28, in <module>
2017-03-09 20:03:27.513694 [-] splash.server.main(server_factory=make_server, argv=[])
2017-03-09 20:03:27.514061 [-] File "/usr/local/lib/python2.7/dist-packages/splash/server.py", line 372, in main
2017-03-09 20:03:27.514325 [-] server_factory=server_factory,
2017-03-09 20:03:27.514616 [-] File "/usr/local/lib/python2.7/dist-packages/splash/server.py", line 291, in default_splash_server
2017-03-09 20:03:27.514911 [-] argument_cache_max_entries=argument_cache_max_entries,
2017-03-09 20:03:27.515166 [-] File "slyd/bin/slyd", line 25, in make_server
2017-03-09 20:03:27.515741 [-] 'docroot': opts.root}))
2017-03-09 20:03:27.516004 [-] File "/vagrant/slyd/slyd/tap.py", line 88, in makeService
2017-03-09 20:03:27.516511 [-] root = create_root(config, settings_module)
2017-03-09 20:03:27.516807 [-] File "/vagrant/slyd/slyd/tap.py", line 51, in create_root
2017-03-09 20:03:27.517298 [-] configure_django(settings)
2017-03-09 20:03:27.517670 [-] File "/vagrant/slyd/slyd/tap.py", line 44, in configure_django
2017-03-09 20:03:27.518303 [-] django.setup()
2017-03-09 20:03:27.518590 [-] File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 22, in setup
2017-03-09 20:03:27.518811 [-] configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2017-03-09 20:03:27.519053 [-] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 53, in __getattr__
2017-03-09 20:03:27.519306 [-] self._setup(name)
2017-03-09 20:03:27.519547 [-] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 41, in _setup
2017-03-09 20:03:27.519796 [-] self._wrapped = Settings(settings_module)
2017-03-09 20:03:27.520034 [-] File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 97, in __init__
2017-03-09 20:03:27.520292 [-] mod = importlib.import_module(self.SETTINGS_MODULE)
2017-03-09 20:03:27.520531 [-] File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
2017-03-09 20:03:27.520779 [-] __import__(name)
2017-03-09 20:03:27.521031 [-] ImportError: No module named portia_server.settings
It turns out this is a duplicate of https://github.com/scrapinghub/portia/issues/667
What worked for me: after vagrant ssh
-ing into the VM, run:
slyd -p 9002 -r /vagrant/portiaui/dist & /vagrant/portia_server/manage.py runserver
which resulted in
[1] 16242
2017-03-09 20:26:14+0000 [-] Log opened.
2017-03-09 20:26:14.394416 [-] Splash version: 2.3.2
2017-03-09 20:26:14.396816 [-] WARNING: Lua scripting is not available because 'lupa' Python package is not installed
2017-03-09 20:26:14.396911 [-] Qt 5.5.1, PyQt 5.5.1, WebKit 538.1, sip 4.17, Twisted 16.1.1
2017-03-09 20:26:14.396998 [-] Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]
2017-03-09 20:26:14.397119 [-] Open files limit: 1024
2017-03-09 20:26:14.397208 [-] Open files limit increased from 1024 to 4096
2017-03-09 20:26:14.502367 [-] Xvfb is started: ['Xvfb', ':1097222196', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']
2017-03-09 20:26:16.123224 [-] Site starting on 9002
2017-03-09 20:26:16.123490 [-] Starting factory <slyd.server.Site instance at 0x7fc2a8f145a8>
Performing system checks...
System check identified no issues (0 silenced).
You have 12 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): auth, contenttypes\
, db_repo, sessions.
Run 'python manage.py migrate' to apply them.
March 09, 2017 - 20:26:18
Django version 1.10.5, using settings 'portia_server.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Unfortunately even after all this, what results if I navigate to localhost:9001 is an empty page, with only the title reading 'Portia' and the following content (as HTML):
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Portia</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="portia-ui/config/environment" content="%7B%22modulePrefix%22%3A%22portia-ui%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3A%22/%22%2C%22locationType%22%3A%22hash%22%2C%22contentSecurityPolicy%22%3A%7B%22default-src%22%3A%22%27none%27%22%2C%22script-src%22%3A%22*%20%27unsafe-inline%27%20%27unsafe-eval%27%22%2C%22style-src%22%3A%22*%20%27unsafe-inline%27%22%2C%22img-src%22%3A%22*%20data%3A%22%2C%22connect-src%22%3A%22*%22%2C%22font-src%22%3A%22*%22%2C%22object-src%22%3A%22*%22%2C%22media-src%22%3A%22*%22%2C%22frame-src%22%3A%22%27none%27%22%7D%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22portia-ui%22%2C%22version%22%3A%222.0.0-alpha+da4b40ef%22%7D%2C%22contentSecurityPolicyHeader%22%3A%22Content-Security-Policy-Report-Only%22%2C%22exportApplicationGlobal%22%3Afalse%7D">
<link rel="stylesheet" href="assets/vendor-bb730b6fc228ebc84585b32070fc9b8f.css" integrity="sha256-Ke9qmyEKGIqOCxcjUCp7zKXIRz9ZIYHQ7wRuh6uWBos= sha512-T9X6s7IIeAHnThnIQ5fs5tmHWQKx7MEC+3QIluefpeMMrP6VSxCW6Nk4aukJlRtPm5xWiOPuFiR9a4IxUyqt5g==">
<link rel="stylesheet" href="assets/portia-ui-2f042c99d0b354be11a210ac335594ac.css" integrity="sha256-Dqz/jOpwwF6XCH54Sg750/RllSDlRVNSjWe54wigyX0= sha512-w+z7zjawkw5ncM110t6Eih1ZLvWDnvGXj6zugRjvyk2BdWGt/oNnhubqRxc1mSlF4qx8IBxinqJzctjxN5LFjA==">
</head>
<body class="ember-application">
<script integrity="" src="assets/vendor-97013e6638e8608a71e7e06c1cd69dba.js"></script>
<script src="assets/portia-ui-80ea870515a4bb15bde3a7c28e3e05fc.js" integrity="sha256-pSew65md8OPrTBLekD36lu5t/veW/eOIX67e5sTcN5E= sha512-o+CNx2/aHTqXolSc8f6I7wG1zIg80Oco3WmrFhTNRzzSc5Kdlt3zTPhFS8SHxIPu7NWHHBYAXFCtXU55FG5c0A=="></script>
</body>
The service is now named portia
not slyd
. You should be able to start the service by running: service portia start
. This service should start when the VM is started
If you don't see anything on your screen then there is most likely an error in your console. Create a separate issue with the issue that is in that file
It seems after Vagrant ssh complains, trying to manually start the services results in errors for me with the latest version cloned:
If I try to manually run /usr/local/bin/slyd (it is on the path) it says:
and lastly (and lengthily, apologies) the entire output of
vagrant up
:foofoo.txt