Facing error while revieboard installation

23 views
Skip to first unread message

Atul Phalke

unread,
Sep 5, 2008, 5:56:55 AM9/5/08
to reviewboard
Hi Team,
   I am getting following error if I run command './manage.py syncdb'
Traceback (most recent call last):
  File "./manage.py", line 164, in <module>
    fix_django_evolution_issues()
  File "./manage.py", line 132, in fix_django_evolution_issues
    import django.db.models.fields.files as model_files
  File "/usr/lib/python2.5/site-packages/django/db/models/fields/files.py", line 7, in <module>
    from django.core.files.storage import default_storage
  File "/usr/lib/python2.5/site-packages/django/core/files/storage.py", line 223, in <module>
    DefaultStorage = get_storage_class(settings.DEFAULT_FILE_STORAGE)
  File "/usr/lib/python2.5/site-packages/django/conf/__init__.py", line 32, in __getattr__
    return getattr(self._target, name)
AttributeError: 'Settings' object has no attribute 'DEFAULT_FILE_STORAGE'

Earlier I was using django 0.96 version, that time I didn't face this issue. Now I am facing this problem, sqlite and other required things are installed. Any help would be appreciated.

Thanks in advance.
Regards,
Atul Balwant Phalke.

Christian Hammond

unread,
Sep 5, 2008, 6:50:07 AM9/5/08
to revie...@googlegroups.com
Review Board hasn't worked with 0.96 in over a year. Actually, I'm not sure it ever worked with 0.96. What version of Django are you using now? And what revision of Review Board?

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

Atul Phalke

unread,
Sep 15, 2008, 8:27:58 AM9/15/08
to revie...@googlegroups.com
Hey Christian,
    Sorry for delay in response. I am using reviewboard code from trunk and django version 1.0. Any response would be appreciated.
Thanks,
Atul.

Atul Phalke

unread,
Sep 22, 2008, 6:42:00 AM9/22/08
to revie...@googlegroups.com
Hi,
   Can anybody help me resolve following issue. I am using
Revieboard - trunk
Django - 1.0
Sqlite 3.3

If I run ./manage.py syncdb, I get following error


[root@ss223 reviewboard]# ./manage.py syncdb

Traceback (most recent call last):
  File "./manage.py", line 144, in <module>
    fix_django_evolution_issues()
  File "./manage.py", line 128, in fix_django_evolution_issues
    import django.db.models.fields as model_fields
  File "/usr/lib/python2.5/site-packages/django/db/__init__.py", line 24, in <module>
    backend = __import__('%s.base' % settings.DATABASE_ENGINE, {}, {}, [''])
ImportError: No module named base
[root@ss223 reviewboard]#

It seems like some database related issue.

Any response would be appreciated.
Thanks in advance,
Atul Balwant Phalke.

Christian Hammond

unread,
Sep 22, 2008, 5:56:03 PM9/22/08
to revie...@googlegroups.com
What's DATABASE_ENGINE set to in settings_local.py?


Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.


Atul Phalke

unread,
Sep 22, 2008, 11:52:40 PM9/22/08
to revie...@googlegroups.com
It's sqlite3.

DATABASE_ENGINE = 'sqlite3'      # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'reviewboard.sqlite'  # Or path to database file if using sqlite3.
DATABASE_USER = '********'     # Not used with sqlite3.
DATABASE_PASSWORD = '********' # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost.
DATABASE_PORT = ''             # Set to empty string for default.

Jeff Andros

unread,
Sep 23, 2008, 12:08:11 AM9/23/08
to revie...@googlegroups.com
shouldn't the DATABASE_NAME be a path?  have you tried it with the absolute path to your database file?
Jeff
O|||||||O

Help me and the Leukemia and Lymphoma society fight blood cancers:
http://pages.teamintraining.org/dm/tucson08/jandros

Atul Phalke

unread,
Sep 23, 2008, 12:13:10 AM9/23/08
to revie...@googlegroups.com
No. I didn't try. But as per the steps given there is no need for sqlite I guess . See
   http://code.google.com/p/reviewboard/wiki/GettingStarted

Thanks,
Atul.

Atul Phalke

unread,
Sep 23, 2008, 12:17:01 AM9/23/08
to revie...@googlegroups.com
I think I should try this option as per following line

DATABASE_NAME = 'reviewboard.sqlite'  # Or path to database file if using sqlite3.

Atul.

Christian Hammond

