Skip to content

Handle exception when config file not found #13

@sanjayankur31

Description

@sanjayankur31

At the moment, it crashes with an Exception. It shouldn't crash


Traceback (most recent call last):
  File "/usr/bin/nsgr_job", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/pynsgr/commands/nsgr_job.py", line 162, in main
    sys.exit(nsgr_job(sys.argv))
             ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pynsgr/commands/nsgr_job.py", line 86, in nsgr_job
    properties = CipresClient.Application(conf_filepath).getProperties()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pynsgr/client.py", line 499, in __init__
    raise Exception(
Exception: Didn't find the file: ~/.nsgrest.conf or ~/nsgrest.conf (which should contain properties {'USERNAME', 'URL', 'APPID', 'APPNAME', 'PASSWORD'}) or /opt/user/nsgrest.conf on Open Source Brain v2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions