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

rethinkdb restore failing after upgrade to 2.4.7 (TypeError: 'Values' object is not subscriptable) #210

Open
mishawakerman opened this issue Jun 1, 2020 · 2 comments
Labels
bug Something isn't working not qualified The issue is not checked yet by the owners

Comments

@mishawakerman
Copy link
Contributor

Describe the bug
Restore fails if the --temp-dir argument is provided.

To Reproduce
Steps to reproduce the behavior:
Try to restore with (valid directory) --temp-dir argument and see the following error:

Traceback (most recent call last):,
  File '/usr/local/bin/rethinkdb-restore', line 11, in <module>,
    sys.exit(main()),
  File '/usr/local/lib/python3.5/dist-packages/rethinkdb/_restore.py', line 336, in main,
    options = parse_options(argv, prog=prog),
  File '/usr/local/lib/python3.5/dist-packages/rethinkdb/_restore.py', line 183, in parse_options,
    if not os.access(options['temp_dir'], os.W_OK):,

TypeError: 'Values' object is not subscriptable,
Command exited with non-zero status 1,
	Command being timed: 'rethinkdb restore -i atticus_uk --temp-dir /data/backups --force /data/backups/atticus_uk.tar.gz',
	User time (seconds): 0.14,
	System time (seconds): 0.03,
	Percent of CPU this job got: 99%,

Expected behavior
Restore the database.

System info

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.6 LTS
Release:	16.04
Codename:	xenial

$ python --version
Python 3.5.2

$ rethinkdb --version
rethinkdb 2.4.0~0xenial (GCC 5.4.0)

$ pip3 show rethinkdb
---
Metadata-Version: 2.1
Name: rethinkdb
Version: 2.4.7
Summary: Python driver library for the RethinkDB database server.
Home-page: https://github.com/RethinkDB/rethinkdb-python
Author: None
Author-email: None
Installer: pip
License: UNKNOWN
Location: /usr/local/lib/python3.5/dist-packages
Requires: six
Classifiers:
  Intended Audience :: Developers
  Natural Language :: English
  Programming Language :: Python :: 2
  Programming Language :: Python :: 2.7
  Programming Language :: Python :: 3
  Programming Language :: Python :: 3.5
  Programming Language :: Python :: 3.6
  Programming Language :: Python :: 3.7
  Programming Language :: Python :: 3.8
Entry-points:
  [console_scripts]
  rethinkdb-dump = rethinkdb._dump:main
  rethinkdb-export = rethinkdb._export:main
  rethinkdb-import = rethinkdb._import:main
  rethinkdb-index-rebuild = rethinkdb._index_rebuild:main
  rethinkdb-repl = rethinkdb.__main__:startInterpreter
  rethinkdb-restore = rethinkdb._restore:main

Additional context
It looks like a typo on _restore.py:183, which should be options.temp_dir. PR to follow.

@mishawakerman mishawakerman added bug Something isn't working not qualified The issue is not checked yet by the owners labels Jun 1, 2020
@mishawakerman
Copy link
Contributor Author

For anyone else having this issue, our workaround was to go back to rethinkdb==2.3.0.post6 (the same issue appears to be present in 2.4.0).

@mishawakerman
Copy link
Contributor Author

Perhaps would've been caught with #172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working not qualified The issue is not checked yet by the owners
Projects
None yet
Development

No branches or pull requests

1 participant