Giter Club home page Giter Club logo

nuclia.py's People

Contributors

bloodbare avatar ciniesta avatar clayrisse avatar ebrehault avatar jotare avatar lferran avatar tarekziade avatar vangheem avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

flipmcf aliniaai

nuclia.py's Issues

Nuclia CLI: get resource with '--show=origin' fails

Based on my very, very brief introduction to "Python Fire" in this package, I would think this should work - but not sure.

./venv/bin/nuclia kb resource get --slug=6dc9371803e65f17a0319e4fe1db312e --show=origin

and it does not:

nucliadb_sdk.v2.exceptions.UnknownError: Unknown error connecting to API: 422:
 {"detail":[{"loc":["query","show",0],
   "msg":"value is not a valid enumeration member; 
        permitted: 'basic', 'origin', 'extra', 'relations', 'values', 'extracted', 'errors'"

And the reason becomes humorously obvious with a touch of debug:

> ./venv/lib/python3.9/site-packages/nuclia/sdk/resource.py(62)get()
-> if "basic" not in show:
(Pdb) show
['o', 'r', 'i', 'g', 'i', 'n']

and then, only because of years of python experience, we find these commands do work:

Add a comma:

 ./venv/bin/nuclia kb resource get --slug=6dc9371803e65f17a0319e4fe1db312e --show=origin,

Make it look like a list:

./venv/bin/nuclia kb resource get --slug=6dc9371803e65f17a0319e4fe1db312e --show=[origin]

./venv/bin/nuclia kb resource get --slug=6dc9371803e65f17a0319e4fe1db312e --show=[origin, basic]

So, is this worth fixing, or documenting? And if it is already documented (and I didn't RTFM) please forgive me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.