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
{{ message }}
Repository navigation
TypeError exception when calling service operation with a default attribute for parameter of type dateTime #395
Since the accepted_types = (datetime.datetime,) + six.string_types for DateTime a possible solution would be to simply return the value unchanged if it's of type str in:
classDateTime(BuiltinType, AnySimpleType):
_default_qname=xsd_ns('dateTime')
accepted_types= (datetime.datetime,) +six.string_types@check_no_collectiondefxmlvalue(self, value):
ifisinstance(value, str):
returnvalue# Bit of a hack, since datetime is a subclass of date we can't just# test it with an isinstance(). And actually, we should not really# care about the type, as long as it has the required attributesifnotall(hasattr(value, attr) forattrin ('hour', 'minute', 'second')):
value=datetime.datetime.combine(value, datetime.time(
getattr(value, 'hour', 0),
getattr(value, 'minute', 0),
getattr(value, 'second', 0)))
ifgetattr(value, 'microsecond', 0):
returnisodate.isostrf.strftime(value, '%Y-%m-%dT%H:%M:%S.%f%Z')
returnisodate.isostrf.strftime(value, '%Y-%m-%dT%H:%M:%S%Z')
changed the title [-]TypeError exception when calling service operation with a default set for parameter of type dateTime [/-][+]TypeError exception when calling service operation with a default attribute for parameter of type dateTime [/+]on Mar 21, 2017
Activity
[-]TypeError exception when calling service operation with a default set for parameter of type dateTime [/-][+]TypeError exception when calling service operation with a default attribute for parameter of type dateTime [/+]Vorobeyko commentedon Oct 6, 2017
Please, fix this defect or say me workaround for this situation?
livexk commentedon Oct 25, 2017
please
1. Fixed mvantellingen#395
vikulin commentedon Jan 17, 2018
Find fork repo with the fixed issue
https://github.com/vikulin/python-zeep
arturgspb commentedon Dec 12, 2018
#886