Booktype environment variables
  • I'm having trouble importing a booki.zip file that I have created.

    I have a customised booki.env file but even if I run it I still get the error:

    Unknown command: 'bookimport'

    The booki.env file looks like this:

    export DJANGO_SETTINGS_MODULE=siyavula.settings

    # Add Booki to PATH.
    # If your libraries are in non standard place, you should add path to them here.
    PYTHONPATH=$PYTHONPATH:/home/booktype/instances/:/home/booktype/instances/siyavula/lib/:/home/booktype/repo/Booktype/lib

    # Add Django to PATH
    # If your libraries/apps are in non standard place, you should add path to them here.
    # e.g.
    #    PATH=$PATH:/Users/aerkalov/Work/svn/django/django/bin

    export PYTHONPATH PATH


    I think something small is wrong here but I'm unsure what it could be. Any help will be greatly appreciated.


  • 6 Comments sorted by
  • Vote Up0Vote Down adamadam
    Posts: 88Member
    can you post the full command you use?

    adam

    On Tue, May 8, 2012 at 11:54 AM, Ewald Zietsman
    wrote:
    > I'm having trouble importing a booki.zip file that I have created.
    >
    > I have a customised booki.env file but even if I run it I still get the
    > error:
    >
    > Unknown command: 'bookimport'
    >
    > The booki.env file looks like this:
    >
    > export DJANGO_SETTINGS_MODULE=siyavula.settings
    >
    > # Add Booki to PATH.
    > # If your libraries are in non standard place, you should add path to them
    > here.
    > PYTHONPATH=$PYTHONPATH:/home/booktype/instances/:/home/booktype/instances/siyavula/lib/:/home/booktype/repo/Booktype/lib
    >
    > # Add Django to PATH
    > # If your libraries/apps are in non standard place, you should add path to
    > them here.
    > # e.g.
    > #    PATH=$PATH:/Users/aerkalov/Work/svn/django/django/bin
    >
    > export PYTHONPATH PATH
    >
    >
    > I think something small is wrong here but I'm unsure what it could be. Any
    > help will be greatly appreciated.
    >
    >
    >
  • . ./booki.env
    /home/booktype/bin/python /usr/bin/django-admin bookimport --owner ewald /home/ewald/booki.zip 

    then I get this:
    Unknown command: 'bookimport'
  • Vote Up0Vote Down adamadam
    Posts: 88Member
    can you try setting the django path to point to your djano/bin


    adam

    On Tue, May 8, 2012 at 12:03 PM, Ewald Zietsman
    wrote:
    > . ./booki.env
    > /home/booktype/bin/python /usr/bin/django-admin bookimport
  • Actually, something else is wrong, the booki.env file did not change. Is there anything else that could have caused this?
  • Vote Up0Vote Down adamadam
    Posts: 88Member
    odd....no, dont know what would cause this
  • Looks like we had an issue with folder permissions and the error got swallowed by django-core. No sign of it in the logs. Will post again if I know it works.