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
When creating a new export job for products, we are seeing the following stack trace (edited for the full line of code):
File "/vagrant/connector_addons_inprogress/connector-magento/magentoerpconnect/unit/export_synchronizer.py", line 96, in _should_import
magento_date = datetime.strptime(record['updated_at'], MAGENTO_DATETIME_FORMAT)
File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2015-05-15 20:18:18' does not match format '%Y/%m/%d %H:%M:%S'
The error is due to the record object having the Odoo server datetime format, but strptime is using the magento datetime format.
pre-upgrade, this function used DEFAULT_SERVER_DATETIME_FORMAT instead of MAGENTO_DATETIME_FORMAT, so it looks like a regression.
Was there any reason for this change?
The text was updated successfully, but these errors were encountered:
record['updated_at'] is the record that comes from Magento, not Odoo.
It seems that the MAGENTO_DATETIME_FORMAT constant is set to the wrong format though (or is it possible that Magento uses several formats depending on an option?).
Could you propose a pull request? Thanks for reporting
jcoux
pushed a commit
to camptocamp/connector-magento
that referenced
this issue
May 14, 2019
When creating a new export job for products, we are seeing the following stack trace (edited for the full line of code):
File "/vagrant/connector_addons_inprogress/connector-magento/magentoerpconnect/unit/export_synchronizer.py", line 96, in _should_import
magento_date = datetime.strptime(record['updated_at'], MAGENTO_DATETIME_FORMAT)
File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
(data_string, format))
ValueError: time data '2015-05-15 20:18:18' does not match format '%Y/%m/%d %H:%M:%S'
The error is due to the record object having the Odoo server datetime format, but strptime is using the magento datetime format.
pre-upgrade, this function used DEFAULT_SERVER_DATETIME_FORMAT instead of MAGENTO_DATETIME_FORMAT, so it looks like a regression.
Was there any reason for this change?
The text was updated successfully, but these errors were encountered: