Skip to content

cli/sdk: three silent or misleading failures (-t, --tree /, api_write relpath) #285

Description

@myme

Three places where a command fails without saying so. Same family as #235, and #57 / #39 on the reporting side.

1. -t applies nothing and exits 1

On 0.6.1 this crashed with TypeError: cannot unpack non-iterable NoneType object. On 0.6.3 the traceback is gone, but it still doesn't work — no output, exit 1, tag not applied:

novem -p my-plot -t +sometag ; echo $?   # 1, and the tag is not there

Arguably worse than the crash, since nothing points at the failure. Workaround: novem --put /vis/plots/my-plot/tags/+sometag.

2. novem --tree / prints nothing and exits 0

--tree on a resource works fine. At the API root it produces no output and no error, so it reads as "the root is empty" rather than "unsupported".

3. SDK api_write concatenates a relpath without a leading slash

p.api_write("vars/probe/value", "70")
# -> https://api.novem.io/v1/vis/plots/my-plotvars/probe/value

Note my-plotvars. The resulting 404 message ends with "Are you authenticated?", which sends you off checking credentials when the real problem is the joined path. Normalising the join — or rejecting a relpath with no leading slash — would fix it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions