NASA-PDS / pds-api-client

Python library and API for accessing the online PDS Search API. This repository however only contains the utilities used to generate, test, document and demo the actual pds.api-client package. The library itself is only released on pypi (https://pypi.org/project/pds.api-client/) but not here on github
https://nasa-pds.github.io/pds-api-client/
Apache License 2.0
1 stars 2 forks source link

Import failure for pds.api_client.CollectionsApi using PIP package 0.8.0 #17

Closed cpiker closed 2 years ago

cpiker commented 2 years ago

🐛 Describe the bug

Example code in quickstart/index.rst doesn't work for version 0.8.0.

📜 To Reproduce

Steps to reproduce the behavior

  1. Install pip package, start python 3.8 on Linux ubuntu 20
    $ pip3 install pds.api-client
    $ python3.8
  2. Import the CollectionsApi
    >>> from pds.api_client import CollectionsApi
  3. Get error
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ImportError: cannot import name 'CollectionsApi' from 'pds.api_client' ($HOME/.local/lib/python3.8/site-packages/pds/api_client/__init__.py)

    where $HOME represents user home directory.

🕵️ Expected behavior

An import with no traceback

📚 Version of Software Used

0.8.0 from PIP install

🖥 System Info

🦄 Related requirements

⚙️ Engineering Details

jordanpadams commented 2 years ago

@tloubrieu-jpl can we track down the issue here ASAP?

jordanpadams commented 2 years ago

@tloubrieu-jpl this was a user identified critical bug that has now been open for 2 weeks. can we please look at this or get someone to look at this ASAP?

tloubrieu-jpl commented 2 years ago

@jordanpadams sorry I missed that. I will do something for that today.

tloubrieu-jpl commented 2 years ago

Hi @cpiker

Sorry for the delay.

There is an error in the quickstart documentation, the import command for CollectionsAPI should be

from pds.api_client.api.collections_api import CollectionsApi

I will update the documentation. Sorry again for the delay.

tloubrieu-jpl commented 2 years ago

@cpiker @jordanpadams

I have updated the documentation on https://nasa-pds.github.io/pds-api-client/quickstart/index.html

I will close the ticket with that. You can re-open it or open a new one if something else goes wrong.

Thanks

jordanpadams commented 2 years ago

closed per 295f0a5792b7c5b892bbef43feb393c27ae8d23b

cpiker commented 2 years ago

Thanks for updating the docs, I was able to get a bit further. Though the example code linked above gives a 500 Internal Server Error, I presume that's just a temporary outage.

tloubrieu-jpl commented 2 years ago

Thanks @cpiker , let's create new ticket for this issue