On Wed, Sep 30, 2015 at 12:47 PM, Dwayne Bailey <[email protected]> wrote:
> > Then be the bad ones. Weird pyclean is meant to remove .pyc and .pyo > files. > > rm $(find /env/lib/python2.7/site-packages/pootle -name "*.pyo") > Great!! That do the trick. Now my updated virtualenv is runnning. >> for project in $( pootle list_projects ); do pootle calculate_checks >> --no-rq -v 3 --traceback --project $project; done >> >> Your server must be massive. I hit that with calculate_checks and > thought also that it was my projects that where too big. I've never hit > that with refresh_stats, in fact not sure how you did as those should just > spawn jobs in RQ. > I run both without RQ ( --no-rq ) just to check the time needed. I could try refresh_stats in a one go, but what worries me is the calculate checks, I wonder if the process will run ok once in production, or I will need to run it for each project. > > Can you try by adding --rebuild which will rebuild the TM resources from > scratch. The current command line will simply update an existing LocalTM > and clearly you haven't got one yet. The command needs to be more robust > and clearer. Will push your traceback into an issue to track this see > https://github.com/translate/pootle/issues/4120 > Again, it worked great!! pootle update_tmserver --rebuild -v 3 2015-09-30 14:31:29,478 INFO Loading custom settings from '/root/.pootle/pootle.conf'... 2015-09-30 17:31:31,319 INFO Using Python PO Last indexed revision = -1 5570462 translations to index Think that --rebuild should be in the documentation, as suggested in https://github.com/translate/pootle/issues/3948 Now I can see similar translations, i.e. TM seems to work. Two new issues: 1) This lines shows in the log [Wed Sep 30 18:14:34.541564 2015] [:error] [pid 25773] 2015-09-30 18:14:34,541 ERROR Problem with check filter 'gconf': 'GnomeChecker' object has no attribute 'locations' [Wed Sep 30 18:14:34.542327 2015] [:error] [pid 25773] 2015-09-30 18:14:34,542 ERROR Problem with check filter 'validxml': 'LibreOfficeChecker' object has no attribute 'locations' [Wed Sep 30 18:14:34.543090 2015] [:error] [pid 25773] 2015-09-30 18:14:34,543 ERROR Problem with check filter 'credits': 'MozillaChecker' object has no attribute 'locations' They repeat periodically, but it's harmless I suppose 2) Can't suggest or accept suggestions Every time I try to accept a suggestion or make a translation I got a 'Server error', [...] Traceback (most recent call last): [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response [...] response = wrapped_callback(request, *callback_args, **callback_kwargs) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/pootle/apps/pootle_misc/util.py", line 59, in wrapper [...] return f(request, *args, **kwargs) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/views/decorators/http.py", line 41, in inner [...] return func(request, *args, **kwargs) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/pootle/apps/pootle_store/views.py", line 992, in manage_suggestion [...] return accept_suggestion(request, uid, sugg_id) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/pootle/apps/pootle_store/decorators.py", line 66, in decorated_f [...] return f(request, unit, *args, **kwargs) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/pootle/apps/pootle_store/views.py", line 1035, in accept_suggestion [...] request.profile) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/pootle/apps/pootle_store/models.py", line 1205, in accept_suggestion [...] sub.save() [...] File "/var/www/pootle/env/lib/python2.7/site-packages/pootle/apps/pootle_statistics/models.py", line 360, in save [...] ScoreLog.record_submission(submission=self) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/pootle/apps/pootle_statistics/models.py", line 498, in record_submission [...] ScoreLog.objects.create(**score) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/models/manager.py", line 92, in manager_method [...] return getattr(self.get_queryset(), name)(*args, **kwargs) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/models/query.py", line 372, in create [...] obj.save(force_insert=True, using=self.db) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/pootle/apps/pootle_statistics/models.py", line 506, in save [...] super(ScoreLog, self).save(*args, **kwargs) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/models/base.py", line 589, in save [...] force_update=force_update, update_fields=update_fields) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/models/base.py", line 617, in save_base [...] updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/models/base.py", line 698, in _save_table [...] result = self._do_insert(cls._base_manager, using, fields, update_pk, raw) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/models/base.py", line 731, in _do_insert [...] using=using, raw=raw) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/models/manager.py", line 92, in manager_method [...] return getattr(self.get_queryset(), name)(*args, **kwargs) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/models/query.py", line 921, in _insert [...] return query.get_compiler(using=using).execute_sql(return_id) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 921, in execute_sql [...] cursor.execute(sql, params) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute [...] return self.cursor.execute(sql, params) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__ [...] six.reraise(dj_exc_type, dj_exc_value, traceback) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute [...] return self.cursor.execute(sql, params) [...] File "/var/www/pootle/env/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 129, in execute [...] return self.cursor.execute(query, args) [...] File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute [...] self.errorhandler(self, exc, value) [...] File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler [...] raise errorclass, errorvalue [...] IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`pootle`.`pootle_statistics_scorelog`, CONSTRAINT `user_id_refs_id_8bb659ed` FOREIGN KEY (`user_id`) REFERENCES `accounts_user` (`id`))') [...] Seems to be something wrong when trying to update statistics. Tested with old (updated) user and a new created one Bernardo ------------------------------------------------------------------------------ _______________________________________________ Translate-pootle mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/translate-pootle
