我正在将 azure-sdk 用于 python,特别是 azure-servicebus 0.50.0
from azure.servicebus import QueueClient
service_bus_queue_connectionString= "my service bus string"
service_bus_queue_name ="service bus queue"
queue_client = QueueClient.from_connection_string(service_bus_queue_connectionString, service_bus_queue_name)
sessions= queue_client.list_sessions() print(sessions)
使用以下代码时,我收到以下错误
发生了溢出错误类型的异常。参数:('mktime 参数超出范围',)
可能的原因是什么?
编辑请找到堆栈跟踪。任何帮助,将不胜感激。
File "C:\Users\NewtonCode\Desktop\EY.TPBML.PY - Copy\model_engine.py", line 28, in start_process
sessions = self.queue_client.list_sessions()
File "C:\Users\NewtonCode\AppData\Local\Continuum\anaconda3\lib\site-packages\azure\servicebus\servicebus_client.py", line 469, in list_sessions
mgmt_handlers.list_sessions_op)
File "C:\Users\NewtonCode\AppData\Local\Continuum\anaconda3\lib\site-packages\azure\servicebus\base_handler.py", line 83, in _mgmt_request_response
**kwargs))
File "C:\Users\NewtonCode\AppData\Local\Continuum\anaconda3\lib\site-packages\uamqp\message.py", line 109, in __init__
self._body.set(body)
File "C:\Users\NewtonCode\AppData\Local\Continuum\anaconda3\lib\site-packages\uamqp\message.py", line 913, in set
value = utils.data_factory(value)
File "C:\Users\NewtonCode\AppData\Local\Continuum\anaconda3\lib\site-packages\uamqp\utils.py", line 108, in data_factory
wrapped_dict[data_factory(key, encoding=encoding)] = data_factory(item, encoding=encoding)
File "C:\Users\NewtonCode\AppData\Local\Continuum\anaconda3\lib\site-packages\uamqp\utils.py", line 117, in data_factory
timestamp = int((time.mktime(value.utctimetuple()) * 1000) + (value.microsecond/1000))
OverflowError: mktime argument out of range