Skip to content

Example code throws "Error: lexical error: invalid char in json text." #69

Description

@ulyngs

Hi there,

I'm trying to simply run the 'get_summary' example from the readme, and it throws this error:

call_limer(method = "get_summary", 
           params = list(iSurveyID = 919631, #one of my surveys
                         sStatname = "completed_responses"))

Error: lexical error: invalid char in json text.
<html lang="en"
(right here) ------^

Here's the traceback

Error: lexical error: invalid char in json text.
                                       <!DOCTYPE html> <html lang="en"
                     (right here) ------^
5. parse_string(txt, bigint_as_char)
4. parseJSON(txt, bigint_as_char)
3. parse_and_simplify(txt = txt, simplifyVector = simplifyVector,
simplifyDataFrame = simplifyDataFrame, simplifyMatrix = simplifyMatrix,
flatten = flatten, ...)
2. jsonlite::fromJSON(httr::content(r, as = "text", encoding = "utf-8"))
1. call_limer(method = "export_responses", params = list(iSurveyID = 919631))

call_limer(method = "list_surveys") works, but I get this error consistently when trying to export data with an arbitrary API call.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions