Skip to content

Error When Using period = "quarters" in sfa_load_statements #65

Description

@snvv

Description

I attempted to use the sfa_load_statements() function with the period = "quarters" parameter, but encountered the following error:

Code Example

sfa_load_statements(
  ticker = "AAPL",
  id = NULL,
  statements = "pl",
  period = "quarters",
  fyear = NULL,
  start = NULL,
  end = NULL,
  ttm = FALSE,
  asreported = TRUE,
  api_key = getOption("sfa_api_key"),
  cache_dir = getOption("sfa_cache_dir")
)

Error Message

Error: SimFin API Error 500: {"timestamp":"2025-01-11T09:44:19.234998239","status":"500","error":"Failed to convert 
value of type \u0027java.lang.String\u0027 to required type \u0027java.util.List\u0027; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@io.swagger.v3.oas.annotations.Parameter @org.springframework.web.bind.annotation.RequestParam simfin.library.domain.enums.Period] for value \u0027quarters\u0027; nested exception is java.lang.IllegalArgumentException: No enum constant simfin.library.domain.enums.Period.quarters","message":"Failed to convert value of type \u0027java.lang.String\u0027 to required type \u0027java.util.List\u0027; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@io.swagger.v3.oas.annotations.Parameter @org.springframework.web.bind.annotation.RequestParam simfin.library.domain.enums.Per

Question

Is there something I can do to resolve this issue? It seems the API is unable to process the period = "quarters" parameter.

Environment

  • SimFinR Version: 1.0.0
  • R Version: 4.4.2
  • Operating System: linux - debian sid

Thank you for your help!

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions