You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to send attachments following the details here but I'm running into problems. I haven't run into any other issues with Groupy on my machine, running 32 bit python 3.5.2 through Conda on Windows 10.
>>> from groupy.attachment import Location
ImportError: No module named 'groupy.attachment'
>>> from groupy import attachment
ImportError: cannot import name 'attachment'
>>> from groupy import attachments # needs an s
>>> loc = attachments.Location.create('My house', lat=33, lng=-84)
AttributeError: type object 'Location' has no attribute 'create'
>>> from groupy import Group
>>> loc = attachments.Location('My house', lat=33, lng=-84)
>>> group = Group.list().filter(group_id=group_id)[0]
>>> group.post('test') # this works
True
>>> group.post('test', loc) # this doesn't
TypeError: Location(name='My house', lat=33, lng=-84) is not JSON serializable
I'm hosting my bot on Heroku, which is also throwing the same errors. Any help would be appreciated. Thanks for writing this great API wrapper.
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out. I believe it's simply because I'm not calling each attachments' as_dict method before passing them along to the underlying api call. I should be able to push out a fix pretty soon.
@awctomlinson Thanks again for pointing this out. I now automatically call each attachments' as_dict method, if possible, so there's no need for the caller to do that manually. Now available in v0.7.0 :)
I'm trying to send attachments following the details here but I'm running into problems. I haven't run into any other issues with Groupy on my machine, running 32 bit python 3.5.2 through Conda on Windows 10.
I'm hosting my bot on Heroku, which is also throwing the same errors. Any help would be appreciated. Thanks for writing this great API wrapper.
The text was updated successfully, but these errors were encountered: