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
Zeep fails to parse 24:00:00 as xsd:time (ValueError: hour must be in 0..23) #1401
I'm having the same problem. Can you specify WHERE you replace xsd:time with xsd:string? I don't have that in my code so I can't do that... I feel like a real idiot. Here's my code (with a hard-coded start time):
Activity
alixepstein commentedon Jun 7, 2024
I'm having the same problem. Can you specify WHERE you replace xsd:time with xsd:string? I don't have that in my code so I can't do that... I feel like a real idiot. Here's my code (with a hard-coded start time):
``wsdl_url = "https://webservices.chargepoint.com/cp_api_5.1.wsdl"
client = Client(wsdl_url, wsse=UsernameToken(cpusername, cppassword))
def FleetUsageAPIcall(client):
eastern_tz = pytz.timezone('America/New_York')
now = datetime.now(ZoneInfo('America/New_York'))
fleetusagedf = pd.DataFrame()
tStart = datetime(2024, 5, 15, 00, 00, 00, tzinfo=eastern_tz)
while tStart < now:
tEnd = tStart + timedelta(days=10)
searchQuery = {'fromTimeStamp': tStart, 'toTimeStamp': tEnd}
fleetUsageData = client.service.getFleetUsageData(searchQuery)
fleetusagedf = pd.concat([fleetusagedf, pd.DataFrame(helpers.serialize_object(fleetUsageData.fleetUsageData))])
tStart = tStart + timedelta(days = 10)
if tStart > now: break
return fleetusagedf
fleetusagedf = FleetUsageAPIcall(client)``
Trolldemorted commentedon Jun 9, 2024
It's inside your SOAP api definition:
type="xsd:time"withtype="xsd:string"Clientconstructor with your modified version of cp_api_5.1.wsdl instead of the original upstream one