unread,
Sep 23, 2008, 12:58:17 AM9/23/08
to revie...@googlegroups.com
Just to be sure, you do have a /usr/lib/python2.5/site-packages/django/db/backends/sqlite3/base.py, right? (If using python 2.4, check /usr/lib/python2.4 instead of python2.5).


Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.


Christian Hammond

unread,
Sep 23, 2008, 12:59:22 AM9/23/08
to revie...@googlegroups.com
Also, run:

$ python
>>> import sqlite3
>>> sqlite3.version

Show the output here.


Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.


Atul Phalke

unread,
Sep 23, 2008, 1:35:18 AM9/23/08
to revie...@googlegroups.com
Its '2.3.2'
Atul.

Atul Phalke

unread,
Sep 23, 2008, 1:39:34 AM9/23/08
to revie...@googlegroups.com
HI,
   I created reviewboard database by executing command "sqlite3 reviewboarddb" . I gave this file path in settings_local.py. Still I am facing same problem.

Traceback (most recent call last):
  File "./manage.py", line 144, in <module>
    fix_django_evolution_issues()
  File "./manage.py", line 128, in fix_django_evolution_issues
    import django.db.models.fields as model_fields
  File "/usr/lib/python2.5/site-packages/django/db/__init__.py", line 24, in <module>
    backend = __import__('%s.base' % settings.DATABASE_ENGINE, {}, {}, [''])
ImportError: No module named base

Anything extra I need to do regarding database?

Atul.

Christian Hammond

unread,
Sep 23, 2008, 2:08:58 AM9/23/08
to revie...@googlegroups.com
It has nothing to do with the database file and everything to do with Django's install. It sounds like a file is missing.

Please look at my previous e-mail about looking for a particular file on your system.

Also, what sort of system is this installed on?


Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.


Atul Phalke

unread,
Sep 23, 2008, 2:13:07 AM9/23/08
to revie...@googlegroups.com
Yes I have file /usr/lib/python2.5/site-packages/django/db/backends/sqlite3/base.py on my system.  System is FC8.
uname -a output---
Linux <ip-address> 2.6.21-2950.fc8xen #1 SMP Tue Oct 23 12:24:34 EDT 2007 i686 i686 i386 GNU/Linux

Daniel Wexler

unread,
Sep 23, 2008, 12:25:41 PM9/23/08
to reviewboard
I'm sure Christian is right about the Django stuff, but, just in case
it helps, I found that I had to use the absolute path to my sqlite
database in settings_local.py:

DATABASE_NAME = 'C:/reviewboard/reviewboard.sqlite' # Or path to
database file if using sqlite3.


