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

Batch endpoint not functioning #14

Open
jcp-issachar-ai opened this issue Feb 7, 2023 · 4 comments
Open

Batch endpoint not functioning #14

jcp-issachar-ai opened this issue Feb 7, 2023 · 4 comments

Comments

@jcp-issachar-ai
Copy link

jcp-issachar-ai commented Feb 7, 2023

  • Factset Formula API:
  • 2.0.0:
  • Python:
  • WSL 2:

Describe the bug
Batch processing for the formula api endpoint does not function as expected. Returns '''Invalid type for variable 'data'. Required value type is dict and passed type was list at ['received_data']['data']''' for a valid batch id as input.

To Reproduce
Steps to reproduce the behavior:

  1. Generate a valid batch id string using formula api.

  2. Wait till batch status is "DONE'

  3. Use provided get_batch_data code or get_batch_data_with_post examples to get data.

  4. Example:
    ` with fds.sdk.Formula.ApiClient(configuration) as api_client:

     api_instance = batch_processing_api.BatchProcessingApi(api_client)
    
     id = id # str | Batch Request identifier.
    
     try:
         # Returns the response for a Batch Request
         # example passing only required values which don't have defaults set
         api_response = api_instance.get_batch_data(id)
         responseWrapper = {
             200: api_response.get_response_200,
             202: api_response.get_response_202,
         }
         print(responseWrapper[api_response.status_code]())
    
     except fds.sdk.Formula.ApiException as e:
         print("Exception when calling BatchProcessingApi->get_batch_data: %s\n" % e)`
    

Expected behavior
Return a timeseries for the requested batch job.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@granitdula
Copy link

granitdula commented Feb 7, 2023

Hi @jcp-issachar-ai, thank you for filing the issue.

We are looking in to this and will get back to you as soon as we can.

@granitdula
Copy link

granitdula commented Feb 8, 2023

@jcp-issachar-ai We are currently working on a fix for this and will get back to you as soon as that is done.

In the meantime, there is a quick workaround you can use:

api_response = api_instance.get_batch_data(id, _check_return_type=False)

This should give the result your expecting.

Hopefully this helps.

@jcp-issachar-ai
Copy link
Author

jcp-issachar-ai commented Feb 9, 2023 via email

@zachgrayio
Copy link

running into this myself as well, more than a year later. workaround seems to work, but 😨

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