We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi
On python 2.7 at debian 7 I'm getting an error when the system converts XML Post Date into Python Tuple (/wordpress_xmlrpc/fieldmaps.py:88)
*** ValueError: time data '2014-02-10 20:24:38' does not match format '%Y%m%dT%H:%M:%S'
It is clear that timetuple() was expecting '20140210T20:24:38' - which is very weird to me!
timetuple()
'20140210T20:24:38'
So I'm not sure if the module is really working or if my system have some inconsistency.
The text was updated successfully, but these errors were encountered:
So to properly load a Post from RPC I had to add this to fieldmaps.DateTimeFieldMap.convert_to_python
fieldmaps.DateTimeFieldMap.convert_to_python
import re raw_value = re.sub(r'(\d+)-(\d+)-(\d+) ', r'\1\2\3T', raw_value) if not isinstance(raw_value, xmlrpc_client.DateTime): ....
Sorry, something went wrong.
In fact the problem is with my custom method (I'm using wp plugin extapi to return query_post data) which may have different format.
I'm writing some custom wrappers around the WordPressPost result_class and DateTimeFieldMap
WordPressPost
DateTimeFieldMap
No branches or pull requests
Hi
On python 2.7 at debian 7 I'm getting an error when the system converts XML Post Date into Python Tuple (/wordpress_xmlrpc/fieldmaps.py:88)
It is clear that
timetuple()
was expecting'20140210T20:24:38'
- which is very weird to me!So I'm not sure if the module is really working or if my system have some inconsistency.
The text was updated successfully, but these errors were encountered: