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

NGAMS python client --server option bug #60

Closed
smclay opened this issue Oct 17, 2021 · 1 comment
Closed

NGAMS python client --server option bug #60

smclay opened this issue Oct 17, 2021 · 1 comment

Comments

@smclay
Copy link
Contributor

smclay commented Oct 17, 2021

I get the following bug when attempting to use the --server command line option for the NGAMS python client

$ /usr/bin/ngams3PClient --servers "my-server:7777" --status /path/to/response.xml --timeout 5 --file-uri /path/to/file.txt --mime-type text/data ARCHIVE
Traceback (most recent call last):
  File "/usr/bin/ngams3PClient", line 11, in <module>
    load_entry_point('ngamsPClient==11.0', 'console_scripts', 'ngamsPClient')()
  File "/usr/lib/python3.6/site-packages/ngamsPClient/ngamsPClient.py", line 887, in main
    servers = [(host, int(port)) for s in opts.servers.split(',') for host,port in s.split(':')]
  File "/usr/lib/python3.6/site-packages/ngamsPClient/ngamsPClient.py", line 887, in <listcomp>
    servers = [(host, int(port)) for s in opts.servers.split(',') for host,port in s.split(':')]
ValueError: too many values to unpack (expected 2)
rtobar added a commit that referenced this issue Oct 18, 2021
This piece of code wasn't covered by our unit tests, so the bug wasn't
uncovered until reported in #60.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
rtobar added a commit that referenced this issue Oct 18, 2021
This will ensure #60 doesn't happen again.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
@rtobar rtobar changed the title NGAMS python client --serer option bug NGAMS python client --server option bug Oct 18, 2021
rtobar added a commit that referenced this issue Oct 19, 2021
This piece of code wasn't covered by our unit tests, so the bug wasn't
uncovered until reported in #60.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
rtobar added a commit that referenced this issue Oct 19, 2021
This will ensure #60 doesn't happen again.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
@rtobar
Copy link
Contributor

rtobar commented Oct 19, 2021

Thanks @smclay for reporting, there was indeed a bug in the parsing of the value given via the --servers command line flag. This has now been fixed and merged to master, and a new unit test has been added to make sure this doesn't break in the future.

@rtobar rtobar closed this as completed Oct 19, 2021
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