Skip to content

Remove "Maintype was not text, image, or querystring" exception. #281

@scottydelta

Description

@scottydelta

I am getting this error but the same code was working perfectly fine in march.

In [14]: posts = graph.get_connections('johnkasich', 'posts', limit=80, fields='likes.su
mmary(true),comments.summary(true),name,message,type,id,created_time,shares')

---------------------------------------------------------------------------
GraphAPIError                             Traceback (most recent call last)
<ipython-input-14-b26ea9d04ab5> in <module>()
----> 1 posts = graph.get_connections(elem, 'posts', limit=80, fields='likes.sum
mary(true),comments.summary(true),name,message,type,id,created_time,shares')

c:\users\vbajaj2.asurite\desktop\fbapp\env\lib\site-packages\facebook\__init__.p
yc in get_connections(self, id, connection_name, **args)
    118         """Fetches the connections for given object."""
    119         return self.request(
--> 120             "%s/%s/%s" % (self.version, id, connection_name), args)
    121
    122     def put_object(self, parent_object, connection_name, **data):

c:\users\vbajaj2.asurite\desktop\fbapp\env\lib\site-packages\facebook\__init__.p
yc in request(self, path, args, post_args, files, method)
    269                 raise GraphAPIError(response.json())
    270         else:
--> 271             raise GraphAPIError('Maintype was not text, image, or querys
tring')
    272
    273         if result and isinstance(result, dict) and result.get("error"):

GraphAPIError: Maintype was not text, image, or querystring

In [15]:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions