Comments (26)
I wasn't aware we were trying for backwards compatibility with 2.7; for some reason - I dunno why.
The issue with -p is not the port; it's looking to set a password. That should be easy enough
to fix and can also account for the other args that were broken/breaking. I did not look at them all at the time. I'll try and get a look at that tomorrow. The lack of tests is really a sub optimal scenario.
from rethinkdb-python.
@shuat just pip install rethinkdb==2.3.0.post6
. All the previous versions are available on PyPi (https://pypi.org/project/rethinkdb/#history)
from rethinkdb-python.
@shuat Hello, it seems that the import/dump/... commands are broken. As I have time I’ll look into this.
from rethinkdb-python.
@gabor-boros Thanks for the quick answer. Is there any workaround for backing up my DB?
from rethinkdb-python.
@shuat Can you confirm that you installed 2.4.1?
As I guess there is no workaround yet, except downgrading to version 2.3.x temporary.
I’ll look into the issue today or tomorrow.
from rethinkdb-python.
Also having this issue with a slightly different option (TypeError: check_tls_option() takes exactly 2 arguments (3 given)). 2.4.0 and 2.4.1 both error out. 2.3.0 seems to work.
from rethinkdb-python.
@psschroeter thanks for reporting, we definitely need to look into this issue as soon as we can
from rethinkdb-python.
@psschroeter @shuat There are several issues. The first issue is that the -c
flag is not working. I do not know yet why, but it is not. The second issue is that multiprocessing has no get_context
in python 2.7.x.
If it is not enough, then there are other broken things as well. We have two options:
- Diff the changes between master and e801bb5 (this commit contains a working dump functionality but the -c flag issue is there as well).
- Due to the dump/import/etc.. functionalities are not tested, and not well-organized we could refactor/rewrite it from zero and write a ton of unit/integration tests around it. Although I'm not a big fan of rewrite things like this I would vote for this.
What do you think @grandquista ?
from rethinkdb-python.
I'm confused again. I told you I fixed this
from rethinkdb-python.
@sawdog here is the change what you provided: 086a768 but it does not fixed the issue
from rethinkdb-python.
-p
also throws an error, and for some reason it's not accepting the first argument passed to it, figured this applied to this issue.
backend git:(master) ✗ rethinkdb dump - -p
Password for `admin`:
Traceback (most recent call last):
File "/usr/local/bin/rethinkdb-dump", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/rethinkdb/_dump.py", line 143, in main
options = parse_options(argv or sys.argv[2:], prog=prog)
File "/usr/local/lib/python3.7/site-packages/rethinkdb/_dump.py", line 94, in parse_options
options, args = parser.parse_args(argv)
File "/usr/local/lib/python3.7/site-packages/rethinkdb/utils_common.py", line 359, in parse_args
options, args = super(CommonOptionsParser, self).parse_args(*args, **kwargs)
File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/optparse.py", line 1387, in parse_args
stop = self._process_args(largs, rargs, values)
File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/optparse.py", line 1431, in _process_args
self._process_short_opts(rargs, values)
File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/optparse.py", line 1536, in _process_short_opts
option.process(opt, value, values, self)
File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/optparse.py", line 785, in process
self.action, self.dest, opt, value, values, parser)
File "/usr/local/lib/python3.7/site-packages/rethinkdb/utils_common.py", line 249, in take_action
values[dest] = getpass.getpass('Password for `admin`: ')
TypeError: 'Values' object does not support item assignment
from rethinkdb-python.
@shuat Can you confirm that you installed 2.4.1?
As I guess there is no workaround yet, except downgrading to version 2.3.x temporary.
I’ll look into the issue today or tomorrow.
@gabor-boros Sorry for the slow reply
This is what I have /usr/local/lib/python3.4/dist-packages (2.4.1)
So yes I have 2.4.1
from rethinkdb-python.
@gabor-boros Where can I get an old version? Seems pip only has one version
root@bd07b97dd7c9:/data# yolk -V rethinkdb
rethinkdb 2.4.1
from rethinkdb-python.
@shuat @Stilldabomb @grandquista it seems that I was able to fix the issue (will be merged soon) but the first argument is not picked up. I can not locate the issue, but the workaround until we figure it out will be: rethinkdb dump - -c host:port
. (please note the -
after the dump/import)
from rethinkdb-python.
The issue will be fixed by #106
from rethinkdb-python.
Could wee know once the update has been pushed?
from rethinkdb-python.
I’m waiting for the review of @grandquista
from rethinkdb-python.
So it is merged. There are 2 other issues what we should resolve before the release, but I'll keep this issue updated
from rethinkdb-python.
All the other issues are resolved. I’ll do the release during the weekend or Monday
from rethinkdb-python.
V2.4.2 is out containing for for this issue
from rethinkdb-python.
Good job!
from rethinkdb-python.
Mmm... rethinkdb-dump
now requires dump
as first argument, while in 2.3.0* it wasn't needed.
from rethinkdb-python.
Well, I have the same error message like @shuat.
$ rethinkdb-dump dump -c 172.23.0.2:28015 --password-file pw.txt
Traceback (most recent call last):
File "/usr/bin/rethinkdb-dump", line 10, in <module>
sys.exit(main())
File "/usr/lib/python3.7/site-packages/rethinkdb/_dump.py", line 143, in main
options = parse_options(argv or sys.argv[2:], prog=prog)
File "/usr/lib/python3.7/site-packages/rethinkdb/_dump.py", line 94, in parse_options
options, args = parser.parse_args(argv)
File "/usr/lib/python3.7/site-packages/rethinkdb/utils_common.py", line 359, in parse_args
options, args = super(CommonOptionsParser, self).parse_args(*args, **kwargs)
File "/usr/lib/python3.7/optparse.py", line 1387, in parse_args
stop = self._process_args(largs, rargs, values)
File "/usr/lib/python3.7/optparse.py", line 1427, in _process_args
self._process_long_opt(rargs, values)
File "/usr/lib/python3.7/optparse.py", line 1501, in _process_long_opt
option.process(opt, value, values, self)
File "/usr/lib/python3.7/optparse.py", line 779, in process
value = self.convert_value(opt, value)
File "/usr/lib/python3.7/optparse.py", line 771, in convert_value
return self.check_value(opt, value)
File "/usr/lib/python3.7/optparse.py", line 766, in check_value
return checker(self, opt, value)
TypeError: file_contents() takes 2 positional arguments but 3 were given
And thats with the current python-rethinkdb version:
$ pip list | grep rethink
rethinkdb 2.4.2.post1
With the version 2.3.6 is it working quite well:
$ rethinkdb-dump -c 172.23.0.2:28015 --password-file pw.txt
NOTE: 'rethinkdb-dump' saves data and secondary indexes, but does *not* save
cluster metadata. You will need to recreate your cluster setup yourself after
you run 'rethinkdb-restore'.
Exporting to directory...
[========================================] 100%
68 rows exported from 4 tables, with 0 secondary indexes
Done (0 seconds)
Zipping export directory...
Done (0 seconds)
from rethinkdb-python.
Version 2.4.2.post1
does not work for me while 2.3.0.post6
does.
$ pip install rethinkdb==2.3.0.post6
[...]
$ rethinkdb dump --connect localhost:28015 --password --export test.users
NOTE: 'rethinkdb-dump' saves data and secondary indexes, but does *not* save
cluster metadata. You will need to recreate your cluster setup yourself after
you run 'rethinkdb-restore'.
Exporting to directory...
Password for `admin`:
[========================================] 100%
38 rows exported from 1 table, with 2 secondary indexes
Done (0 seconds)
Zipping export directory...
Done (0 seconds)
$ pip install rethinkdb==2.4.2.post1
[...]
$ rethinkdb dump --connect localhost:28015 --password --export test.users
Password for `admin`:
Traceback (most recent call last):
File "/srv/http/test/venv/bin/rethinkdb-dump", line 10, in <module>
sys.exit(main())
File "/srv/http/test/venv/lib/python3.5/site-packages/rethinkdb/_dump.py", line 143, in main
options = parse_options(argv or sys.argv[2:], prog=prog)
File "/srv/http/test/venv/lib/python3.5/site-packages/rethinkdb/_dump.py", line 94, in parse_options
options, args = parser.parse_args(argv)
File "/srv/http/test/venv/lib/python3.5/site-packages/rethinkdb/utils_common.py", line 359, in parse_args
options, args = super(CommonOptionsParser, self).parse_args(*args, **kwargs)
File "/usr/lib/python3.5/optparse.py", line 1386, in parse_args
stop = self._process_args(largs, rargs, values)
File "/usr/lib/python3.5/optparse.py", line 1426, in _process_args
self._process_long_opt(rargs, values)
File "/usr/lib/python3.5/optparse.py", line 1500, in _process_long_opt
option.process(opt, value, values, self)
File "/usr/lib/python3.5/optparse.py", line 784, in process
self.action, self.dest, opt, value, values, parser)
File "/srv/http/test/venv/lib/python3.5/site-packages/rethinkdb/utils_common.py", line 249, in take_action
values[dest] = getpass.getpass('Password for `admin`: ')
TypeError: 'Values' object does not support item assignment
$ rethinkdb dump - --connect localhost:28015 --password --export test.users
Password for `admin`:
Traceback (most recent call last):
File "/srv/http/test/venv/bin/rethinkdb-dump", line 10, in <module>
sys.exit(main())
File "/srv/http/test/venv/lib/python3.5/site-packages/rethinkdb/_dump.py", line 143, in main
options = parse_options(argv or sys.argv[2:], prog=prog)
File "/srv/http/test/venv/lib/python3.5/site-packages/rethinkdb/_dump.py", line 94, in parse_options
options, args = parser.parse_args(argv)
File "/srv/http/test/venv/lib/python3.5/site-packages/rethinkdb/utils_common.py", line 359, in parse_args
options, args = super(CommonOptionsParser, self).parse_args(*args, **kwargs)
File "/usr/lib/python3.5/optparse.py", line 1386, in parse_args
stop = self._process_args(largs, rargs, values)
File "/usr/lib/python3.5/optparse.py", line 1426, in _process_args
self._process_long_opt(rargs, values)
File "/usr/lib/python3.5/optparse.py", line 1500, in _process_long_opt
option.process(opt, value, values, self)
File "/usr/lib/python3.5/optparse.py", line 784, in process
self.action, self.dest, opt, value, values, parser)
File "/srv/http/test/venv/lib/python3.5/site-packages/rethinkdb/utils_common.py", line 249, in take_action
values[dest] = getpass.getpass('Password for `admin`: ')
TypeError: 'Values' object does not support item assignment
from rethinkdb-python.
Per this comment and:
TypeError: file_contents() takes 2 positional arguments but 3 were given
It seems that what happens is --password-file
gets sent twice. So from utils_common.py
:
def file_contents(opt_str, value):
opt_str
is--password-file
value
is--password-file
- and the third argument is the actual file location.
Don't know why that is though. Changes in optparse? Incompatibilities in python2?
For the record this is on an older version of python (2.7.6) using 2.4.2 of this driver.
from rethinkdb-python.
Is this being worked on? Otherwise I can resolve it - just assigned to me.
from rethinkdb-python.
Related Issues (20)
- Add a compressed output format for rethinkdb export / import HOT 6
- index variable is a string but is used as a dict ("string indices must be integers") HOT 3
- DeprecationWarning with pytest
- RethinkDB converts float 0.0 to int 0 HOT 3
- Asyncio not compatible with python 3.10 HOT 10
- Test fail. HOT 1
- Proposal: Disconnect connection when garbage collected HOT 1
- 'JsonSourceFile' object has no attribute 'bytes_processed' when using restore HOT 1
- Encountering primary key error while running rethinkdb restore for rethinkdb 2.4 version HOT 5
- Typing and docstring support for better IDE experience HOT 1
- Continuous integration and code coverage checks
- Python3.11 compatibility HOT 3
- asyncio deprecated '@asyncio.coroutine' in python 3.11 HOT 3
- Python 3.11 gets error "module ' asyncio' has no attribute 'coroutine'" HOT 1
- Python 3.12 breakage: The distutils module is removed
- 2.4.10 release HOT 10
- Fix wait_closed dependency on Python <3.7
- _restore not handling -i DB.TABLE
- ModuleNotFoundError: No module named 'looseversion' HOT 1
- 2.4.11 Realease HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rethinkdb-python.