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

Getting error 'ValueError: If using all scalar values, you must pass an index' #1

Open
pst2154 opened this issue Sep 13, 2022 · 3 comments

Comments

@pst2154
Copy link

pst2154 commented Sep 13, 2022

running df = arcospy.drug_list(key = 'WaPo') and getting error (it worked last week)

/tmp/1000670000/ipykernel_3706/3516493274.py in <module>
----> 1 df = arcospy.drug_list(key = 'WaPo')

/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/arcospy/arcospy.py in drug_list(key)
    296     requestdata = requestdata.json()
    297 
--> 298     return pd.DataFrame.from_records(requestdata)
    299 
    300 def not_pharmacies(key=''):

/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/pandas/core/frame.py in from_records(cls, data, index, exclude, columns, coerce_float, nrows)
   2120 
   2121         manager = get_option("mode.data_manager")
-> 2122         mgr = arrays_to_mgr(arrays, arr_columns, result_index, columns, typ=manager)
   2123 
   2124         return cls(mgr)

/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/pandas/core/internals/construction.py in arrays_to_mgr(arrays, arr_names, index, columns, dtype, verify_integrity, typ, consolidate)
    117         # figure out the index, if necessary
    118         if index is None:
--> 119             index = _extract_index(arrays)
    120         else:
    121             index = ensure_index(index)

/opt/conda/envs/Python-3.9/lib/python3.9/site-packages/pandas/core/internals/construction.py in _extract_index(data)
    623 
    624         if not indexes and not raw_lengths:
--> 625             raise ValueError("If using all scalar values, you must pass an index")
    626 
    627         if have_series:

ValueError: If using all scalar values, you must pass an index
@pst2154
Copy link
Author

pst2154 commented Sep 13, 2022

Seems to be an issue with the API not returning values/having issues with key='Wapo' now

@webcoderz
Copy link

seems like the api is down

@jeffcsauer
Copy link
Owner

Apologies for the delayed response. Cutting a new release. Working for me now as of 11/25/2023. Let me know if you are still encountering an issue!

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

3 participants