Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to add new language to the Templates #6885

Open
hyf4053 opened this issue Jan 3, 2019 · 2 comments
Open

Failed to add new language to the Templates #6885

hyf4053 opened this issue Jan 3, 2019 · 2 comments

Comments

@hyf4053
Copy link

hyf4053 commented Jan 3, 2019

Steps to reproduce:

I just setup Pootle on my server and create a new project and update the template file. Everything is fine until I'm going to add language to my template. When I add a new language to the templates on my website there will be a problem appear in my server console.

Results (Expected/Actual):

default: pootle_project.forms.update_translation_project(<TranslationProject: /ach/tutorial/>, True, 'http://this is url/') (7369a175-e21e-40a6-88f5-4d484da6291e) Traceback (most recent call last): File "/root/env/bin/pootle", line 11, in <module> sys.exit(main()) File "/root/env/local/lib/python2.7/site-packages/pootle/runner.py", line 357, in main run_app(project='pootle', django_settings_module='pootle.settings') File "/root/env/local/lib/python2.7/site-packages/pootle/runner.py", line 338, in run_app management.execute_from_command_line(command) File "/root/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line utility.execute() File "/root/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/root/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv self.execute(*args, **cmd_options) File "/root/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute output = self.handle(*args, **options) File "/root/env/local/lib/python2.7/site-packages/django_rq/management/commands/rqworker.py", line 95, in handle w.work(burst=options.get('burst', False)) File "/root/env/local/lib/python2.7/site-packages/rq/worker.py", line 474, in work self.execute_job(job, queue) File "/root/env/local/lib/python2.7/site-packages/rq/worker.py", line 592, in execute_job self.fork_work_horse(job, queue) File "/root/env/local/lib/python2.7/site-packages/rq/worker.py", line 538, in fork_work_horse self.main_work_horse(job, queue) File "/root/env/local/lib/python2.7/site-packages/rq/worker.py", line 607, in main_work_horse success = self.perform_job(job, queue) File "/root/env/local/lib/python2.7/site-packages/rq/worker.py", line 703, in perform_job self.prepare_job_execution(job) File "/root/env/local/lib/python2.7/site-packages/rq/worker.py", line 636, in prepare_job_execution registry.add(job, timeout, pipeline=pipeline) File "/root/env/local/lib/python2.7/site-packages/rq/registry.py", line 38, in add return pipeline.zadd(self.key, score, job.id) File "/root/env/local/lib/python2.7/site-packages/redis/client.py", line 2263, in zadd for pair in iteritems(mapping): File "/root/env/local/lib/python2.7/site-packages/redis/_compat.py", line 94, in iteritems return x.iteritems() AttributeError: 'int' object has no attribute 'iteritems' [2019-01-03T08:29:46] Moving job to u'failed' queue (work-horse terminated unexpectedly; waitpid returned 256) [2019-01-03T08:29:46] [2019-01-03T08:29:46] *** Listening on default...

And on the website, there is new language appear without any string to translate.

Environment (i.e. 'pootle --version', DB, OS, Browser):

Pootle 2.8.2 (Django 1.10.8, Translate Toolkit 2.2.5)
Using MySQL
Ubuntu 16.04.5 x64
Chrome

This is the first time I'm trying to build a website like this. I'm not sure if there is any mistake done during deploy the pootle to my server.

@Bachstelze
Copy link

Could you check the rq and redis version? Your error log is very hard to read, but it seems to be a job queue problem.

@schmave
Copy link

schmave commented Dec 6, 2019

I got this same error and fixed it by running:

pip install 'redis<3'
pip install django-rq==1.0.1
pip install rq==0.10.0

Things work now. In case it's helpful, here's the output of pootle --version:

Pootle 2.9.0rc1 (Django 1.10.8, Translate Toolkit 2.2.5)

I'm running on Ubuntu 18 using sqlite.

Here's the output of pip list:

Package                 Version   
----------------------- ----------
Babel                   2.5.0     
bleach                  2.0.0     
certifi                 2019.11.28
chardet                 3.0.4     
Click                   7.0       
cssmin                  0.2.0     
diff-match-patch        20121119  
dirsync                 2.2.2     
Django                  1.10.8    
django-allauth          0.33.0    
django-appconf          1.0.3     
django-assets           0.12      
django-bulk-update      2.2.0     
django-contact-form     1.4.2     
django-contrib-comments 1.7.3     
django-overextends      0.4.3     
django-redis            4.8.0     
django-rq               1.0.1     
django-sortedm2m        1.5.0     
django-statici18n       1.4.0     
html5lib                1.0.1     
idna                    2.8       
jsonfield               2.0.2     
lxml                    3.8.0     
Markdown                2.6.9     
oauthlib                3.1.0     
pathlib                 1.0.1     
pip                     19.3.1    
pkg-resources           0.0.0     
Pootle                  2.9.0rc1  
pycountry               17.5.14   
python-dateutil         2.6.1     
python-Levenshtein      0.12.0    
python-openid           2.2.5     
pytz                    2017.2    
redis                   2.10.6    
requests                2.22.0    
requests-oauthlib       1.3.0     
rq                      0.10.0    
scandir                 1.5       
setuptools              42.0.2    
six                     1.13.0    
stemming                1.0.1     
translate-toolkit       2.2.5     
urllib3                 1.25.7    
webassets               0.12.1    
webencodings            0.5.1     
wheel                   0.33.6    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants