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

changing location doesn't work properly #2

Open
bnlawrence opened this issue Jun 30, 2024 · 0 comments
Open

changing location doesn't work properly #2

bnlawrence opened this issue Jun 30, 2024 · 0 comments

Comments

@bnlawrence
Copy link
Contributor

s3> loc hrs3
Buckets:  hrcm
hrs3> cd hrcm
You need to select a bucket first ("cd bucket_name")
hrs3> cb hrcm
Bucket: hrcm contains 0.0B in 0 files/objects.
hrs3> ls
Location:  contains 0.0B in 0 files/objects.
This directory contains 0 files and 0 directories.
<empty>
hrs3> loc hpos
Traceback (most recent call last):
  File "/home/users/lawrence/GitRepos/s3view/s3v/s3core.py", line 25, in get_user_config
    return options[target]
           ~~~~~~~^^^^^^^^
KeyError: 'hpos'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/users/lawrence/.conda/envs/mampy24a/lib/python3.11/site-packages/cmd2/cmd2.py", line 2399, in onecmd_plus_hooks
    stop = self.onecmd(statement, add_to_history=add_to_history)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/users/lawrence/.conda/envs/mampy24a/lib/python3.11/site-packages/cmd2/cmd2.py", line 2852, in onecmd
    stop = func(statement)
           ^^^^^^^^^^^^^^^
  File "/home/users/lawrence/.conda/envs/mampy24a/lib/python3.11/site-packages/cmd2/decorators.py", line 382, in cmd_wrapper
    return func(*args_list, **kwargs)  # type: ignore[call-arg]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/users/lawrence/GitRepos/s3view/s3v/s3cmd.py", line 159, in do_loc
    self._navconfig(arg.alias)
  File "/home/users/lawrence/GitRepos/s3view/s3v/s3cmd.py", line 62, in _navconfig
    self.client = get_client(self.alias)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/users/lawrence/GitRepos/s3view/s3v/s3core.py", line 35, in get_client
    credentials = get_user_config(alias)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/users/lawrence/GitRepos/s3view/s3v/s3core.py", line 27, in get_user_config
    raise ValueError(f'Minio target [{target}] not found in ~/{config_file}')
ValueError: Minio target [hpos] not found in ~/.mc/config.json
EXCEPTION of type 'ValueError' occurred with message: Minio target [hpos] not found in ~/.mc/config.json
hpos> loc hpos
Buckets:  hrcm
hpos> lb
Buckets:  hrcm
hpos> loc hpos
Buckets:  hrcm
hpos> loc
Usage: loc [-h] alias
Error: the following arguments are required: alias

hpos> 
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

1 participant