On Sep 22, 11:13 pm, "Atul Phalke" <atul.incompara...@gmail.com>
wrote:
> Yes I have file
> /usr/lib/python2.5/site-packages/django/db/backends/sqlite3/base.py on my
> system.  System is FC8.
> uname -a output---
> Linux <ip-address> 2.6.21-2950.fc8xen #1 SMP Tue Oct 23 12:24:34 EDT 2007
> i686 i686 i386 GNU/Linux
>
> On Tue, Sep 23, 2008 at 11:38 AM, Christian Hammond <chip...@chipx86.com>wrote:
>
> > It has nothing to do with the database file and everything to do with
> > Django's install. It sounds like a file is missing.
>
> > Please look at my previous e-mail about looking for a particular file on
> > your system.
>
> > Also, what sort of system is this installed on?
>
> > Christian
>
> > --
> > Christian Hammond - chip...@chipx86.com
> > VMware, Inc.
>
> > On Mon, Sep 22, 2008 at 10:39 PM, Atul Phalke <atul.incompara...@gmail.com
> > > wrote:
>
> >> HI,
> >>    I created reviewboard database by executing command "sqlite3
> >> reviewboarddb" . I gave this file path in settings_local.py. Still I am
> >> facing same problem.
> >> Traceback (most recent call last):
> >>   File "./manage.py", line 144, in <module>
> >>     fix_django_evolution_issues()
> >>   File "./manage.py", line 128, in fix_django_evolution_issues
> >>     import django.db.models.fields as model_fields
> >>   File "/usr/lib/python2.5/site-packages/django/db/__init__.py", line 24,
> >> in <module>
> >>     backend = __import__('%s.base' % settings.DATABASE_ENGINE, {}, {},
> >> [''])
> >> ImportError: No module named base
>
> >> Anything extra I need to do regarding database?
>
> >> Atul.
>
> >> On Tue, Sep 23, 2008 at 11:05 AM, Atul Phalke <
> >> atul.incompara...@gmail.com> wrote:
>
> >>> Its '2.3.2'
> >>> Atul.
>
> >>> On Tue, Sep 23, 2008 at 10:29 AM, Christian Hammond <chip...@chipx86.com
> >>> > wrote:
>
> >>>> Also, run:
>
> >>>> $ python
> >>>> >>> import sqlite3
> >>>> >>> sqlite3.version
>
> >>>> Show the output here.
>
> >>>> Christian
>
> >>>> --
> >>>> Christian Hammond - chip...@chipx86.com
> >>>> VMware, Inc.
>
> >>>> On Mon, Sep 22, 2008 at 9:58 PM, Christian Hammond <chip...@chipx86.com
> >>>> > wrote:
>
> >>>>> Just to be sure, you do have a
> >>>>> /usr/lib/python2.5/site-packages/django/db/backends/sqlite3/base.py, right?
> >>>>> (If using python 2.4, check /usr/lib/python2.4 instead of python2.5).
>
> >>>>> Christian
>
> >>>>> --
> >>>>> Christian Hammond - chip...@chipx86.com
> >>>>> VMware, Inc.
>
> >>>>> On Mon, Sep 22, 2008 at 9:17 PM, Atul Phalke <
> >>>>> atul.incompara...@gmail.com> wrote:
>
> >>>>>> I think I should try this option as per following line
> >>>>>> DATABASE_NAME = 'reviewboard.sqlite'  # Or path to database file if
> >>>>>> using sqlite3.
>
> >>>>>> Atul.
>
> >>>>>> On Tue, Sep 23, 2008 at 9:43 AM, Atul Phalke <
> >>>>>> atul.incompara...@gmail.com> wrote:
>
> >>>>>>> No. I didn't try. But as per the steps given there is no need for
> >>>>>>> sqlite I guess . See
> >>>>>>>    http://code.google.com/p/reviewboard/wiki/GettingStarted
>
> >>>>>>> Thanks,
> >>>>>>> Atul.
>
> >>>>>>> On Tue, Sep 23, 2008 at 9:38 AM, Jeff Andros <j...@bigredtj.com>wrote:
>
> >>>>>>>> shouldn't the DATABASE_NAME be a path?  have you tried it with the
> >>>>>>>> absolute path to your database file?
> >>>>>>>> Jeff
> >>>>>>>> O|||||||O
>
> >>>>>>>> Help me and the Leukemia and Lymphoma society fight blood cancers:
> >>>>>>>>http://pages.teamintraining.org/dm/tucson08/jandros
>
> >>>>>>>> On Mon, Sep 22, 2008 at 8:52 PM, Atul Phalke <
> >>>>>>>> atul.incompara...@gmail.com> wrote:
>
> >>>>>>>>> It's sqlite3.
>
> >>>>>>>>> DATABASE_ENGINE = 'sqlite3'      # 'postgresql', 'mysql', 'sqlite3'
> >>>>>>>>> or 'ado_mssql'.
> >>>>>>>>> DATABASE_NAME = 'reviewboard.sqlite'  # Or path to database file if
> >>>>>>>>> using sqlite3.
> >>>>>>>>> DATABASE_USER = '********'     # Not used with sqlite3.
> >>>>>>>>> DATABASE_PASSWORD = '********' # Not used with sqlite3.
> >>>>>>>>> DATABASE_HOST = ''             # Set to empty string for localhost.
> >>>>>>>>> DATABASE_PORT = ''             # Set to empty string for default.
>
> >>>>>>>>> On Tue, Sep 23, 2008 at 3:26 AM, Christian Hammond <
> >>>>>>>>> chip...@chipx86.com> wrote:
>
> >>>>>>>>>> What's DATABASE_ENGINE set to in settings_local.py?
>
> >>>>>>>>>> Christian
>
> >>>>>>>>>> --
> >>>>>>>>>> Christian Hammond - chip...@chipx86.com
> >>>>>>>>>>>>> Christian Hammond - chip...@chipx86.com

Atul Phalke

unread,
Sep 23, 2008, 11:58:39 PM9/23/08
to revie...@googlegroups.com
I tried with absolute path to my db, still its failing
entry in my settings_local.py
-----------------------------------------
# Database backend.  Any supported django database engine should work.

DATABASE_ENGINE = 'sqlite3'      # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = '/root/reviewboard/reviewboard/reviewboarddb'  # Or path to database file if using sqlite3.

