Skip to content

amcat.codingjob.results gives error 500 #9

@jogrue

Description

@jogrue

Hello,

I am trying to directly access the results from coding jobs through R with this command (if you do need the real URL, project id, and job id, please, tell me):

tmp <- amcatr::amcat.codingjob.results(conn = amcat_con,
                                       project = 1,
                                       job = 1234)

R then reports something like this:

GET http://abcd.amcat.nl/api/v4/projects/1/codingjobs/1234/codingschemafields/?page_size=1000&format=rda&page=1
GET http://abcd.amcat.nl/api/v4/projects/1/codingjobs/1234/codebooks/?page_size=99999&format=json&page=1
GET http://abcd.amcat.nl/api/v4/projects/1/codingjobs/1234/coded_articles/?page_size=1000&format=rda&page=1
Fehler in amcat.getURL(conn, path, page_filters, post = post, post_options,  : 
  Unexpected Response Code 500
This seems to be an AmCAT server error. Please see the server logs or create an issue at http://github.com/amcat/amcat/issues
Response written to /tmp/RtmpLjj30p/file52d339f0eeef

The response then reads like this:

{
  "status": 500,
  "details": "TypeError: Don't know how to convert <class 'datetime.datetime'> to R",
  "error": true,
  "message": "500 : An Error has occurred",
  "description": "The server encountered an internal error or misconfiguration and\n                     was unable to complete your request."
}

So the problem seems to be calling http://abcd.amcat.nl/api/v4/projects/1/codingjobs/1234/coded_articles/?page_size=1000&format=rda&page=1 with the rda format (and here with datetime conversion). Opening the URL with format json instead of rda does not return an error. Our server reports AmCAT version 3.5rc1 in the web interface.

Best regards,
Johann

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions