Problems running Booktype createsuperuser






  • p { margin-bottom: 0.25cm; line-height: 120%; }


    Hi

    I'm new to Booktype
    and did the automatic install for Ubuntu 14.04 today. I've followed all the instructions and have got the server
    up and running but can't login with the admin user. During the install I
    left all the defaults but there was a message at the end that for
    some reason it couldn't create the superuser.

    I've tried running
    he command ./manage.py createsuperuser  from the instance1 but I keep getting the
    following message:

    Traceback (most
    recent call last):

    File
    "./manage.py", line 5, in <module>


    from unipath
    import Path


    ImportError: No
    module named unipath



    I then took a look
    at in the auth-user table in the postgres db (booktype-db) and found
    an entry there with the id 'admin' and an encrypted password. So I
    have a couple of questions



    1. Is the admin user
      created by default?( and if so what's the default password?)
    2. Does anyone have
      any ideas of why the createsuperuser command won't run for me?

    Thanks

    Sharan



  • 9 Comments sorted by
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Sharan,

    We can help you get this Booktype instance working. Firstly, if you have used the automatic install then the superuser password will have been set from whatever you entered in the purple screen 'Enter a strong password for the administrator to use...' as shown here: http://sourcefabric.booktype.pro/booktype-20-for-authors-and-publishers/automated-install-on-debian-or-ubuntu-gnulinux/

    There is no default for this admin password, so perhaps if you hit OK without entering anything, that might have been the cause of the error. I will open a ticket to test that possibility.

    Secondly, the reason why the createsuperuser command isn't working is likely to be because the the automated install uses a virtualenv for the Python libraries, such as unipath. You will need to activate the virtualenv, which after an automated install would normally be in the directory:
    /var/lib/booktype
    before using commands such as this. Change to the directory containing the 'bin' directory and run the activate command:
    cd /var/lib/booktype
    source bin/activate


    Your command prompt should change to show the name of the virtualenv in brackets, for example:

    (booktype)sharan@ubuntu:

    Now you can change to your Booktype instance directory and run the createsuperuser command again.

    Cheers!

    Daniel
    Post edited by Daniel James at 2016-07-11 06:16:02
  • Hi Daniel

    Thanks very much for the response. I've done as you suggested and now everything is working. I've been able to create the superuser and log in, so now will continue trying it out and hopefully get familiar with it. :-)

    Thanks
    Sharan
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Sharan,

    Glad to hear that worked for you. Please bear in mind that the automated install currently offers the 2.0 release, and there have been a lot of bug fixes since then. When the 2.1 release is made, we will offer an upgrade package in the same channel.

    Cheers!

    Daniel
  • Hi Daniel

    Is there a way to update my local version with the bug fixes? (as I now have an issue importing epub files).

    Another open source project I'm involved in provides a stable release for users but also a continually updated branch release for developers so you can synch your local version with the latest bug fixes if you want to.

    Also do you have an Issue Tracker so I can take a look at what has been reported (so I don't duplicate it here) and also can see what has already been fixed but not yet released?

    Thanks
    Sharan
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Sharan,

    Please post details of your EPUB issue and provide a sample file if possible. It may be a known issue, or a bug we haven't seen yet.

    We have two install methods, manual from the git repository or tarball, or automatic with the APT repository (Debian or Ubuntu packages). The git repository contains all the latest code, but may not be as tested as the official releases.

    The issue tracker is at https://dev.sourcefabric.org/projects/BK/issues and you can use the same login as for this forum.

    Cheers!

    Daniel
  • Hi Daniel

    Thanks for the details and the link and will also look at getting it from your git repo.

    Here are the steps.
    1. I created an epub file from an existing document and I exported using epub version 2.0.1 (I also tried it with version 3.0 but that didnt work either)
    2. I logged into Booktype as admin
    3. From the Dashboard I used the Import Book button and then Select from Folder
    4. I selected the epub file and then clicked Import
    5. I got the message ' Please wait, we are processing your file'  - and that's where it stays and hangs
    The epub file is not imported.

    I tried to add the epub file I'm using as an attachment here but it says that the "File upload failed: Reason: Uploaded file type is not allowed."

    Thanks
    Sharan
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Sharan,

    Sorry to hear that you're having trouble with this EPUB. The Booktype instance log files under /var/www/booktype/instance1/ may have some useful information.

    Please upload your EPUB somewhere we can download it, or email it as an attachment to contact@booktype.pro so we can check it out.

    Cheers!

    Daniel
  • Hi Daniel

    Thanks again for the response. I've found the issue - I ran my epub file through an epub validator and it failed, so my file is the problem. I've been exporting to epub from InDesign so it looks like that is where the issue lies.

    I'll work on fixing the file, validating it and then trying the import again. Thanks for all your help.

    Thanks
    Sharan

  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Sharan,

    If you still have problems importing your EPUB after validating it, please let us know.

    In the meantime, you could try importing an EPUB known to work on our test servers, such as this copy of the Booktype manual: http://objavi.booktype.pro/data/books/booktype20forauthorsandpublishers-en-2016.07.18-13.02.15.epub

    Cheers!

    Daniel