Python version support clarification
Hello,
I would like to update the README.md file and the s3cmd website with the new s3cmd 2.0 release info.
I see that we have a note that says: << S3cmd requires Python 2.6 or newer. (S3cmd is not yet compatible with Python 3.x. Work toward that is currently in progress) >>
Is the new s3cmd version 2.0 fully compatible with BOTH Python 2.6 (and newer) AND also with Python version 3.x?
Can we just say S3cmd requires Python 2.6 (or newer) or Python 3.x
thanks!
Yes it is the case :-) There is also a warning in the code when running under python 3, i will remove it.
ReadMe file and website updated with new Python info! http://s3tools.org/news
Even though Python 3 is supported, are there caveats/modifications to be made while running s3cmd with it? I'm following a tutorial right now that says to run s3cmd --configure and the first error I got was NameError: name 'raw_input' is not defined, which I know is the py2 version of input.
I have version 2.0.0 in my env and looking at the source here on github shows that raw_input is indeed in the source. I did a find/replace for raw_input -> input but I'm still getting an error AttributeError: '_io.BufferedWriter' object has no attribute 'encoding'
@drivelous Thank you very much for your report. "--configure" was indeed broken with python3. It is so evident that I missed it (and sadly it is not auto tested).
I have almost fixed that (will push tomorrow). When looking at that I did notice another issue with --dump-config and a few "unicode" issues in python2 that were never noticed so far.
@fviard awesome! thank you for the quick reply and turnaround.
@drivelous Thank you very much for your report. I have fixed that and other issues. Would be nice if you can give a try to the last MASTER version.
@fviard works like a charm, thank you again 👍
@fviard Ahh, it worked up to a point. I got to the point where I had to add the path to GPG (is this 100% necessary? sorry if that's a foolish question I've just never used GPG). I installed it via brew, added the path, used the settings, and go this failure:
Now verifying that encryption works...
ERROR: Test failed: can't concat bytes to str
Seems you still have 2.0.0 installed? I believe you have to install s3cmd direct from github if the current version is not installable via pip. I know it works for me now with the update.
On Fri, Aug 25, 2017 at 9:21 PM Clayton Blythe [email protected] wrote:
I am still running into the following error with python 3.60!
Invoked as: /Users/claytonblythe/anaconda3/bin/s3cmd --configure --verbose Problem: <class 'NameError: name 'raw_input' is not defined S3cmd: 2.0.0 python: 3.6.0 |Anaconda 4.3.1 (x86_64)| (default, Dec 23 2016, 13:19:00) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] environment LANG=en_US.UTF-8
Traceback (most recent call last): File "/Users/claytonblythe/anaconda3/bin/s3cmd", line 2996, in rc = main() File "/Users/claytonblythe/anaconda3/bin/s3cmd", line 2880, in main run_configure(options.config, args) File "/Users/claytonblythe/anaconda3/bin/s3cmd", line 2252, in run_configure val = raw_input(prompt + ": ") NameError: name 'raw_input' is not defined
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/s3tools/s3cmd/issues/898#issuecomment-325069283, or mute the thread https://github.com/notifications/unsubscribe-auth/AJIoOVoBzdTKkJa1Tbc5gq6YTKpX9Ha6ks5sb3MIgaJpZM4OY_70 .
@drivelous I'm also having this error that prevents me from using encryption:
Now verifying that encryption works...
ERROR: Test failed: can't concat bytes to str
Did you manage to solve this?
I've installed the master version with sudo python3 setup.py install on macos (s3cmd version 2.0.0+)
Is this error due to using python3?
@nodje @drivelous Thanks for the report, this issue is now fixed in MASTER.
@drivelous to reply to your unrelated question, it is not necessary to use gpg/encryption feature. Just let the password "empty" and default values, and it will not be used, it is just an additional feature.