Set the highest possible version of twisted in the requirements.txt
Latest Twisted breaking the httpclient class and some other stuff...
Got this after latest update of Twisted:
Site starting on 7080
Starting factory <twisted.web.server.Site object at 0x7efcf3fd2a00>
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks
result = current_context.run(gen.send, result)
File "/opennsa/onsa", line 192, in doMain
yield commands.reserve(client, nsi_header, source_stp, dest_stp, start_time, end_time, bandwidth, ero,
File "/usr/local/lib/python3.8/dist-packages/twisted/internet/defer.py", line 1905, in unwindGenerator
return _cancellableInlineCallbacks(gen)
File "/usr/local/lib/python3.8/dist-packages/twisted/internet/defer.py", line 1815, in _cancellableInlineCallbacks
_inlineCallbacks(None, gen, status)
--- ---
File "/opennsa/onsa", line 192, in doMain
yield commands.reserve(client, nsi_header, source_stp, dest_stp, start_time, end_time, bandwidth, ero,
File "/usr/local/lib/python3.8/dist-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks
result = current_context.run(gen.send, result)
File "/opennsa/opennsa/cli/commands.py", line 119, in reserve
connection_id, global_reservation_id, description, criteria = yield client.reserve(nsi_header, connection_id,
File "/opennsa/opennsa/protocols/nsi2/requester.py", line 83, in reserve
cd = self.requester_client.reserve(header, connection_id, global_reservation_id, description, criteria)
File "/opennsa/opennsa/protocols/nsi2/requesterclient.py", line 133, in reserve
d = httpclient.soapRequest(self.service_url, actions.RESERVE, payload, ctx_factory=self.ctx_factory,
File "/opennsa/opennsa/protocols/shared/httpclient.py", line 35, in soapRequest
return httpRequest(url, soap_envelope, headers, ctx_factory=ctx_factory)
File "/opennsa/opennsa/protocols/shared/httpclient.py", line 67, in httpRequest
factory = twclient.HTTPClientFactory(url, method, postdata=payload, timeout=timeout)
File "/usr/local/lib/python3.8/dist-packages/twisted/python/deprecate.py", line 475, in getattribute
value = getattr(state._module, name)
builtins.AttributeError: module 'twisted.web.client' has no attribute 'HTTPClientFactory'
Set the highest possible version of twisted in the requirements.txt
Latest Twisted breaking the httpclient class and some other stuff...
Got this after latest update of Twisted: Site starting on 7080 Starting factory <twisted.web.server.Site object at 0x7efcf3fd2a00> Unhandled Error Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks result = current_context.run(gen.send, result) File "/opennsa/onsa", line 192, in doMain yield commands.reserve(client, nsi_header, source_stp, dest_stp, start_time, end_time, bandwidth, ero, File "/usr/local/lib/python3.8/dist-packages/twisted/internet/defer.py", line 1905, in unwindGenerator return _cancellableInlineCallbacks(gen) File "/usr/local/lib/python3.8/dist-packages/twisted/internet/defer.py", line 1815, in _cancellableInlineCallbacks _inlineCallbacks(None, gen, status) --- ---
File "/opennsa/onsa", line 192, in doMain
yield commands.reserve(client, nsi_header, source_stp, dest_stp, start_time, end_time, bandwidth, ero,
File "/usr/local/lib/python3.8/dist-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks
result = current_context.run(gen.send, result)
File "/opennsa/opennsa/cli/commands.py", line 119, in reserve
connection_id, global_reservation_id, description, criteria = yield client.reserve(nsi_header, connection_id,
File "/opennsa/opennsa/protocols/nsi2/requester.py", line 83, in reserve
cd = self.requester_client.reserve(header, connection_id, global_reservation_id, description, criteria)
File "/opennsa/opennsa/protocols/nsi2/requesterclient.py", line 133, in reserve
d = httpclient.soapRequest(self.service_url, actions.RESERVE, payload, ctx_factory=self.ctx_factory,
File "/opennsa/opennsa/protocols/shared/httpclient.py", line 35, in soapRequest
return httpRequest(url, soap_envelope, headers, ctx_factory=ctx_factory)
File "/opennsa/opennsa/protocols/shared/httpclient.py", line 67, in httpRequest
factory = twclient.HTTPClientFactory(url, method, postdata=payload, timeout=timeout)
File "/usr/local/lib/python3.8/dist-packages/twisted/python/deprecate.py", line 475, in getattribute
value = getattr(state._module, name)
builtins.AttributeError: module 'twisted.web.client' has no attribute 'HTTPClientFactory'
See: Deprecations and Removals in Twisted 22.1.0 here: https://github.com/twisted/twisted/releases/tag/twisted-22.1.0