Session not initialized (Kiosk30)
Kiosk30 has no header authentication; it relies on a session. Skip Initialize, or call from a new connection, and you get this error.
- Message
Session not initialized- Seen in
- Every Kiosk30 business operation
- Root cause
- Initialize not called first in the same session
- Status
- Resolved
- Lab status
- Lab-tested
Fix
from zeep import Client
from requests import Session
from zeep.transports import Transport
session = Session() # keeps cookies so the session survives
client = Client(f"{BASE}/OperaKioskInterface.asmx?WSDL",
transport=Transport(session=session))
client.service.Initialize("[USER]", "[PASSWORD]", "[HOTEL]") # first
client.service.GetResortName(Resort="[HOTEL]") # then reuse the same client
Notes
- Same client object: the session lives in an HTTP cookie; a new client is a new session.
- Concurrency: with several kiosks or threads, each session calls
Initializeitself; don’t share a client. - Timeouts: sessions may expire after long idle periods; catch this error, call
Initializeagain and retry.