DATABASE_USER = '********'     # Not used with sqlite3.
DATABASE_PASSWORD = '********' # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost.
DATABASE_PORT = ''             # Set to empty string for default.
-------------------------------------------------------------------------------------------------------

Atul Phalke

unread,
Sep 24, 2008, 1:39:52 AM9/24/08
to revie...@googlegroups.com
I tried with mysql as a database. Then also I am getting same problem.
  File "./manage.py", line 144, in <module>
    fix_django_evolution_issues()
  File "./manage.py", line 128, in fix_django_evolution_issues
    import django.db.models.fields as model_fields
  File "/usr/lib/python2.5/site-packages/django/db/__init__.py", line 24, in <module>
    backend = __import__('%s.base' % settings.DATABASE_ENGINE, {}, {}, [''])
ImportError: No module named mysql.base

I guess some problem with django only. Do we have to do any database settings in django? What I did is, got the tar ball(Django 1.0) and installed it using "python setup.py install". Any thing extra work needed? Or anything extra in reviewboard? I have taken reviewboard code from trunk. Done changes in "settings_local.py" and tried to run "./manage.py syncdb". Before that I created database in mysql named reviewboard. part of my settings_local.py looks like following
-----------------------------------------------------------------------------------------------------
DATABASE_ENGINE = 'mysql'      # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'reviewboard'  # Or path to database file if using sqlite3.
DATABASE_USER = 'reviewboard'     # Not used with sqlite3.
DATABASE_PASSWORD = 'password' # Not used with sqlite3.

DATABASE_HOST = ''             # Set to empty string for localhost.
DATABASE_PORT = ''             # Set to empty string for default.
---------------------------------------------------------------------------------------------
Also one more question, is db username and password is correct? i.e. "reviewboard" and "password"? I am logged in as root on my system, and created the database.

Thanks in advance.
Regards,
Atul

Christian Hammond

unread,
Sep 24, 2008, 1:57:19 AM9/24/08
to revie...@googlegroups.com
Username and password should be empty strings for sqlite, but that's still not the problem. This has absolutely nothign to do with any of your settings. It's indicative of a broken Django installation, or some setup issue with the Python path, since it's not finding one of the Django-supplied Python modules.

I didn't see an answer to my question about the OS/distro, but I may have missed it. Can you let me know what version of what OS/distro you're using, and provide your server configuration?

Also, did you have a version of Django pre-1.0?

I'd recommend fully uninstalling your version of Django, grabbing the tarball again, and reinstalling. Line 24 of your django/db/__init__.py does not match line 24 in the tarball I just looked at.

Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.

Atul Phalke

unread,
Sep 24, 2008, 2:17:59 AM9/24/08
to revie...@googlegroups.com
System details
---------------

FC8.
uname -a output---
Linux <ip-address> 2.6.21-2950.fc8xen #1 SMP Tue Oct 23 12:24:34 EDT 2007 i686 i686 i386 GNU/Linux
------------------
By server configuration did you mean content of settings_local.py in reviewboard directory? If yes, then modified contents are

--------------------------
# Database backend.  Any supported django database engine should work.
DATABASE_ENGINE = 'mysql'      # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = 'reviewboard'  # Or path to database file if using sqlite3.
DATABASE_USER = 'reviewboard'     # Not used with sqlite3.
DATABASE_PASSWORD = 'password' # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost.
DATABASE_PORT = ''             # Set to empty string for default.

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'abc123'
-----------------------------------------------------------------------------------

>>Also, did you have a version of Django pre-1.0?
Yes I had Django 0.96 on my machine earlier. Now I am using 1.0.

Yes I will uninstall Django and install it again.

Atul Phalke

unread,
Sep 24, 2008, 2:30:54 AM9/24/08
to revie...@googlegroups.com
Hi,
   Problem has been resolved :). It was django problem. I uninstalled and again installed it.
   Thanks :)

Regards,
Atul.

Christian Hammond

unread,
Sep 24, 2008, 3:05:17 AM9/24/08
to revie...@googlegroups.com
I meant the web server config, but I'm glad it's fixed now! I wonder what caused that in the first place, but good to know it's solved now.


Christian

--
Christian Hammond - chi...@chipx86.com
VMware, Inc.


Atul Phalke

unread,
Sep 24, 2008, 3:09:34 AM9/24/08
to revie...@googlegroups.com
I guess the problem was, I didn't uninstall the Django 0.96 and directly installed 1.0, so may be some conflict.
Reply all
Reply to author
Forward
0 new messages