Discussions
Activity
Sign In
How it works
Booktype Support
new be issue... cant install booktype...
Vote Up
0
Vote Down
nicolaas
November 2013
Posts: 3
Member
Hi
I am installing booktype on ubuntu 12.04.
It seemed to install ok, but when I load the page I get a 500 error.
Inspecting nano /var/log/apache2/booktype-error.log, I see:
[Mon Nov 18 06:56:20 2013] [error] [client 202.160.48.73] mod_wsgi (pid=9486): Target WSGI script '/var/www/mysite.co.nz/mybooktype/mybook/booki.wsgi' cannot be loaded as Python module.
[Mon Nov 18 06:56:20 2013] [error] [client 202.160.48.73] mod_wsgi (pid=9486): Exception occurred processing WSGI script '/var/www/mysite.co.nz/mybooktype/mybook/booki.wsgi'.
[Mon Nov 18 06:56:20 2013] [error] [client 202.160.48.73] Traceback (most recent call last):
[Mon Nov 18 06:56:20 2013] [error] [client 202.160.48.73] File "/var/www/mysite.co.nz/mybooktype/mybook/booki.wsgi", line 15, in <module>
[Mon Nov 18 06:56:20 2013] [error] [client 202.160.48.73] import django.core.handlers.wsgi
[Mon Nov 18 06:56:20 2013] [error] [client 202.160.48.73] ImportError: No module named django.core.handlers.wsgi
I am sure it is something "basic", but I am a newbe in terms of linux, ubuntu and python!
Can you please give me some pointers on
a. how I can debug this
b. what I can do to fix this?
Thank you
Nicolaas
5 Comments
sorted by
Votes
Date Added
Vote Up
0
Vote Down
Boštjan Jerko
November 2013
Posts: 68
Member
Do you have django installed?
Vote Up
0
Vote Down
kamaradski
November 2013
Posts: 6
Member
make sure you install booktype in the virtual environment with django as written in the install instructions. this should solve your issue.
Vote Up
0
Vote Down
nicolaas
November 2013
Posts: 3
Member
Thank you for your answers.
django is installed I think because I can type django-admin without an error.
Kararadski: I am not sure how to do this! How do I install it in a virtual environment? I am pretty sure that I followed the installation instructions reasonably well.
Here are some further notes...
Here is some information I found:
relevant links:
http://forum.sourcefabric.org/discussion/comment/23689
http://ericholscher.com/blog/2008/jul/8/setting-django-and-mod_wsgi/
http://stackoverflow.com/questions/3584713/importerror-no-module-named-django-core-handlers-wsgi-in-install-django-mod-wsg
Check out the settings in two files below:
/var/www/mysite.co.nz/mybooktype/mybook/booki.wsgi:::
import os, sys
#Calculate
the path based on the location of the WSGI script.
#apache_configuration= os.path.dirname(__file__)
#project
= os.path.dirname(apache_configuration)
#workspace
= os.path.dirname(project)
#sys
.path.append(workspace)
#Add
the path to 3rd party django application and to django itself.
sys.path.insert(0, '/var/www/mysite.co.nz/mybooktype/')
sys.path.insert(1, '/var/www/mysite.co.nz/mybooktype/mybook/lib/')
sys.path.insert(2, '/var/www/mysite.co.nz/mybooktype/Booktype/lib/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mybook.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
/etc/apache2/sites-enabled/booktype:::
# Apache configuration for Booktype server V1.0.1
<VirtualHost *:80>
# CHANGE THIS
ServerName mysite.co.nz
SetEnv HTTP_HOST "mysite.co.nz"
SetEnv LC_TIME "en_GB.UTF-8"
SetEnv LANG "en_GB.UTF-8"
WSGIScriptAlias / /var/www/mysite.co.nz/mybooktype/mybook/booki.wsgi
<Location "/">
Allow from all
Options FollowSymLinks
</Location>
Alias /static/ "/var/www/mysite.co.nz/mybooktype/mybook/static/"
<Directory "/var/www/mysite.co.nz/mybooktype/mybook/static/">
Order allow,deny
Options Indexes
Allow from all
IndexOptions FancyIndexing
</Directory>
Alias /site_static/ "/var/www/mysite.co.nz/mybooktype/Booktype/lib/booki/site_static/"
<Directory "/var/www/mysite.co.nz/mybooktype/Booktype/lib/booki/site_static/">
Order allow,deny
Options Indexes
Options FollowSymLinks
Allow from all
IndexOptions FancyIndexing
</Directory>
Alias /media/ "/contrib/admin/media/"
<Directory "/contrib/admin/media">
Order allow,deny
Options Indexes
Options FollowSymLinks
Allow from all
IndexOptions FancyIndexing
</Directory>
ErrorLog /var/log/apache2/booktype-error.log
LogLevel warn
CustomLog /var/log/apache2/booktype-access.log combined
</VirtualHost>
:::
Do you know someone who I can pay to help me install it? This is for a major NGO and I would love to get it going for them.
Vote Up
0
Vote Down
nicolaas
November 2013
Posts: 3
Member
My platform is Ubuntu 12.04 and I am trying to intall the apache postgres route...
Vote Up
0
Vote Down
Aleksandar Erkalović
November 2013
Posts: 207
Member
I helped Nicolaas but I am posting here info for other to see.
I think he used script
https://github.com/aerkalov/booktype-scrolls/blob/master/scripts/install/booktype_install.py
to install Booktype. It created virtualenv and installed all needed packages but did not modify wsgi script to activate the virtualenv.
File booki.wsgi had to activate virtualenv and everything worked after that.
activate_this = '__PATH_TO_VIRTUALENV_/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
Aco
Add a Comment
Start a New Discussion
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
8,397
Sourcefabric
↳
Announcements
25
Newscoop
↳
Newscoop Support
2,189
↳
Newscoop Development
722
↳
Newscoop Security
13
↳
Newscoop Documentation
17
↳
Newscoop Themes
69
Airtime
↳
Airtime Support
3,139
↳
Airtime Development
1,286
↳
Airtime Français
146
↳
Airtime Documentation
14
↳
Airtime Hacks
102
↳
Promote your station!
37
↳
Airtime Security
11
Booktype
↳
Booktype Support
277
↳
Booktype Development
55
↳
Booktype Documentation
7
Superdesk
↳
Superdesk Development
264
↳
Web Publisher
21
Poll
No poll attached to this discussion.
Top Posters
Albert FR
1978
Martin Konecny
1860
Andrey Podshivalov
1526
Voisses Tech
1423
John Chewter
899
Daniel James
844
Roger Wilco
784
hoerich
627
Paul Baranowski
389
Cliff Wang
339