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

pootle initdb troubles #12

Open
Olegt0rr opened this issue Jun 8, 2019 · 2 comments
Open

pootle initdb troubles #12

Olegt0rr opened this issue Jun 8, 2019 · 2 comments

Comments

@Olegt0rr
Copy link

Olegt0rr commented Jun 8, 2019

Step by step:
docker-compose up -d - success
docker-compose exec pootle bash - success
pootle migrate - success

and then:

root@4e09e93abf25:/home/pootle# pootle initdb
2019-06-08 12:12:02,516 INFO Loading custom settings from '/root/.pootle/pootle.conf'...
2019-06-08 12:12:02,812 INFO Using Python PO
Populating the database.
Traceback (most recent call last):
  File "/usr/local/bin/pootle", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/pootle/runner.py", line 319, in main
    django_settings_module='pootle.settings')
  File "/usr/local/lib/python2.7/dist-packages/pootle/runner.py", line 299, in run_app
    management.execute_from_command_line(command)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 533, in handle
    return self.handle_noargs(**options)
  File "/usr/local/lib/python2.7/dist-packages/pootle/apps/pootle_app/management/commands/initdb.py", line 36, in handle_noargs
    initdb(options["create_projects"])
  File "/usr/local/lib/python2.7/dist-packages/pootle/core/initdb.py", line 33, in initdb
    create_revision()
  File "/usr/local/lib/python2.7/dist-packages/pootle/core/initdb.py", line 76, in create_revision
    Revision.initialize()
  File "/usr/local/lib/python2.7/dist-packages/pootle/core/models.py", line 35, in initialize
    return cls.add(cls.INITIAL)
  File "/usr/local/lib/python2.7/dist-packages/pootle/core/models.py", line 62, in add
    return cache.add(cls.CACHE_KEY, value)
  File "/usr/local/lib/python2.7/dist-packages/django_redis/cache.py", line 32, in _decorator
    return method(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django_redis/cache.py", line 75, in add
    return self.client.add(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django_redis/client/default.py", line 190, in add
    return self.set(key, value, timeout, version=version, client=client, nx=True)
  File "/usr/local/lib/python2.7/dist-packages/django_redis/client/default.py", line 148, in set
    return client.set(nkey, nvalue, nx=nx, ex=timeout, xx=xx)
  File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 1451, in set
    return self.execute_command('SET', *pieces)
  File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 774, in execute_command
    connection.send_command(*args)
  File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 620, in send_command
    self.send_packed_command(self.pack_command(*args))
  File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 663, in pack_command
    for arg in imap(self.encoder.encode, args):
  File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 125, in encode
    "byte, string or number first." % typename)
redis.exceptions.DataError: Invalid input of type: 'CacheKey'. Convert to a byte, string or number first.
@ghost
Copy link

ghost commented Aug 5, 2019

Step by step:
docker-compose up -d - success
docker-compose exec pootle bash - success
pootle migrate - success

and then:

root@4e09e93abf25:/home/pootle# pootle initdb
2019-06-08 12:12:02,516 INFO Loading custom settings from '/root/.pootle/pootle.conf'...
2019-06-08 12:12:02,812 INFO Using Python PO
Populating the database.
Traceback (most recent call last):
  File "/usr/local/bin/pootle", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/pootle/runner.py", line 319, in main
    django_settings_module='pootle.settings')
  File "/usr/local/lib/python2.7/dist-packages/pootle/runner.py", line 299, in run_app
    management.execute_from_command_line(command)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 533, in handle
    return self.handle_noargs(**options)
  File "/usr/local/lib/python2.7/dist-packages/pootle/apps/pootle_app/management/commands/initdb.py", line 36, in handle_noargs
    initdb(options["create_projects"])
  File "/usr/local/lib/python2.7/dist-packages/pootle/core/initdb.py", line 33, in initdb
    create_revision()
  File "/usr/local/lib/python2.7/dist-packages/pootle/core/initdb.py", line 76, in create_revision
    Revision.initialize()
  File "/usr/local/lib/python2.7/dist-packages/pootle/core/models.py", line 35, in initialize
    return cls.add(cls.INITIAL)
  File "/usr/local/lib/python2.7/dist-packages/pootle/core/models.py", line 62, in add
    return cache.add(cls.CACHE_KEY, value)
  File "/usr/local/lib/python2.7/dist-packages/django_redis/cache.py", line 32, in _decorator
    return method(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django_redis/cache.py", line 75, in add
    return self.client.add(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django_redis/client/default.py", line 190, in add
    return self.set(key, value, timeout, version=version, client=client, nx=True)
  File "/usr/local/lib/python2.7/dist-packages/django_redis/client/default.py", line 148, in set
    return client.set(nkey, nvalue, nx=nx, ex=timeout, xx=xx)
  File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 1451, in set
    return self.execute_command('SET', *pieces)
  File "/usr/local/lib/python2.7/dist-packages/redis/client.py", line 774, in execute_command
    connection.send_command(*args)
  File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 620, in send_command
    self.send_packed_command(self.pack_command(*args))
  File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 663, in pack_command
    for arg in imap(self.encoder.encode, args):
  File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 125, in encode
    "byte, string or number first." % typename)
redis.exceptions.DataError: Invalid input of type: 'CacheKey'. Convert to a byte, string or number first.

Me too.
Can you fix it?

@arky
Copy link

arky commented Aug 5, 2019

Perhaps related to translate/pootle#6887

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

2 participants