Hello Michał,

The feed_query.updated_min is expected to be a string corresponding to
the desired time but it cannot be a datetime object. The time string
should be in RFC 3339 timestamp format. For example:
'2005-08-09T10:57:00-08:00'. You can use time.strftime to convert a
datetime to a formatted string, there should be some good examples out
there on the Internet.

Thank you,

Jeff

On Oct 28, 9:29 am, Michał Klich <klich.mic...@gmail.com> wrote:
> > Hi,
>
> I have model
>
> class info(db.Model):
>
>     user = db.UserProperty()
>
>     last_update_date = db.DateTimeProperty()
>
> I need to retrieve last_update_date for specific user. It is working good, i
> can retrieve this value, i can even pass it to another variable
>
>  if results:
>
>         for result in results:
>
>             data = result.last_update_date
>
> Problem lies when i try to assign it to
>
> feed_uri = contacts.GetFeedUri()
>
> feed_query = gdata.contacts.service.ContactsQuery(feed_uri)
>
> *feed_query.updated_min = data*
>
>  Error message i receive is
>
> Traceback (most recent call last):
>   File "C:\Program Files
> (x86)\Google\google_appengine\google\appengine\ext\webapp\__init__.py",
> line 507, in __call__
>     handler.get(*groups)
>   File 
> "C:\Users\mklich\workspace\google_contacts_webapp\src\contacts-list.py",
> line 266, in get
>     listc = checkUserPrivateContacts(user)
>   File 
> "C:\Users\mklich\workspace\google_contacts_webapp\src\contacts-list.py",
> line 189, in checkUserPrivateContacts
>     feed = contacts.GetContactsFeed(feed_query.ToUri())
>   File 
> "C:\Users\mklich\workspace\google_contacts_webapp\src\gdata\service.py",
> line 1718, in ToUri
>     return atom.service.BuildUri(q_feed, self)
>   File "C:\Users\mklich\workspace\google_contacts_webapp\src\atom\service.py",
> line 584, in BuildUri
>     parameter_list = DictionaryToParamList(url_params, escape_params)
>   File "C:\Users\mklich\workspace\google_contacts_webapp\src\atom\service.py",
> line 551, in DictionaryToParamList
>     for param, value in (url_parameters or {}).items()]
>   File "C:\Python25\lib\urllib.py", line 1210, in quote_plus
>     if ' ' in s:
> TypeError: argument of type 'datetime.datetime' is not iterable
>
> Am i doing something wrong or is it a bug?
> Thank you for responses.
>
> --
> Michał Klich
>
> klich.mic...@gmail.com
> mic...@michalklich.comhttp://www.michalklich.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to