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

obscure error message for .s3cfg not found #1361

Open
mikereiche opened this issue Dec 20, 2023 · 1 comment
Open

obscure error message for .s3cfg not found #1361

mikereiche opened this issue Dec 20, 2023 · 1 comment

Comments

@mikereiche
Copy link

% s3cmd --configure

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An unexpected error has occurred.
Please try reproducing the error using
the latest s3cmd code from the git master
branch found at:
https://github.com/s3tools/s3cmd
and have a look at the known issues list:
https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions-(FAQ)
If the error persists, please report the
following lines (removing any private
info as necessary) to:
s3tools-bugs@lists.sourceforge.net

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Invoked as: /usr/local/bin/s3cmd --configure
Problem: <class 'AttributeError: 'ConfigParser' object has no attribute 'readfp'
S3cmd: 2.4.0
python: 3.12.1 (main, Dec 8 2023, 19:21:52) [Clang 14.0.3 (clang-1403.0.22.14.1)]
environment LANG=en_US.UTF-8

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/S3/Config.py", line 269, in init
self.read_config_file(configfile)
File "/usr/local/lib/python3.12/site-packages/S3/Config.py", line 551, in read_config_file
cp = ConfigParser(configfile)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/S3/Config.py", line 640, in init
self.parse_file(file, sections)
File "/usr/local/lib/python3.12/site-packages/S3/Config.py", line 652, in parse_file
with io.open(file, "r", encoding=self.get('encoding', 'UTF-8')) as fp:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/michaelreiche/.s3cfg'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/s3cmd", line 3627, in
rc = main()
^^^^^^
File "/usr/local/bin/s3cmd", line 3313, in main
cfg = Config(options.config, options.access_key, options.secret_key, options.access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/S3/Config.py", line 272, in init
self.aws_credential_file()
File "/usr/local/lib/python3.12/site-packages/S3/Config.py", line 459, in aws_credential_file
config.readfp(io.StringIO(config_string))
^^^^^^^^^^^^^
AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
An unexpected error has occurred.
Please try reproducing the error using
the latest s3cmd code from the git master
branch found at:
https://github.com/s3tools/s3cmd
and have a look at the known issues list:
https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions-(FAQ)
If the error persists, please report the
above lines (removing any private
info as necessary) to:
s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@ms-jpq
Copy link

ms-jpq commented Feb 16, 2024

config.readfp should be config.read_file since python3.2

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