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

--server-url with trailling slash causes error #18

Open
pgagne opened this issue Aug 4, 2022 · 0 comments
Open

--server-url with trailling slash causes error #18

pgagne opened this issue Aug 4, 2022 · 0 comments

Comments

@pgagne
Copy link

pgagne commented Aug 4, 2022

Running rlock like so

 rlock --server-url http://10.0.76.103:8000/  ...

Causes a cryptic error:

{'CONNECTION': 'OK'}
An unexpected error occured!
Traceback (most recent call last):
  File "(redacted)/.venv/lib/python3.10/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib64/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "(redacted)/.venv/bin/rlock", line 8, in <module>
    sys.exit(main())
  File "((redacted)/.venv/lib/python3.10/site-packages/framework/main.py", line 181, in main
    run(args)
  File "(redacted)/env/lib/python3.10/site-packages/framework/main.py", line 116, in run
    f.write(f"{new_queue.json().get('id')}")
  File "(redacted)/.venv/lib/python3.10/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

On the server

Not Found: //api/resource/retrieve_entrypoint/ntdv-3637

However, with out the / it works fine.

This causes issues when you try to copy the url from your browsers or something.

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