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

smart info raises on fresh install #745

Open
MattToast opened this issue Oct 14, 2024 · 0 comments
Open

smart info raises on fresh install #745

MattToast opened this issue Oct 14, 2024 · 0 comments
Assignees
Labels
bug: minor A minor bug

Comments

@MattToast
Copy link
Member

MattToast commented Oct 14, 2024

Description

When installing SmartSim, if a user runs smart info prior to running smart build, a smartsim/_core/bin directory does not exist, and therefore a FileNotFoundError is raised.

How to reproduce

$ pip install smartsim[dev,mypy]
$ # Very deliberately NOT running `smart build ...` here
$ smart info

Smart Python Packages:
╒════════════╤═══════════╕
│ Name       │ Version   │
╞════════════╪═══════════╡
│ SmartSim   │ 0.8.0     │
│ SmartRedis │ 0.6.1     │
╘════════════╧═══════════╛

Orchestrator Configuration:
Traceback (most recent call last):
  File "/lus/bnchlu1/drozt/repos/ssdev/ss/venv/bin/smart", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/lus/bnchlu1/drozt/repos/ssdev/ss/smartsim/_core/_cli/__main__.py", line 43, in main
    return smart_cli.execute(sys.argv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lus/bnchlu1/drozt/repos/ssdev/ss/smartsim/_core/_cli/cli.py", line 88, in execute
    return menu_item.handler(args, unparsed_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lus/bnchlu1/drozt/repos/ssdev/ss/smartsim/_core/_cli/info.py", line 33, in execute
    db_path = _utils.get_db_path()
              ^^^^^^^^^^^^^^^^^^^^
  File "/lus/bnchlu1/drozt/repos/ssdev/ss/smartsim/_core/_cli/utils.py", line 123, in get_db_path
    for option in bin_path.iterdir():
  File "/lus/scratch/drozt/.pyenv/versions/3.11.9/lib/python3.11/pathlib.py", line 931, in iterdir
    for name in os.listdir(self):
                ^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/lus/bnchlu1/drozt/repos/ssdev/ss/smartsim/_core/bin'

Expected behavior

smart info should not raise. Instead it should just report that no binaries were found.

System

Any/All

@MattToast MattToast added the bug: minor A minor bug label Oct 14, 2024
@MattToast MattToast self-assigned this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: minor A minor bug
Projects
None yet
Development

No branches or pull requests

1 participant