Python client up-to-date? Getting error calling Hook.validate()

Comments

5 comments

  • Stefan Ukena

    Ok, so I will answer my own question: podio-py is not up-to-date, or at least it is not working with the current app engine sdk (1.7.x). In case anybody else runs into the same problem: transport.py isn't encoding the POST payload the way podio expects it. Here is what I ended up changing (starting at line 123):

    if (self._method == "POST" or self._method == "PUT") and 'type' not in kwargs:

    headers.update(

      # was: {'content-type':'application/x-www-form-urlencoded'})

      {'content-type':'application/json'})

      # was: body = self._generate_body()

      # Not sure if this will always work, but for validate/verfiy nothing else was working:

      body = json.dumps(kwargs)

    Best,

    Stefan

    P.S.: Can somebody please fix the default sort-order of the dev-forum to "most recent first" (instead of  "highest voted first").

    0
    Comment actions Permalink
  • Casper Fabricius

    The Python client is not much used and we currently don't have the resources to maintain it. That doesn't mean we have abandoned it, but it is lagging a bit behind.

    It would be a great help if you would submit your fix as a pull request on Github.

    PS: This link will show posts with most recent first: https://help.podio.com/forums/21007072#recent

    0
    Comment actions Permalink
  • Stefan Ukena

    Hi Casper,

    thanks for the reply, will do that!

    Best,

    Stefan

    0
    Comment actions Permalink
  • Stefan Ukena

    If anyone else cares: Pull request available here https://github.com/podio/podio-py/pull/11

    0
    Comment actions Permalink
  • Christian Holm

    Merged! Thanks a lot Stefan.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk