Hi, the second step, siteconfig = SiteConfiguration.objects.get() it gives
the following error:

*Traceback (most recent call last):*
*  File "<console>", line 1, in <module>*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/manager.py",
line 132, in get*
*    return self.get_query_set().get(*args, **kwargs)*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/query.py",
line 336, in get*
*    num = len(clone)*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/query.py",
line 81, in __len__*
*    self._result_cache = list(self.iterator())*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/query.py",
line 282, in iterator*
*    obj = self.model(*row[index_start:aggregate_start])*
*  File
"/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/siteconfig/models.py",
line 52, in __init__*
*    models.Model.__init__(self, *args, **kwargs)*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/base.py",
line 341, in __init__*
*    signals.post_init.send(sender=self.__class__, instance=self)*
*  File
"/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/dispatch/dispatcher.py",
line 162, in send*
*    response = receiver(signal=self, sender=sender, **named)*
*  File
"/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/util/fields.py",
line 174, in post_init*
*    value = self.loads(value)*
*  File
"/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/util/fields.py",
line 207, in loads*
*    val = eval(val)*
*  File "<string>", line 1*
*    {`mail_host_password`: ``, `cache_backend`:
`file:///tmp/reviewboard_cache`, `site_upload_temp_dir`: null,
`locale_datetime_format`: `N j, Y, P`, `auth_ldap_tls`: false,
`mail_host_user`: ``, `auth_ad_use_tls`: false, `locale_year_month_format`:
`F Y`, `auth_ldap_uid_mask`: ``, `mail_server_address`: `r...@localhost`,
`auth_ldap_uri`: ``, `auth_ldap_anon_bind_uid`: ``,
`diffviewer_context_num_lines`: 5, `diffviewer_paginate_orphans`: 10,
`mail_send_review_mail`: true, `diffviewer_syntax_highlighting_threshold`:
0, `site_media_root`: `/var/www/ReviewBoard/htdocs/media`,
`locale_language_code`: `en-us`, `auth_nis_email_domain`: ``,
`logging_allow_profiling`: false, `auth_ldap_anon_bind_passwd`: ``,
`cache_expiration_time`: 2592000, `site_prepend_www`: false,
`locale_time_zone`: `US/Pacific`, `search_index_file`: ``,
`auth_ldap_base_dn`: ``, `mail_port`: 25, `logging_directory`: null,
`search_enable`: false, `locale_time_format`: `P`, `locale_date_format`: `N
j, Y`, `auth_ldap_email_domain`: ``, `locale_month_day_format`: `F j`,
`auth_ldap_email_attribute`: ``, `auth_custom_backends`: [``],
`diffviewer_syntax_highlighting`: true, `auth_ad_ou_name`: ``,
`auth_ad_find_dc_from_dns`: false, `site_admin_email`: `
feng....@alibaba-inc.com`, `auth_backend`: `builtin`, `locale_timezone`:
`US/Pacific`, `auth_ad_domain_controller`: ``, `site_domain_method`: `http`,
`mail_use_tls`: false, `diffviewer_paginate_by`: 20, `logging_enabled`:
false, `diffviewer_show_trailing_whitespace`: false,
`auth_require_sitewide_login`: true, `site_upload_max_memory_size`: 2621440,
`locale_default_charset`: `utf-8`, `auth_ad_domain_name`: ``,
`auth_ad_recursion_depth`: null, `mail_host`: `smtp.ops.aliyun-inc.com`,
`diffviewer_include_space_patterns`: [``], `mail_default_from`:
`webmas...@localhost`, `site_media_url`: `/ReviewBoard/media/`,
`site_admin_name`: `feng.cao`, `auth_ad_group_name`: ``}*
*                             ^*
*SyntaxError: invalid syntax*




Thanks!
Yanchao WANG


On Mon, Aug 30, 2010 at 3:18 PM, Christian Hammond <chip...@chipx86.com>wrote:

