Closed MathewBiddle closed 1 year ago
Thank you for highlighting this. This does not work because instituteid
isn't a default argument in the getpoints()
method. Currently, while executing the query keyword arguments or kwargs
are not addressed. I'll issue a fix at the earliest.
If it helps, here is the workaround @ocefpaf came up with:
import pandas as pd
institution_id = '23070'
url = 'https://api.obis.org/v3/dataset?instituteid={}'.format(institution_id)
df = pd.read_json(url)
df = pd.DataFrame.from_records(df["results"])
df
I think, a simple fix in the package would be just replacing args
with {**args, **kwargs}
while passing the arguments for a GET request. Works for Python 3.5+
Is this pushed out (ie can I conda update pyobis
) or do I need to install from github?
This has not been released yet, and I think we should make a patch release for this now.
The release has been successfully pushed out on PyPI now.
Thank you @ayushanand18 and @7yl4r ! This works now.
Expect a new notebook in the IOOS CodeLab soon!
I'm working on a project where I'd like to use pyobis to search for all the records associated with a specific institution. Below is an example of the key part of the code that is not functioning as expected.
returns:
When it should return
I'm running