> That's likely due to migrating the database to MySQL. The settings
> information stored in the database wasn't preserved in a proper JSON format.
>
> Can you do the following:
>
>     $ rb-site manage /path/to/site shell
>     >>> from djblets.siteconfig.models import SiteConfiguration
>     >>> siteconfig = SiteConfiguration.objects.get()
>     >>> print siteconfig.settings
>
> It should print out the string contents of your settings. You basically
> need to turn this back into a Python dictionary. You can try:
>
>     >>> siteconfig.settings = <paste everything that was printed>
>     >>> siteconfig.save()
>
> It may work, but it depends on what's going wrong with the settings. If it
> gives any sort of error, please paste exactly what was shown in both the
> printed output and the backtrace.
>
>
> Christian
>
> --
> Christian Hammond - chip...@chipx86.com
> Review Board - http://www.reviewboard.org
> VMware, Inc. - http://www.vmware.com
>
>
> On Sun, Aug 29, 2010 at 11:48 PM, WANG Yanchao <yanchaow...@gmail.com>wrote:
>
>> Indeed the database malformat is caused by my hot-copy. I stopped apache
>> and copy the db file. The message is gone.
>> However I met another issue when try to use mysql:
>> 1, I upgrade the sqlite db in the new db site;
>> 2, I imported the upgraded db into mysql; (modified a lot of syntax in the
>> sqlite dump to match the mysql syntax)
>> 3 changed reviewboard settings to point to mysql ;
>> 4, the page is fine, but when I click a review request/admin page: an
>> call-stack is shown :
>>
>> Any clues?
>> *
>> *
>> *Traceback:*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/core/handlers/base.py"
>> in get_response*
>> *  100.                     response = callback(request, *callback_args,
>> **callback_kwargs)*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/contrib/admin/views/decorators.py"
>> in _checklogin*
>> *  33.             return view_func(request, *args, **kwargs)*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/ReviewBoard-1.0.9-py2.5.egg/reviewboard/admin/views.py"
>> in site_settings*
>> *  54.         'root_path': settings.SITE_ROOT + "admin/db/"*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/contrib/admin/views/decorators.py"
>> in _checklogin*
>> *  33.             return view_func(request, *args, **kwargs)*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/siteconfig/views.py"
>> in site_settings*
>> *  41.     siteconfig = SiteConfiguration.objects.get_current()*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/siteconfig/managers.py"
>> in get_current*
>> *  51.                 SiteConfiguration.objects.get(site=site)*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/manager.py"
>> in get*
>> *  132.         return self.get_query_set().get(*args, **kwargs)*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/query.py"
>> in get*
>> *  336.         num = len(clone)*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/query.py"
>> in __len__*
>> *  81.                 self._result_cache = list(self.iterator())*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/query.py"
>> in iterator*
>> *  282.                     obj =
>> self.model(*row[index_start:aggregate_start])*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/siteconfig/models.py"
>> in __init__*
>> *  52.         models.Model.__init__(self, *args, **kwargs)*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/base.py"
>> in __init__*
>> *  341.         signals.post_init.send(sender=self.__class__,
>> instance=self)*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/dispatch/dispatcher.py"
>> in send*
>> *  162.             response = receiver(signal=self, sender=sender,
>> **named)*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/util/fields.py"
>> in post_init*
>> *  174.             value = self.loads(value)*
>> *File
>> "/usr/ali/lib/python2.5/site-packages/Djblets-0.6.3-py2.5.egg/djblets/util/fields.py"
>> in loads*
>> *  206.             # string. We have to eval it.*
>> *
>> *
>> *Exception Type: SyntaxError at /ReviewBoard/admin/settings/general/*
>> *Exception Value: invalid syntax (<string>, line 1)*
>>
>> I looked into the value of val variable , it's like this:
>> *
>> *
>> *
>> {`mail_host_password`: ``, `cache_backend`:
>> `file:///tmp/reviewboard_cache`, `site_upload_temp_dir`: null,
>> `locale_datetime_format`: `N j, Y, P`, `auth_ldap_tls`: false,
>> `mail_host_user`: ``, `auth_ad_use_tls`: false, `locale_year_month_format`:
>> `F Y`, `auth_ldap_uid_mask`: ``, `mail_server_address`: `r...@localhost`,
>> `auth_ldap_uri`: ``, `auth_ldap_anon_bind_uid`: ``,
>> `diffviewer_context_num_lines`: 5, `diffviewer_paginate_orphans`: 10,
>> `mail_send_review_mail`: true, `diffviewer_syntax_highlighting_threshold`:
>> 0, `site_media_root`: `/var/www/ReviewBoard/htdocs/media`,
>> `locale_language_code`: `en-us`, `auth_nis_email_domain`: ``,
>> `logging_allow_profiling`: false, `auth_ldap_anon_bind_passwd`: ``,
>> `cache_expiration_time`: 2592000, `site_prepend_www`: false,
>> `locale_time_zone`: `US/Pacific`, `search_index_file`: ``,
>> `auth_ldap_base_dn`: ``, `mail_port`: 25, `logging_directory`: null,
>> `search_enable`: false, `locale_time_format`: `P`, `locale_date_format`: `N
>> j, Y`, `auth_ldap_email_domain`: ``, `locale_month_day_format`: `F j`,
>> `auth_ldap_email_attribute`: ``, `auth_custom_backends`: [``],
>> `diffviewer_syntax_highlighting`: true, `auth_ad_ou_name`: ``,
>> `auth_ad_find_dc_from_dns`: false, `site_admin_email`: `
>> feng....@alibaba-inc.com`, `auth_backend`: `builtin`, `locale_timezone`:
>> `US/Pacific`, `auth_ad_domain_controller`: ``, `site_domain_method`: `http`,
>> `mail_use_tls`: false, `diffviewer_paginate_by`: 20, `logging_enabled`:
>> false, `diffviewer_show_trailing_whitespace`: false,
>> `auth_require_sitewide_login`: true, `site_upload_max_memory_size`: 2621440,
>> `locale_default_charset`: `utf-8`, `auth_ad_domain_name`: ``,
>> `auth_ad_recursion_depth`: null, `mail_host`: `smtp.ops.aliyun-inc.com`,
>> `diffviewer_include_space_patterns`: [``], `mail_default_from`:
>> `webmas...@localhost`, `site_media_url`: `/ReviewBoard/media/`,
>> `site_admin_name`: `feng.cao`, `auth_ad_group_name`: ``}
>>
>> *
>>
>>
>> Thanks!
>> Yanchao WANG
>>
>>
>>
>> On Fri, Aug 27, 2010 at 10:32 AM, WANG Yanchao <yanchaow...@gmail.com>wrote:
>>
>>> Thank you Christian for such timely help!!!
>>>
>>> As you advised, I first checked the django-evolution version
>>> it's django_evolution-0.5-py2.5.egg Is it new enough?
>>> I will now also try to copy the database with the DB closed to see if it
>>> works.
>>> If it works, I will try to import the data from sqlite into mysql.
>>>
>>>
>>> Thanks!
>>> Yanchao WANG
>>>
>>> On Thu, Aug 26, 2010 at 5:53 PM, Christian Hammond 
>>> <chip...@chipx86.com>wrote:
>>>
>>>> Hi,
>>>>
>>>> First of all, can you see what version of django_evolution is installed
>>>> on your system? I want to verify that it's new enough.
>>>>
>>>> You can ignore the warnings about things not being called with a
>>>> database connection. That's just due to not using the new APIs in Django
>>>> 1.2, but it's harmless for Review Board.
>>>>
>>>> Second, that "database disk image is malformed" is coming from sqlite,
>>>> and it indicates that perhaps the database is corrupt or in some bad state.
>>>> A quick Google search shows some people who have hit this (not with Review
>>>> Board) and from what I can tell the database wasn't closed properly due to
>>>> application crashes.
>>>>
>>>> This may be an interesting read:
>>>> http://www.sqlite.org/lockingv3.html#how_to_corrupt
>>>>
>>>> When you copied over the database file, was the Review Board server on
>>>> that system still running? If so, it may be worth shutting down Apache,
>>>> copying over the database, and then starting it back up again.
>>>>
>>>> I would recommend not using sqlite for Review Board. It doesn't handle
>>>> concurrency very well, meaning you can hit locking problems with several
>>>> users using it at once. It's best to use MySQL or PostgreSQL.
>>>>
>>>> Christian
>>>>
>>>> --
>>>> Christian Hammond - chip...@chipx86.com
>>>> Review Board - http://www.reviewboard.org
>>>> VMware, Inc. - http://www.vmware.com
>>>>
>>>>
>>>> On Thu, Aug 26, 2010 at 2:42 AM, WANG Yanchao <yanchaow...@gmail.com>wrote:
>>>>
>>>>> I upgrade my reviewboard installation from beta to 1.0.9.
>>>>> I installed a new 1.0.9 reviewboard and make sure it's working on the
>>>>> new server. and I copy the old db file to the new db (sqlite)
>>>>> After installation, it tell me there is some missing column in the db
>>>>> so I run "rb-site upgrade Path" to upgrade the db scheme.
>>>>>
>>>>> but I get the following error messages:
>>>>> There are unapplied evolutions for diffviewer.
>>>>> There are unapplied evolutions for reviews.
>>>>> Project signature has changed - an evolution is required
>>>>> No fixtures found.
>>>>> /usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/fields/subclassing.py:26:
>>>>> PendingDeprecationWarning: inner has been called without providing a
>>>>> connection argument.
>>>>>   stacklevel=1)
>>>>> /usr/ali/lib/python2.5/site-packages/Django-1.2.1-py2.5.egg/django/db/models/fields/subclassing.py:26:
>>>>> PendingDeprecationWarning: db_type has been called without providing a
>>>>> connection argument.
>>>>>   stacklevel=1)
>>>>> Evolution could not be simulated, possibly due to raw SQL mutations
>>>>>
>>>>> Error applying evolution: database disk image is malformed
>>>>>
>>>>> Could anyone give me some clue how to deal with this?
>>>>>
>>>>> Thanks!
>>>>> -Yanchao
>>>>>
>>>>> --
>>>>> Want to help the Review Board project? Donate today at
>>>>> http://www.reviewboard.org/donate/
>>>>> Happy user? Let us know at http://www.reviewboard.org/users/
>>>>> -~----------~----~----~----~------~----~------~--~---
>>>>> To unsubscribe from this group, send email to
>>>>> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/reviewboard?hl=en
>>>>
>>>>
>>>>  --
>>>> Want to help the Review Board project? Donate today at
>>>> http://www.reviewboard.org/donate/
>>>> Happy user? Let us know at http://www.reviewboard.org/users/
>>>> -~----------~----~----~----~------~----~------~--~---
>>>> To unsubscribe from this group, send email to
>>>> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/reviewboard?hl=en
>>>
>>>
>>>
>>  --
>> Want to help the Review Board project? Donate today at
>> http://www.reviewboard.org/donate/
>> Happy user? Let us know at http://www.reviewboard.org/users/
>> -~----------~----~----~----~------~----~------~--~---
>> To unsubscribe from this group, send email to
>> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
>> For more options, visit this group at
>> http://groups.google.com/group/reviewboard?hl=en
>>
>
>  --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to