after_merge stringlengths 28 79.6k | before_merge stringlengths 20 79.6k | url stringlengths 38 71 | full_traceback stringlengths 43 922k | traceback_type stringclasses 555
values |
|---|---|---|---|---|
def lookupPduClass(self, function_code):
"""Use `function_code` to determine the class of the PDU.
:param function_code: The function code specified in a frame.
:returns: The class of the PDU that has a matching `function_code`.
"""
raise NotImplementedException("Method not implemented by derived c... | def lookupPduClass(self, function_code):
"""Use `function_code` to determine the class of the PDU.
:param function_code: The function code specified in a frame.
:returns: The class of the PDU that has a matching `function_code`.
"""
raise NotImplementedException("Method not implemented by derived c... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def checkFrame(self):
"""Check and decode the next frame
:returns: True if we successful, False otherwise
"""
raise NotImplementedException("Method not implemented by derived class")
| def checkFrame(self):
"""Check and decode the next frame
:returns: True if we successful, False otherwise
"""
raise NotImplementedException("Method not implemented by derived class")
| https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def advanceFrame(self):
"""Skip over the current framed message
This allows us to skip over the current message after we have processed
it or determined that it contains an error. It also has to reset the
current frame header handle
"""
raise NotImplementedException("Method not implemented by de... | def advanceFrame(self):
"""Skip over the current framed message
This allows us to skip over the current message after we have processed
it or determined that it contains an error. It also has to reset the
current frame header handle
"""
raise NotImplementedException("Method not implemented by de... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def addToFrame(self, message):
"""Add the next message to the frame buffer
This should be used before the decoding while loop to add the received
data to the buffer handle.
:param message: The most recent packet
"""
raise NotImplementedException("Method not implemented by derived class")
| def addToFrame(self, message):
"""Add the next message to the frame buffer
This should be used before the decoding while loop to add the received
data to the buffer handle.
:param message: The most recent packet
"""
raise NotImplementedException("Method not implemented by derived class")
| https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def isFrameReady(self):
"""Check if we should continue decode logic
This is meant to be used in a while loop in the decoding phase to let
the decoder know that there is still data in the buffer.
:returns: True if ready, False otherwise
"""
raise NotImplementedException("Method not implemented ... | def isFrameReady(self):
"""Check if we should continue decode logic
This is meant to be used in a while loop in the decoding phase to let
the decoder know that there is still data in the buffer.
:returns: True if ready, False otherwise
"""
raise NotImplementedException("Method not implemented ... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def getFrame(self):
"""Get the next frame from the buffer
:returns: The frame data or ''
"""
raise NotImplementedException("Method not implemented by derived class")
| def getFrame(self):
"""Get the next frame from the buffer
:returns: The frame data or ''
"""
raise NotImplementedException("Method not implemented by derived class")
| https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def populateResult(self, result):
"""Populates the modbus result with current frame header
We basically copy the data back over from the current header
to the result header. This may not be needed for serial messages.
:param result: The response packet
"""
raise NotImplementedException("Method... | def populateResult(self, result):
"""Populates the modbus result with current frame header
We basically copy the data back over from the current header
to the result header. This may not be needed for serial messages.
:param result: The response packet
"""
raise NotImplementedException("Method... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def processIncomingPacket(self, data, callback):
"""The new packet processing pattern
This takes in a new request packet, adds it to the current
packet stream, and performs framing on it. That is, checks
for complete messages, and once found, will process all that
exist. This handles the case when... | def processIncomingPacket(self, data, callback):
"""The new packet processing pattern
This takes in a new request packet, adds it to the current
packet stream, and performs framing on it. That is, checks
for complete messages, and once found, will process all that
exist. This handles the case when... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def buildPacket(self, message):
"""Creates a ready to send modbus packet
The raw packet is built off of a fully populated modbus
request / response message.
:param message: The request/response to send
:returns: The built packet
"""
raise NotImplementedException("Method not implemented by ... | def buildPacket(self, message):
"""Creates a ready to send modbus packet
The raw packet is built off of a fully populated modbus
request / response message.
:param message: The request/response to send
:returns: The built packet
"""
raise NotImplementedException("Method not implemented by ... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def decode(self, fx):
"""Converts the function code to the datastore to
:param fx: The function we are working with
:returns: one of [d(iscretes),i(inputs),h(oliding),c(oils)
"""
return self.__fx_mapper[fx]
| def decode(self, fx):
"""Converts the function code to the datastore to
:param fx: The function we are working with
:returns: one of [d(iscretes),i(inputs),h(oliding),c(oils)
"""
return self.__fx_mapper[fx]
| https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def reset(self):
"""Resets all the datastores to their default values"""
raise NotImplementedException("Context Reset")
| def reset(self):
"""Resets all the datastores to their default values"""
raise NotImplementedException("Context Reset")
| https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def validate(self, fx, address, count=1):
"""Validates the request to make sure it is in range
:param fx: The function we are working with
:param address: The starting address
:param count: The number of values to test
:returns: True if the request in within range, False otherwise
"""
raise... | def validate(self, fx, address, count=1):
"""Validates the request to make sure it is in range
:param fx: The function we are working with
:param address: The starting address
:param count: The number of values to test
:returns: True if the request in within range, False otherwise
"""
raise... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def getValues(self, fx, address, count=1):
"""Get `count` values from datastore
:param fx: The function we are working with
:param address: The starting address
:param count: The number of values to retrieve
:returns: The requested values from a:a+c
"""
raise NotImplementedException("get co... | def getValues(self, fx, address, count=1):
"""Get `count` values from datastore
:param fx: The function we are working with
:param address: The starting address
:param count: The number of values to retrieve
:returns: The requested values from a:a+c
"""
raise NotImplementedException("get co... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def setValues(self, fx, address, values):
"""Sets the datastore with the supplied values
:param fx: The function we are working with
:param address: The starting address
:param values: The new values to be set
"""
raise NotImplementedException("set context values")
| def setValues(self, fx, address, values):
"""Sets the datastore with the supplied values
:param fx: The function we are working with
:param address: The starting address
:param values: The new values to be set
"""
raise NotImplementedException("set context values")
| https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def build(self):
"""Return the payload buffer as a list
This list is two bytes per element and can
thus be treated as a list of registers.
:returns: The payload buffer as a list
"""
raise NotImplementedException("set context values")
| def build(self):
"""Return the payload buffer as a list
This list is two bytes per element and can
thus be treated as a list of registers.
:returns: The payload buffer as a list
"""
raise NotImplementedException("set context values")
| https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def execute(self, context=None):
"""Run a read exeception status request against the store
:returns: The populated response
"""
information = DeviceInformationFactory.get(_MCB)
identifier = "-".join(information.values()).encode()
identifier = identifier or b"Pymodbus"
return ReportSlaveIdRe... | def execute(self, context=None):
"""Run a read exeception status request against the store
:returns: The populated response
"""
identifier = b"Pymodbus"
return ReportSlaveIdResponse(identifier)
| https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def to_coils(self):
"""Convert the payload buffer into a coil
layout that can be used as a context block.
:returns: The coil layout to use as a block
"""
payload = self.to_registers()
coils = [bool(int(bit)) for reg in payload for bit in format(reg, "016b")]
return coils
| def to_coils(self):
"""Convert the payload buffer into a coil
layout that can be used as a context block.
:returns: The coil layout to use as a block
"""
payload = self.to_registers()
coils = [bool(int(bit)) for reg in payload[1:] for bit in format(reg, "016b")]
return coils
| https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def fromCoils(klass, coils, byteorder=Endian.Little, wordorder=Endian.Big):
"""Initialize a payload decoder with the result of
reading a collection of coils from a modbus device.
The coils are treated as a list of bit(boolean) values.
:param coils: The coil results to initialize with
:param byteor... | def fromCoils(klass, coils, byteorder=Endian.Little):
"""Initialize a payload decoder with the result of
reading a collection of coils from a modbus device.
The coils are treated as a list of bit(boolean) values.
:param coils: The coil results to initialize with
:param byteorder: The endianess of ... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def __init__(self, store, framer=None, identity=None, **kwargs):
"""Overloaded initializer for the modbus factory
If the identify structure is not passed in, the ModbusControlBlock
uses its own empty structure.
:param store: The ModbusServerContext datastore
:param framer: The framer strategy to u... | def __init__(self, store, framer=None, identity=None, **kwargs):
"""Overloaded initializer for the modbus factory
If the identify structure is not passed in, the ModbusControlBlock
uses its own empty structure.
:param store: The ModbusServerContext datastore
:param framer: The framer strategy to u... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def StartTcpServer(
context,
identity=None,
address=None,
console=False,
defer_reactor_run=False,
custom_functions=[],
**kwargs,
):
"""
Helper method to start the Modbus Async TCP server
:param context: The server data context
:param identify: The server identity to use (def... | def StartTcpServer(
context,
identity=None,
address=None,
console=False,
defer_reactor_run=False,
**kwargs,
):
"""
Helper method to start the Modbus Async TCP server
:param context: The server data context
:param identify: The server identity to use (default empty)
:param ad... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def StartUdpServer(
context,
identity=None,
address=None,
defer_reactor_run=False,
custom_functions=[],
**kwargs,
):
"""
Helper method to start the Modbus Async Udp server
:param context: The server data context
:param identify: The server identity to use (default empty)
:pa... | def StartUdpServer(
context, identity=None, address=None, defer_reactor_run=False, **kwargs
):
"""
Helper method to start the Modbus Async Udp server
:param context: The server data context
:param identify: The server identity to use (default empty)
:param address: An optional (interface, port)... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def StartSerialServer(
context,
identity=None,
framer=ModbusAsciiFramer,
defer_reactor_run=False,
custom_functions=[],
**kwargs,
):
"""
Helper method to start the Modbus Async Serial server
:param context: The server data context
:param identify: The server identity to use (defa... | def StartSerialServer(
context, identity=None, framer=ModbusAsciiFramer, defer_reactor_run=False, **kwargs
):
"""
Helper method to start the Modbus Async Serial server
:param context: The server data context
:param identify: The server identity to use (default empty)
:param framer: The framer t... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def execute(self, request):
"""The callback to call with the resulting message
:param request: The decoded request message
"""
broadcast = False
try:
if self.server.broadcast_enable and request.unit_id == 0:
broadcast = True
# if broadcasting then execute on all slav... | def execute(self, request):
"""The callback to call with the resulting message
:param request: The decoded request message
"""
try:
context = self.server.context[request.unit_id]
response = request.execute(context)
except NoSuchSlaveException as ex:
_logger.debug("requested ... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def handle(self):
"""Callback when we receive any data"""
while self.running:
try:
data = self.request.recv(1024)
if data:
units = self.server.context.slaves()
if not isinstance(units, (list, tuple)):
units = [units]
... | def handle(self):
"""Callback when we receive any data"""
while self.running:
try:
data = self.request.recv(1024)
if data:
units = self.server.context.slaves()
single = self.server.context.single
self.framer.processIncomingPacket(
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def send(self, message):
"""Send a request (string) to the network
:param message: The unencoded modbus response
"""
if message.should_respond:
# self.server.control.Counter.BusMessage += 1
pdu = self.framer.buildPacket(message)
if _logger.isEnabledFor(logging.DEBUG):
... | def send(self, message):
"""Send a request (string) to the network
:param message: The unencoded modbus response
"""
if message.should_respond:
# self.server.control.Counter.BusMessage += 1
pdu = self.framer.buildPacket(message)
if _logger.isEnabledFor(logging.DEBUG):
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def handle(self):
"""Callback when we receive any data, until self.running becomes False.
Blocks indefinitely awaiting data. If shutdown is required, then the
global socket.settimeout(<seconds>) may be used, to allow timely
checking of self.running. However, since this also affects socket
connects... | def handle(self):
"""Callback when we receive any data, until self.running becomes False.
Blocks indefinitely awaiting data. If shutdown is required, then the
global socket.settimeout(<seconds>) may be used, to allow timely
checking of self.running. However, since this also affects socket
connects... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def handle(self):
"""Callback when we receive any data"""
reset_frame = False
while self.running:
try:
data, self.socket = self.request
if not data:
self.running = False
data = b""
if _logger.isEnabledFor(logging.DEBUG):
... | def handle(self):
"""Callback when we receive any data"""
reset_frame = False
while self.running:
try:
data, self.socket = self.request
if not data:
self.running = False
if _logger.isEnabledFor(logging.DEBUG):
_logger.debug("Handlin... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def send(self, message):
"""Send a request (string) to the network
:param message: The unencoded modbus response
"""
if message.should_respond:
# self.server.control.Counter.BusMessage += 1
pdu = self.framer.buildPacket(message)
if _logger.isEnabledFor(logging.DEBUG):
... | def send(self, message):
"""Send a request (string) to the network
:param message: The unencoded modbus response
"""
if message.should_respond:
# self.server.control.Counter.BusMessage += 1
pdu = self.framer.buildPacket(message)
if _logger.isEnabledFor(logging.DEBUG):
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def __init__(
self,
context,
framer=None,
identity=None,
address=None,
handler=None,
allow_reuse_address=False,
**kwargs,
):
"""Overloaded initializer for the socket server
If the identify structure is not passed in, the ModbusControlBlock
uses its own empty structure.
... | def __init__(
self,
context,
framer=None,
identity=None,
address=None,
handler=None,
allow_reuse_address=False,
**kwargs,
):
"""Overloaded initializer for the socket server
If the identify structure is not passed in, the ModbusControlBlock
uses its own empty structure.
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def __init__(
self, context, framer=None, identity=None, address=None, handler=None, **kwargs
):
"""Overloaded initializer for the socket server
If the identify structure is not passed in, the ModbusControlBlock
uses its own empty structure.
:param context: The ModbusServerContext datastore
:p... | def __init__(
self, context, framer=None, identity=None, address=None, handler=None, **kwargs
):
"""Overloaded initializer for the socket server
If the identify structure is not passed in, the ModbusControlBlock
uses its own empty structure.
:param context: The ModbusServerContext datastore
:p... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def __init__(self, context, framer=None, identity=None, **kwargs):
"""Overloaded initializer for the socket server
If the identify structure is not passed in, the ModbusControlBlock
uses its own empty structure.
:param context: The ModbusServerContext datastore
:param framer: The framer strategy t... | def __init__(self, context, framer=None, identity=None, **kwargs):
"""Overloaded initializer for the socket server
If the identify structure is not passed in, the ModbusControlBlock
uses its own empty structure.
:param context: The ModbusServerContext datastore
:param framer: The framer strategy t... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def StartTcpServer(
context=None, identity=None, address=None, custom_functions=[], **kwargs
):
"""A factory to start and run a tcp modbus server
:param context: The ModbusServerContext datastore
:param identity: An optional identify structure
:param address: An optional (interface, port) to bind t... | def StartTcpServer(context=None, identity=None, address=None, **kwargs):
"""A factory to start and run a tcp modbus server
:param context: The ModbusServerContext datastore
:param identity: An optional identify structure
:param address: An optional (interface, port) to bind to.
:param ignore_missin... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def StartUdpServer(
context=None, identity=None, address=None, custom_functions=[], **kwargs
):
"""A factory to start and run a udp modbus server
:param context: The ModbusServerContext datastore
:param identity: An optional identify structure
:param address: An optional (interface, port) to bind t... | def StartUdpServer(context=None, identity=None, address=None, **kwargs):
"""A factory to start and run a udp modbus server
:param context: The ModbusServerContext datastore
:param identity: An optional identify structure
:param address: An optional (interface, port) to bind to.
:param framer: The f... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def StartSerialServer(context=None, identity=None, custom_functions=[], **kwargs):
"""A factory to start and run a serial modbus server
:param context: The ModbusServerContext datastore
:param identity: An optional identify structure
:param custom_functions: An optional list of custom function classes
... | def StartSerialServer(context=None, identity=None, **kwargs):
"""A factory to start and run a serial modbus server
:param context: The ModbusServerContext datastore
:param identity: An optional identify structure
:param framer: The framer to operate with (default ModbusAsciiFramer)
:param port: The... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def execute(self, request):
"""Starts the producer to send the next request to
consumer.write(Frame(request))
"""
with self._transaction_lock:
try:
_logger.debug(
"Current transaction state - {}".format(
ModbusTransactionState.to_string(self.client... | def execute(self, request):
"""Starts the producer to send the next request to
consumer.write(Frame(request))
"""
with self._transaction_lock:
try:
_logger.debug(
"Current transaction state - {}".format(
ModbusTransactionState.to_string(self.client... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def _transact(self, packet, response_length, full=False, broadcast=False):
"""
Does a Write and Read transaction
:param packet: packet to be sent
:param response_length: Expected response length
:param full: the target device was notorious for its no response. Dont
waste time this time by p... | def _transact(self, packet, response_length, full=False):
"""
Does a Write and Read transaction
:param packet: packet to be sent
:param response_length: Expected response length
:param full: the target device was notorious for its no response. Dont
waste time this time by partial querying
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def run_binary_payload_ex():
# ----------------------------------------------------------------------- #
# We are going to use a simple client to send our requests
# ----------------------------------------------------------------------- #
client = ModbusClient("127.0.0.1", port=5020)
client.connect... | def run_binary_payload_ex():
# ----------------------------------------------------------------------- #
# We are going to use a simple client to send our requests
# ----------------------------------------------------------------------- #
client = ModbusClient("127.0.0.1", port=5020)
client.connect... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def run_sync_client():
# ------------------------------------------------------------------------#
# choose the client you want
# ------------------------------------------------------------------------#
# make sure to start an implementation to hit against. For this
# you can use an existing device... | def run_sync_client():
# ------------------------------------------------------------------------#
# choose the client you want
# ------------------------------------------------------------------------#
# make sure to start an implementation to hit against. For this
# you can use an existing device... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def __init__(self, method="ascii", **kwargs):
"""Initialize a serial client instance
The methods to connect are::
- ascii
- rtu
- binary
:param method: The method to use for connection
:param port: The serial port to attach to
:param stopbits: The number of stop bits to use
... | def __init__(self, method="ascii", **kwargs):
"""Initialize a serial client instance
The methods to connect are::
- ascii
- rtu
- binary
:param method: The method to use for connection
:param port: The serial port to attach to
:param stopbits: The number of stop bits to use
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def connect(self):
"""Connect to the modbus serial server
:returns: True if connection succeeded, False otherwise
"""
if self.socket:
return True
try:
self.socket = serial.Serial(
port=self.port,
timeout=self.timeout,
bytesize=self.bytesize,
... | def connect(self):
"""Connect to the modbus serial server
:returns: True if connection succeeded, False otherwise
"""
if self.socket:
return True
try:
self.socket = serial.Serial(
port=self.port,
timeout=self.timeout,
bytesize=self.bytesize,
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def _get(self, type, offset, count):
"""
:param type: The key prefix to use
:param offset: The address offset to start at
:param count: The number of bits to read
:returns: The resulting values
"""
query = self._table.select(
and_(
self._table.c.type == type,
... | def _get(self, type, offset, count):
"""
:param type: The key prefix to use
:param offset: The address offset to start at
:param count: The number of bits to read
:returns: The resulting values
"""
query = self._table.select(
and_(
self._table.c.type == type,
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def _validate(self, type, offset, count):
"""
:param key: The key prefix to use
:param offset: The address offset to start at
:param count: The number of bits to read
:returns: The result of the validation
"""
query = self._table.select(
and_(
self._table.c.type == type,
... | def _validate(self, type, offset, count):
"""
:param key: The key prefix to use
:param offset: The address offset to start at
:param count: The number of bits to read
:returns: The result of the validation
"""
query = self._table.select(
and_(
self._table.c.type == type,
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def _validate_unit_id(self, units, single):
"""
Validates if the received data is valid for the client
:param units: list of unit id for which the transaction is valid
:param single: Set to true to treat this as a single context
:return:"""
if single:
return True
else:
if 0 ... | def _validate_unit_id(self, units, single):
"""
Validates if the received data is valid for the client
:param units: list of unit id for which the transaction is valid
:param single: Set to true to treat this as a single context
:return:"""
if single:
return True
else:
if 0 ... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def processIncomingPacket(self, data, callback, unit, **kwargs):
"""
The new packet processing pattern
This takes in a new request packet, adds it to the current
packet stream, and performs framing on it. That is, checks
for complete messages, and once found, will process all that
exist. This ... | def processIncomingPacket(self, data, callback, unit, **kwargs):
"""
The new packet processing pattern
This takes in a new request packet, adds it to the current
packet stream, and performs framing on it. That is, checks
for complete messages, and once found, will process all that
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def processIncomingPacket(self, data, callback, unit, **kwargs):
"""
The new packet processing pattern
This takes in a new request packet, adds it to the current
packet stream, and performs framing on it. That is, checks
for complete messages, and once found, will process all that
exist. This ... | def processIncomingPacket(self, data, callback, unit, **kwargs):
"""
The new packet processing pattern
This takes in a new request packet, adds it to the current
packet stream, and performs framing on it. That is, checks
for complete messages, and once found, will process all that
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def processIncomingPacket(self, data, callback, unit, **kwargs):
"""
The new packet processing pattern
This takes in a new request packet, adds it to the current
packet stream, and performs framing on it. That is, checks
for complete messages, and once found, will process all that
exist. This ... | def processIncomingPacket(self, data, callback, unit, **kwargs):
"""
The new packet processing pattern
This takes in a new request packet, adds it to the current
packet stream, and performs framing on it. That is, checks
for complete messages, and once found, will process all that
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def processIncomingPacket(self, data, callback, unit, **kwargs):
"""
The new packet processing pattern
This takes in a new request packet, adds it to the current
packet stream, and performs framing on it. That is, checks
for complete messages, and once found, will process all that
exist. This ... | def processIncomingPacket(self, data, callback, unit, **kwargs):
"""
The new packet processing pattern
This takes in a new request packet, adds it to the current
packet stream, and performs framing on it. That is, checks
for complete messages, and once found, will process all that
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def connect(self):
"""Connect to the modbus serial server
:returns: True if connection succeeded, False otherwise
"""
if self.socket:
return True
try:
self.socket = serial.Serial(
port=self.port,
timeout=self.timeout,
bytesize=self.bytesize,
... | def connect(self):
"""Connect to the modbus serial server
:returns: True if connection succeeded, False otherwise
"""
if self.socket:
return True
try:
self.socket = serial.Serial(
port=self.port,
timeout=self.timeout,
bytesize=self.bytesize,
... | https://github.com/riptideio/pymodbus/issues/377 | client = ModbusSerialClient(port='notexist', method='rtu')
client.connect()
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "lib/python3.6/site-packages/pymodbus/client/sync.py", line 476, in connect
self.socket.interCharTimeout = self.inter_char_timeout
AttributeError: 'NoneType' object has... | AttributeError |
def run_binary_payload_ex():
# ----------------------------------------------------------------------- #
# We are going to use a simple client to send our requests
# ----------------------------------------------------------------------- #
client = ModbusClient("127.0.0.1", port=5440)
client.connect... | def run_binary_payload_ex():
# ----------------------------------------------------------------------- #
# We are going to use a simple client to send our requests
# ----------------------------------------------------------------------- #
client = ModbusClient("127.0.0.1", port=5020)
client.connect... | https://github.com/riptideio/pymodbus/issues/255 | from pymodbus.client.sync import ModbusTcpClient as Client
import logging
# import time
import struct
from pymodbus.payload import BinaryPayloadBuilder
from pymodbus.payload import BinaryPayloadDecoder
from pymodbus.constants import Endian
logging.basicConfig()
log = logging.getLogger()
log.setLevel(logging.DEBUG)
wr... | AssertionError |
def fromRegisters(klass, registers, endian=Endian.Little):
"""Initialize a payload decoder with the result of
reading a collection of registers from a modbus device.
The registers are treated as a list of 2 byte values.
We have to do this because of how the data has already
been decoded by the rest... | def fromRegisters(klass, registers, endian=Endian.Little):
"""Initialize a payload decoder with the result of
reading a collection of registers from a modbus device.
The registers are treated as a list of 2 byte values.
We have to do this because of how the data has already
been decoded by the rest... | https://github.com/riptideio/pymodbus/issues/255 | from pymodbus.client.sync import ModbusTcpClient as Client
import logging
# import time
import struct
from pymodbus.payload import BinaryPayloadBuilder
from pymodbus.payload import BinaryPayloadDecoder
from pymodbus.constants import Endian
logging.basicConfig()
log = logging.getLogger()
log.setLevel(logging.DEBUG)
wr... | AssertionError |
def coerce_type(module, value):
# If our value is already None we can just return directly
if value is None:
return value
yaml_ish = bool(
(value.startswith("{") and value.endswith("}"))
or (value.startswith("[") and value.endswith("]"))
)
if yaml_ish:
if not HAS_YAM... | def coerce_type(module, value):
yaml_ish = bool(
(value.startswith("{") and value.endswith("}"))
or (value.startswith("[") and value.endswith("]"))
)
if yaml_ish:
if not HAS_YAML:
module.fail_json(msg="yaml is not installed, try 'pip install pyyaml'")
return yaml.... | https://github.com/ansible/awx/issues/7267 | The full traceback is:
Traceback (most recent call last):
File "/home/kkulkarni/.ansible/tmp/ansible-tmp-1591366383.968238-878504-224766098821440/AnsiballZ_tower_settings.py", line 102, in <module>
_ansiballz_main()
File "/home/kkulkarni/.ansible/tmp/ansible-tmp-1591366383.968238-878504-224766098821440/AnsiballZ_tower_... | AttributeError |
def consume_events(self):
# discover new events and ingest them
events_path = self.path_to("artifacts", self.ident, "job_events")
# it's possible that `events_path` doesn't exist *yet*, because runner
# hasn't actually written any events yet (if you ran e.g., a sleep 30)
# only attempt to consume e... | def consume_events(self):
# discover new events and ingest them
events_path = self.path_to("artifacts", self.ident, "job_events")
# it's possible that `events_path` doesn't exist *yet*, because runner
# hasn't actually written any events yet (if you ran e.g., a sleep 30)
# only attempt to consume e... | https://github.com/ansible/awx/issues/6675 | Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/tasks.py", line 1468, in run
ident=str(self.instance.pk))
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/isolated/manager.py", line 422, in run status, rc = self.check()
File "/var/lib/awx/venv/awx/li... | IsADirectoryError |
def get_user_capabilities(
self, obj, method_list=[], parent_obj=None, capabilities_cache={}
):
if obj is None:
return {}
user_capabilities = {}
# Custom ordering to loop through methods so we can reuse earlier calcs
for display_method in [
"edit",
"delete",
"start",... | def get_user_capabilities(
self, obj, method_list=[], parent_obj=None, capabilities_cache={}
):
if obj is None:
return {}
user_capabilities = {}
# Custom ordering to loop through methods so we can reuse earlier calcs
for display_method in [
"edit",
"delete",
"start",... | https://github.com/ansible/awx/issues/6309 | Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 1308, in run args = self.build_args(self.instance, private_data_dir, passwords) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 2472, in build_args if getattr(settings... | AttributeError |
def _delete_groups(self):
"""
# If overwrite is set, for each group in the database that is NOT in
# the local list, delete it. When importing from a cloud inventory
# source attached to a specific group, only delete children of that
# group. Delete each group individually so signal handlers will r... | def _delete_groups(self):
"""
# If overwrite is set, for each group in the database that is NOT in
# the local list, delete it. When importing from a cloud inventory
# source attached to a specific group, only delete children of that
# group. Delete each group individually so signal handlers will r... | https://github.com/ansible/awx/issues/6309 | Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 1308, in run args = self.build_args(self.instance, private_data_dir, passwords) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 2472, in build_args if getattr(settings... | AttributeError |
def _delete_group_children_and_hosts(self):
"""
Clear all invalid child relationships for groups and all invalid host
memberships. When importing from a cloud inventory source attached to
a specific group, only clear relationships for hosts and groups that
are beneath the inventory source group.
... | def _delete_group_children_and_hosts(self):
"""
Clear all invalid child relationships for groups and all invalid host
memberships. When importing from a cloud inventory source attached to
a specific group, only clear relationships for hosts and groups that
are beneath the inventory source group.
... | https://github.com/ansible/awx/issues/6309 | Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 1308, in run args = self.build_args(self.instance, private_data_dir, passwords) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 2472, in build_args if getattr(settings... | AttributeError |
def websocket_emit_data(self):
websocket_data = super(InventoryUpdate, self).websocket_emit_data()
websocket_data.update(dict(inventory_source_id=self.inventory_source.pk))
if self.inventory_source.inventory is not None:
websocket_data.update(dict(inventory_id=self.inventory_source.inventory.pk))
... | def websocket_emit_data(self):
websocket_data = super(InventoryUpdate, self).websocket_emit_data()
websocket_data.update(dict(inventory_source_id=self.inventory_source.pk))
if self.inventory_source.inventory is not None:
websocket_data.update(dict(inventory_id=self.inventory_source.inventory.pk))
... | https://github.com/ansible/awx/issues/6309 | Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 1308, in run args = self.build_args(self.instance, private_data_dir, passwords) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 2472, in build_args if getattr(settings... | AttributeError |
def activity_stream_create(sender, instance, created, **kwargs):
if created and activity_stream_enabled:
_type = type(instance)
if getattr(_type, "_deferred", False):
return
object1 = camelcase_to_underscore(instance.__class__.__name__)
changes = model_to_dict(instance, m... | def activity_stream_create(sender, instance, created, **kwargs):
if created and activity_stream_enabled:
# TODO: remove deprecated_group conditional in 3.3
# Skip recording any inventory source directly associated with a group.
if isinstance(instance, InventorySource) and instance.deprecated... | https://github.com/ansible/awx/issues/6309 | Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 1308, in run args = self.build_args(self.instance, private_data_dir, passwords) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 2472, in build_args if getattr(settings... | AttributeError |
def activity_stream_delete(sender, instance, **kwargs):
if not activity_stream_enabled:
return
# Inventory delete happens in the task system rather than request-response-cycle.
# If we trigger this handler there we may fall into db-integrity-related race conditions.
# So we add flag verification... | def activity_stream_delete(sender, instance, **kwargs):
if not activity_stream_enabled:
return
# TODO: remove deprecated_group conditional in 3.3
# Skip recording any inventory source directly associated with a group.
if isinstance(instance, InventorySource) and instance.deprecated_group:
... | https://github.com/ansible/awx/issues/6309 | Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 1308, in run args = self.build_args(self.instance, private_data_dir, passwords) File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 2472, in build_args if getattr(settings... | AttributeError |
def consume_events(self):
# discover new events and ingest them
events_path = self.path_to("artifacts", self.ident, "job_events")
# it's possible that `events_path` doesn't exist *yet*, because runner
# hasn't actually written any events yet (if you ran e.g., a sleep 30)
# only attempt to consume e... | def consume_events(self):
# discover new events and ingest them
events_path = self.path_to("artifacts", self.ident, "job_events")
# it's possible that `events_path` doesn't exist *yet*, because runner
# hasn't actually written any events yet (if you ran e.g., a sleep 30)
# only attempt to consume e... | https://github.com/ansible/awx/issues/6280 | 2020-03-12 23:43:10,040 ERROR awx.isolated.manager.playbooks
PLAY [Poll for status of active job.] ******************************************
TASK [Determine if daemon process is alive.] ***********************************
changed: [awx-job-164]
TASK [Copy artifacts from the isolated host.] ***********************... | IsADirectoryError |
def main():
argument_spec = dict(
name=dict(required=True),
description=dict(required=False),
extra_vars=dict(type="dict", required=False),
organization=dict(required=False),
allow_simultaneous=dict(type="bool", required=False),
schema=dict(type="list", elements="dict... | def main():
argument_spec = dict(
name=dict(required=True),
description=dict(required=False),
extra_vars=dict(required=False),
organization=dict(required=False),
allow_simultaneous=dict(type="bool", required=False),
schema=dict(required=False),
survey=dict(req... | https://github.com/ansible/awx/issues/6167 | The full traceback is:
Traceback (most recent call last):
File "<stdin>", line 102, in <module>
File "<stdin>", line 94, in _ansiballz_main
File "<stdin>", line 40, in invoke_module
File "/usr/lib64/python2.7/runpy.py", line 176, in run_module
fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 82, in _... | tower_cli.exceptions.TowerCLIError |
def validate_host_filter(self, host_filter):
if host_filter:
try:
for match in JSONBField.get_lookups().keys():
if match == "exact":
# __exact is allowed
continue
match = "__{}".format(match)
if re.match("ans... | def validate_host_filter(self, host_filter):
if host_filter:
try:
for match in JSONBField.get_lookups().keys():
if match == "exact":
# __exact is allowed
continue
match = "__{}".format(match)
if re.match("ans... | https://github.com/ansible/awx/issues/6250 | The full traceback is:
Traceback (most recent call last):
File "<stdin>", line 102, in <module>
File "<stdin>", line 94, in _ansiballz_main
File "<stdin>", line 40, in invoke_module
File "/usr/lib64/python2.7/runpy.py", line 176, in run_module
fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 82, in _... | tower_cli.exceptions.ServerError |
def finish_job_fact_cache(self, destination, modification_times):
for host in self._get_inventory_hosts():
filepath = os.sep.join(map(str, [destination, host.name]))
if not os.path.realpath(filepath).startswith(destination):
system_tracking_logger.error(
"facts for host {... | def finish_job_fact_cache(self, destination, modification_times):
for host in self._get_inventory_hosts():
filepath = os.sep.join(map(str, [destination, host.name]))
if not os.path.realpath(filepath).startswith(destination):
system_tracking_logger.error(
"facts for host {... | https://github.com/ansible/awx/issues/5935 | 2020-02-13 19:10:29,258 ERROR awx.main.tasks job 909 (successful) Final run hook errored.
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/tasks.py", line 1411, in run
self.final_run_hook(self.instance, status, private_data_dir, fact_modification_times, isolated_m... | AttributeError |
def _get_instances(self, inkwargs):
"""Make API calls"""
instances = []
si = None
try:
si = SmartConnect(**inkwargs)
except ssl.SSLError as connection_error:
if (
"[SSL: CERTIFICATE_VERIFY_FAILED]" in str(connection_error)
and self.validate_certs
):
... | def _get_instances(self, inkwargs):
"""Make API calls"""
instances = []
try:
si = SmartConnect(**inkwargs)
except ssl.SSLError as connection_error:
if (
"[SSL: CERTIFICATE_VERIFY_FAILED]" in str(connection_error)
and self.validate_certs
):
sys.... | https://github.com/ansible/awx/issues/5648 | 4.545 INFO Updating inventory 28: VCENTER_INVENTORY
5.489 INFO Reading Ansible inventory source: /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/plugins/inventory/vmware_inventory.py
5.495 INFO Using VIRTUAL_ENV: /var/lib/awx/venv/ansible
5.495 INFO Using PATH: /var/lib/awx/venv/ansible/bin:/var... | RuntimeError |
def process_request(self, request):
executor = MigrationExecutor(connection)
plan = executor.migration_plan(executor.loader.graph.leaf_nodes())
if (
bool(plan)
and getattr(resolve(request.path), "url_name", "") != "migrations_notran"
):
return redirect(reverse("ui:migrations_notr... | def process_request(self, request):
if migration_in_progress_check_or_relase():
if getattr(resolve(request.path), "url_name", "") == "migrations_notran":
return
return redirect(reverse("ui:migrations_notran"))
| https://github.com/ansible/awx/issues/5530 | Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedColumn: column main_projectupdate.job_tags does not exist
LINE 1: ...e"."project_id", "main_projectupdate"."job... | django.db.utils.ProgrammingError |
def run_task_manager():
logger.debug("Running Tower task manager.")
TaskManager().schedule()
| def run_task_manager():
if migration_in_progress_check_or_relase():
logger.debug("Not running task manager because migration is in progress.")
return
logger.debug("Running Tower task manager.")
TaskManager().schedule()
| https://github.com/ansible/awx/issues/5530 | Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedColumn: column main_projectupdate.job_tags does not exist
LINE 1: ...e"."project_id", "main_projectupdate"."job... | django.db.utils.ProgrammingError |
def create(self, request, *args, **kwargs):
# If the object ID was not specified, it probably doesn't exist in the
# DB yet. We want to see if we can create it. The URL may choose to
# inject it's primary key into the object because we are posting to a
# subcollection. Use all the normal access control... | def create(self, request, *args, **kwargs):
# If the object ID was not specified, it probably doesn't exist in the
# DB yet. We want to see if we can create it. The URL may choose to
# inject it's primary key into the object because we are posting to a
# subcollection. Use all the normal access control... | https://github.com/ansible/awx/issues/4147 | 2019-06-21 20:31:01,747 ERROR django.request Internal Server Error: /api/v2/job_templates/7/schedules/
Traceback (most recent call last):
File "/venv/awx/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/venv/awx/lib64/python3.6/site-packages/... | AttributeError |
def generate_tmp_kube_config(credential, namespace):
host_input = credential.get_input("host")
config = {
"apiVersion": "v1",
"kind": "Config",
"preferences": {},
"clusters": [{"name": host_input, "cluster": {"server": host_input}}],
"users": [
{
... | def generate_tmp_kube_config(credential, namespace):
host_input = credential.get_input("host")
config = {
"apiVersion": "v1",
"kind": "Config",
"preferences": {},
"clusters": [{"name": host_input, "cluster": {"server": host_input}}],
"users": [
{
... | https://github.com/ansible/awx/issues/5326 | Traceback (most recent call last):
File "/awx_devel/awx/main/scheduler/kubernetes.py", line 55, in list_active_jobs
for pod in pm.kube_api.list_namespaced_pod(
File "/venv/awx/lib64/python3.6/site-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/a... | AttributeError |
def start_task(self, task, rampart_group, dependent_tasks=None, instance=None):
from awx.main.tasks import handle_work_error, handle_work_success
dependent_tasks = dependent_tasks or []
task_actual = {
"type": get_type_for_model(type(task)),
"id": task.id,
}
dependencies = [
... | def start_task(self, task, rampart_group, dependent_tasks=None, instance=None):
from awx.main.tasks import handle_work_error, handle_work_success
dependent_tasks = dependent_tasks or []
task_actual = {
"type": get_type_for_model(type(task)),
"id": task.id,
}
dependencies = [
... | https://github.com/ansible/awx/issues/5326 | Traceback (most recent call last):
File "/awx_devel/awx/main/scheduler/kubernetes.py", line 55, in list_active_jobs
for pod in pm.kube_api.list_namespaced_pod(
File "/venv/awx/lib64/python3.6/site-packages/django/utils/functional.py", line 80, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/a... | AttributeError |
def create_from_data(cls, **kwargs):
# Convert the datetime for the event's creation
# appropriately, and include a time zone for it.
#
# In the event of any issue, throw it out, and Django will just save
# the current time.
try:
if not isinstance(kwargs["created"], datetime.datetime):
... | def create_from_data(cls, **kwargs):
# Convert the datetime for the event's creation
# appropriately, and include a time zone for it.
#
# In the event of any issue, throw it out, and Django will just save
# the current time.
try:
if not isinstance(kwargs["created"], datetime.datetime):
... | https://github.com/ansible/awx/issues/4920 | awx_1 | 2019-10-04 16:26:53,567 ERROR awx.main.commands.run_callback_receiver Callback Task Processor Raised Exception: TypeError("InventoryUpdateEvent() got an unexpected keyword argument 'workflow_job_id'",)
awx_1 | 2019-10-04 16:26:53,568 ERROR awx.main.commands.run_callback_receiver Detail: Trac... | TypeError |
def save_user_session_membership(sender, **kwargs):
session = kwargs.get("instance", None)
if pkg_resources.get_distribution("channels").version >= "2":
# If you get into this code block, it means we upgraded channels, but
# didn't make the settings.SESSIONS_PER_USER feature work
raise R... | def save_user_session_membership(sender, **kwargs):
session = kwargs.get("instance", None)
if pkg_resources.get_distribution("channels").version >= "2":
# If you get into this code block, it means we upgraded channels, but
# didn't make the settings.SESSIONS_PER_USER feature work
raise R... | https://github.com/ansible/awx/issues/4334 | awx_1 | 2019-07-16 21:07:30,594 ERROR django.request Internal Server Error: /
awx_1 | Traceback (most recent call last):
awx_1 | File "/venv/awx/lib64/python3.6/site-packages/django/db/backends/base/base.py", line 240, in _commit
awx_1 | return self.connection.commit()
awx_1 ... | psycopg2.IntegrityError |
def reap(instance=None, status="failed", excluded_uuids=[]):
"""
Reap all jobs in waiting|running for this instance.
"""
me = instance
if me is None:
(changed, me) = Instance.objects.get_or_register()
if changed:
logger.info("Registered tower node '{}'".format(me.hostname... | def reap(instance=None, status="failed", excluded_uuids=[]):
"""
Reap all jobs in waiting|running for this instance.
"""
me = instance or Instance.objects.me()
now = tz_now()
workflow_ctype_id = ContentType.objects.get_for_model(WorkflowJob).id
jobs = UnifiedJob.objects.filter(
(
... | https://github.com/ansible/awx/issues/4294 | Jul 4 17:20:39 1.awx.node.dc1 dispatcher[505]: 2019-07-04 14:20:39,433 ERROR awx.main.dispatch failed to write inbound message
Jul 4 17:20:39 1.awx.node.dc1 dispatcher[505]: Traceback (most recent call last):
Jul 4 17:20:39 1.awx.node.dc1 dispatcher[505]: File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/... | RuntimeError |
def instance_info(since):
info = {}
instances = models.Instance.objects.values_list("hostname").values(
"uuid",
"version",
"capacity",
"cpu",
"memory",
"managed_by_policy",
"hostname",
"last_isolated_check",
"enabled",
)
for instanc... | def instance_info(since):
info = {}
instances = models.Instance.objects.values_list("hostname").values(
"uuid",
"version",
"capacity",
"cpu",
"memory",
"managed_by_policy",
"hostname",
"last_isolated_check",
"enabled",
)
for instanc... | https://github.com/ansible/awx/issues/4170 | 2019-06-25 00:24:00,434 ERROR awx.main.analytics Could not generate metric instance_info.json
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/main/analytics/core.py", line 94, in gather
json.dump(func(last_run), f)
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/js... | TypeError |
def to_internal_value(self, pk):
try:
pk = int(pk)
except ValueError:
self.fail("invalid")
try:
Credential.objects.get(pk=pk)
except ObjectDoesNotExist:
raise serializers.ValidationError(_("Credential {} does not exist").format(pk))
return pk
| def to_internal_value(self, pk):
try:
Credential.objects.get(pk=pk)
except ObjectDoesNotExist:
raise serializers.ValidationError(_("Credential {} does not exist").format(pk))
return pk
| https://github.com/ansible/awx/issues/3346 | 2019-03-01 13:12:09,346 ERROR django.request Internal Server Error: /api/v2/job_templates/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/var/lib/awx/venv/awx/lib64/python3.6/si... | TypeError |
def get_field_info(self, field):
res = super(JobTypeMetadata, self).get_field_info(field)
if field.field_name == "job_type":
res["choices"] = [choice for choice in res["choices"] if choice[0] != "scan"]
return res
| def get_field_info(self, field):
res = super(JobTypeMetadata, self).get_field_info(field)
if field.field_name == "job_type":
index = 0
for choice in res["choices"]:
if choice[0] == "scan":
res["choices"].pop(index)
break
index += 1
ret... | https://github.com/ansible/awx/issues/3329 | awx_1 | 18:58:54 uwsgi.1 | 2019-02-27 18:58:54,069 ERROR django.request Internal Server Error: /api/v2/instance_groups/1/instances/
awx_1 | 18:58:54 uwsgi.1 | Traceback (most recent call last):
awx_1 | 18:58:54 uwsgi.1 | File "/venv/awx/lib64/python3.6/site-packages/django/core/... | RuntimeError |
def determine_actions(self, request, view):
actions = super(SublistAttachDetatchMetadata, self).determine_actions(request, view)
method = "POST"
if method in actions:
for field in list(actions[method].keys()):
if field == "id":
continue
actions[method].pop(fie... | def determine_actions(self, request, view):
actions = super(SublistAttachDetatchMetadata, self).determine_actions(request, view)
method = "POST"
if method in actions:
for field in actions[method]:
if field == "id":
continue
actions[method].pop(field)
retur... | https://github.com/ansible/awx/issues/3329 | awx_1 | 18:58:54 uwsgi.1 | 2019-02-27 18:58:54,069 ERROR django.request Internal Server Error: /api/v2/instance_groups/1/instances/
awx_1 | 18:58:54 uwsgi.1 | Traceback (most recent call last):
awx_1 | 18:58:54 uwsgi.1 | File "/venv/awx/lib64/python3.6/site-packages/django/core/... | RuntimeError |
def awx_periodic_scheduler():
with advisory_lock("awx_periodic_scheduler_lock", wait=False) as acquired:
if acquired is False:
logger.debug("Not running periodic scheduler, another task holds lock")
return
logger.debug("Starting periodic scheduler")
run_now = now()
... | def awx_periodic_scheduler():
with advisory_lock("awx_periodic_scheduler_lock", wait=False) as acquired:
if acquired is False:
logger.debug("Not running periodic scheduler, another task holds lock")
return
logger.debug("Starting periodic scheduler")
run_now = now()
... | https://github.com/ansible/awx/issues/3200 | 2019-02-10 11:40:25,316 ERROR awx.main.tasks Error spawning scheduled job.
Traceback (most recent call last):
File "/tasks.py", line 471, in awx_periodic_scheduler
NameError: name 'six' is not defined | NameError |
def get_path_to_ansible_inventory(self):
venv_exe = os.path.join(self.venv_path, "bin", "ansible-inventory")
if os.path.exists(venv_exe):
return venv_exe
elif os.path.exists(os.path.join(self.venv_path, "bin", "ansible")):
# if bin/ansible exists but bin/ansible-inventory doesn't, it's
... | def get_path_to_ansible_inventory(self):
venv_exe = os.path.join(self.venv_path, "bin", "ansible-inventory")
if os.path.exists(venv_exe):
return venv_exe
return shutil.which("ansible-inventory")
| https://github.com/ansible/awx/issues/3139 | stdout:
6.399 INFO Updating inventory 239: Inventory - StaffSalary\ufffd
6.438 INFO Reading Ansible inventory source: /awx_devel/awx/plugins/inventory/openstack_inventory.py
6.439 INFO Using VIRTUAL_ENV: /venv/python2_ansible23/
6.439 INFO Using PATH: /venv/python2_ansible23/bin:/venv/awx/bin:/venv/awx/... | RuntimeError |
def get_base_args(self):
# get ansible-inventory absolute path for running in bubblewrap/proot, in Popen
bargs = [self.get_path_to_ansible_inventory(), "-i", self.source]
logger.debug("Using base command: {}".format(" ".join(bargs)))
return bargs
| def get_base_args(self):
# get ansible-inventory absolute path for running in bubblewrap/proot, in Popen
abs_ansible_inventory = shutil.which("ansible-inventory")
bargs = [abs_ansible_inventory, "-i", self.source]
logger.debug("Using base command: {}".format(" ".join(bargs)))
return bargs
| https://github.com/ansible/awx/issues/3056 | 1.570 INFO Updating inventory 3: roman cluster
1.584 INFO Reading Ansible inventory source: /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/plugins/inventory/ec2.py
1.586 INFO Using VIRTUAL_ENV: /var/lib/awx/venv/my-custom-venv/
1.586 INFO Using PATH: /var/lib/awx/venv/my-custom-venv/bin:/var/li... | RuntimeError |
def _delete_hosts(self):
"""
For each host in the database that is NOT in the local list, delete
it. When importing from a cloud inventory source attached to a
specific group, only delete hosts beneath that group. Delete each
host individually so signal handlers will run.
"""
if settings.SQ... | def _delete_hosts(self):
"""
For each host in the database that is NOT in the local list, delete
it. When importing from a cloud inventory source attached to a
specific group, only delete hosts beneath that group. Delete each
host individually so signal handlers will run.
"""
if settings.SQ... | https://github.com/ansible/awx/issues/3056 | 1.570 INFO Updating inventory 3: roman cluster
1.584 INFO Reading Ansible inventory source: /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/plugins/inventory/ec2.py
1.586 INFO Using VIRTUAL_ENV: /var/lib/awx/venv/my-custom-venv/
1.586 INFO Using PATH: /var/lib/awx/venv/my-custom-venv/bin:/var/li... | RuntimeError |
def api_exception_handler(exc, context):
"""
Override default API exception handler to catch IntegrityError exceptions.
"""
if isinstance(exc, IntegrityError):
exc = ParseError(exc.args[0])
if isinstance(exc, FieldError):
exc = ParseError(exc.args[0])
if isinstance(context["view"... | def api_exception_handler(exc, context):
"""
Override default API exception handler to catch IntegrityError exceptions.
"""
if isinstance(exc, IntegrityError):
exc = ParseError(exc.args[0])
if isinstance(exc, FieldError):
exc = ParseError(exc.args[0])
return exception_handler(exc... | https://github.com/ansible/awx/issues/2112 | 2018-07-31 08:52:33,509 ERROR django.request Internal Server Error: /api/v2/settings/all/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python2.7/site-packages/awx/wsgi.p... | TypeError |
def run_pexpect(
args,
cwd,
env,
logfile,
cancelled_callback=None,
expect_passwords={},
extra_update_fields=None,
idle_timeout=None,
job_timeout=0,
pexpect_timeout=5,
proot_cmd="bwrap",
):
"""
Run the given command using pexpect to capture output and provide
passw... | def run_pexpect(
args,
cwd,
env,
logfile,
cancelled_callback=None,
expect_passwords={},
extra_update_fields=None,
idle_timeout=None,
job_timeout=0,
pexpect_timeout=5,
proot_cmd="bwrap",
):
"""
Run the given command using pexpect to capture output and provide
passw... | https://github.com/ansible/awx/issues/1972 | 2018-06-08T09:44:25.203865658Z Using /etc/ansible/ansible.cfg as config file
2018-06-08T09:44:25.924522979Z 127.0.0.1 | SUCCESS => {
2018-06-08T09:44:25.924550559Z "changed": false,
2018-06-08T09:44:25.924554135Z "elapsed": 0,
2018-06-08T09:44:25.924557026Z "path": null,
2018-06-08T09:44:25.924559897Z ... | RuntimeError |
def _accept_or_ignore_job_kwargs(self, **kwargs):
exclude_errors = kwargs.pop("_exclude_errors", [])
prompted_data = {}
rejected_data = {}
accepted_vars, rejected_vars, errors_dict = self.accept_or_ignore_variables(
kwargs.get("extra_vars", {}),
_exclude_errors=exclude_errors,
ex... | def _accept_or_ignore_job_kwargs(self, **kwargs):
exclude_errors = kwargs.pop("_exclude_errors", [])
prompted_data = {}
rejected_data = {}
accepted_vars, rejected_vars, errors_dict = self.accept_or_ignore_variables(
kwargs.get("extra_vars", {}),
_exclude_errors=exclude_errors,
ex... | https://github.com/ansible/awx/issues/2041 | ./awx_install.sh
HEAD is now at 2e98029 Merge pull request #2009 from cdvv7788/Issue/1506
Already up-to-date.
PLAY [Build and deploy AWX] *********************************************************************************************************************************
TASK [check_vars : include_tasks] ***************... | TypeError |
def parse_inventory_id(data):
inventory_id = data.get("inventory_id", ["null"])
try:
inventory_id = int(inventory_id[0])
except ValueError:
inventory_id = None
except IndexError:
inventory_id = None
except TypeError:
inventory_id = None
if not inventory_id:
... | def parse_inventory_id(data):
inventory_id = data.get("inventory_id", ["null"])
try:
inventory_id = int(inventory_id[0])
except ValueError:
inventory_id = None
if not inventory_id:
inventory_id = None
return inventory_id
| https://github.com/ansible/awx/issues/1257 | [2018-02-15 10:31:51,202: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x1d71c80> (args:('awx.main.tasks.run_project_update', '69545664-1752-4c48-a46c-41b7976d5bd3', {'origin': 'gen280@awx', 'lang': 'py', 'task': 'awx.main.tasks.run_project_update', 'group': None, 'root_id': 'e22c4be1-8d1a-4193-a5e8... | AttributeError |
def parse_message_text(self, message_text, client_id):
"""
See the Messages of CONTRIBUTING.md for the message format.
"""
data = json.loads(message_text)
if len(data) == 2:
message_type = data.pop(0)
message_value = data.pop(0)
if isinstance(message_value, list):
... | def parse_message_text(self, message_text, client_id):
"""
See the Messages of CONTRIBUTING.md for the message format.
"""
data = json.loads(message_text)
if len(data) == 2:
message_type = data.pop(0)
message_value = data.pop(0)
if isinstance(message_value, list):
... | https://github.com/ansible/awx/issues/1257 | [2018-02-15 10:31:51,202: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x1d71c80> (args:('awx.main.tasks.run_project_update', '69545664-1752-4c48-a46c-41b7976d5bd3', {'origin': 'gen280@awx', 'lang': 'py', 'task': 'awx.main.tasks.run_project_update', 'group': None, 'root_id': 'e22c4be1-8d1a-4193-a5e8... | AttributeError |
def handle(self, message):
"""
Dispatches a message based on the message type to a handler function
of name onX where X is the message type.
"""
topology_id = message.get("topology")
if topology_id is None:
logger.warning("Unsupported message %s: no topology", message)
return
... | def handle(self, message):
"""
Dispatches a message based on the message type to a handler function
of name onX where X is the message type.
"""
topology_id = message.get("topology")
assert topology_id is not None, "No topology_id"
client_id = message.get("client")
assert client_id is no... | https://github.com/ansible/awx/issues/1257 | [2018-02-15 10:31:51,202: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x1d71c80> (args:('awx.main.tasks.run_project_update', '69545664-1752-4c48-a46c-41b7976d5bd3', {'origin': 'gen280@awx', 'lang': 'py', 'task': 'awx.main.tasks.run_project_update', 'group': None, 'root_id': 'e22c4be1-8d1a-4193-a5e8... | AttributeError |
def onLinkCreate(self, link, topology_id, client_id):
logger.debug("Link created %s", link)
device_map = dict(
Device.objects.filter(
topology_id=topology_id,
cid__in=[link["from_device_id"], link["to_device_id"]],
).values_list("cid", "pk")
)
if link["from_device... | def onLinkCreate(self, link, topology_id, client_id):
logger.debug("Link created %s", link)
device_map = dict(
Device.objects.filter(
topology_id=topology_id,
cid__in=[link["from_device_id"], link["to_device_id"]],
).values_list("cid", "pk")
)
Link.objects.get_or_... | https://github.com/ansible/awx/issues/1257 | [2018-02-15 10:31:51,202: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x1d71c80> (args:('awx.main.tasks.run_project_update', '69545664-1752-4c48-a46c-41b7976d5bd3', {'origin': 'gen280@awx', 'lang': 'py', 'task': 'awx.main.tasks.run_project_update', 'group': None, 'root_id': 'e22c4be1-8d1a-4193-a5e8... | AttributeError |
def onLinkDestroy(self, link, topology_id, client_id):
logger.debug("Link deleted %s", link)
device_map = dict(
Device.objects.filter(
topology_id=topology_id,
cid__in=[link["from_device_id"], link["to_device_id"]],
).values_list("cid", "pk")
)
if link["from_devic... | def onLinkDestroy(self, link, topology_id, client_id):
logger.debug("Link deleted %s", link)
device_map = dict(
Device.objects.filter(
topology_id=topology_id,
cid__in=[link["from_device_id"], link["to_device_id"]],
).values_list("cid", "pk")
)
if link["from_devic... | https://github.com/ansible/awx/issues/1257 | [2018-02-15 10:31:51,202: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x1d71c80> (args:('awx.main.tasks.run_project_update', '69545664-1752-4c48-a46c-41b7976d5bd3', {'origin': 'gen280@awx', 'lang': 'py', 'task': 'awx.main.tasks.run_project_update', 'group': None, 'root_id': 'e22c4be1-8d1a-4193-a5e8... | AttributeError |
def ws_connect(message):
if not message.user.is_authenticated():
logger.error("Request user is not authenticated to use websocket.")
message.reply_channel.send({"close": True})
return
else:
message.reply_channel.send({"accept": True})
data = urlparse.parse_qs(message.content... | def ws_connect(message):
if not message.user.is_authenticated():
logger.error("Request user is not authenticated to use websocket.")
message.reply_channel.send({"close": True})
return
else:
message.reply_channel.send({"accept": True})
data = urlparse.parse_qs(message.content... | https://github.com/ansible/awx/issues/1257 | [2018-02-15 10:31:51,202: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x1d71c80> (args:('awx.main.tasks.run_project_update', '69545664-1752-4c48-a46c-41b7976d5bd3', {'origin': 'gen280@awx', 'lang': 'py', 'task': 'awx.main.tasks.run_project_update', 'group': None, 'root_id': 'e22c4be1-8d1a-4193-a5e8... | AttributeError |
def ws_message(message):
# Send to all clients editing the topology
channels.Group("topology-%s" % message.channel_session["topology_id"]).send(
{"text": message["text"]}
)
# Send to networking_events handler
networking_events_dispatcher.handle(
{
"text": message["text"],... | def ws_message(message):
# Send to all clients editing the topology
Group("topology-%s" % message.channel_session["topology_id"]).send(
{"text": message["text"]}
)
# Send to networking_events handler
networking_events_dispatcher.handle(
{
"text": message["text"],
... | https://github.com/ansible/awx/issues/1257 | [2018-02-15 10:31:51,202: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x1d71c80> (args:('awx.main.tasks.run_project_update', '69545664-1752-4c48-a46c-41b7976d5bd3', {'origin': 'gen280@awx', 'lang': 'py', 'task': 'awx.main.tasks.run_project_update', 'group': None, 'root_id': 'e22c4be1-8d1a-4193-a5e8... | AttributeError |
def ws_disconnect(message):
if "topology_id" in message.channel_session:
channels.Group("topology-%s" % message.channel_session["topology_id"]).discard(
message.reply_channel
)
| def ws_disconnect(message):
if "topology_id" in message.channel_session:
Group("topology-%s" % message.channel_session["topology_id"]).discard(
message.reply_channel
)
| https://github.com/ansible/awx/issues/1257 | [2018-02-15 10:31:51,202: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x1d71c80> (args:('awx.main.tasks.run_project_update', '69545664-1752-4c48-a46c-41b7976d5bd3', {'origin': 'gen280@awx', 'lang': 'py', 'task': 'awx.main.tasks.run_project_update', 'group': None, 'root_id': 'e22c4be1-8d1a-4193-a5e8... | AttributeError |
def send_notifications(notification_list, job_id=None):
if not isinstance(notification_list, list):
raise TypeError("notification_list should be of type list")
if job_id is not None:
job_actual = UnifiedJob.objects.get(id=job_id)
notifications = Notification.objects.filter(id__in=notificati... | def send_notifications(notification_list, job_id=None):
if not isinstance(notification_list, list):
raise TypeError("notification_list should be of type list")
if job_id is not None:
job_actual = UnifiedJob.objects.get(id=job_id)
notifications = Notification.objects.filter(id__in=notificati... | https://github.com/ansible/awx/issues/1817 | xxx@dddd-01:~$ docker logs awx_task_1
Using /etc/ansible/ansible.cfg as config file
...
Traceback (most recent call last):
File "/usr/bin/awx-manage", line 9, in <module>
load_entry_point('awx==1.0.6.0', 'console_scripts', 'awx-manage')()
File "/usr/lib/python2.7/site-packages/awx/__init__.py", line 109, in manage
exec... | ValueError |
def dispatch(self, request, *args, **kwargs):
response = super(CompleteView, self).dispatch(request, *args, **kwargs)
if self.request.user and self.request.user.is_authenticated():
logger.info(smart_text("User {} logged in".format(self.request.user.username)))
response.set_cookie("userLoggedIn",... | def dispatch(self, request, *args, **kwargs):
response = super(CompleteView, self).dispatch(request, *args, **kwargs)
if self.request.user and self.request.user.is_authenticated():
auth.login(self.request, self.request.user)
logger.info(smart_text("User {} logged in".format(self.request.user.use... | https://github.com/ansible/awx/issues/1418 | 2018/03/01 21:33:27 [warn] 31#0: *24 upstream server temporarily disabled while reading response header from upstream, client: 172.18.0.4, server: _, request: "GET /sso/complete/ HTTP/1.1", upstream: "uwsgi://127.0.0.1:8050", host: "awx.example.com", referrer: "https://logon.example.com/adfs/ls?SAMLRequest=<RESPONSE>&a... | AttributeError |
def can_change(self, obj, data):
# Checks for admin change permission on inventory.
if obj and obj.inventory:
return self.user.can_access(
Inventory, "change", obj.inventory, None
) and self.check_related(
"source_project", Project, data, obj=obj, role_field="use_role"
... | def can_change(self, obj, data):
# Checks for admin change permission on inventory.
if obj and obj.inventory:
return (
self.user.can_access(Inventory, "change", obj.inventory, None)
and self.check_related(
"credential", Credential, data, obj=obj, role_field="use_r... | https://github.com/ansible/awx/issues/1664 | 2018-03-23 15:38:36,900 ERROR django.request Internal Server Error: /api/v2/inventory_sources/25/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python2.7/site-packages/aw... | KeyError |
def copy_model_obj(
old_parent, new_parent, model, obj, creater, copy_name="", create_kwargs=None
):
fields_to_preserve = set(getattr(model, "FIELDS_TO_PRESERVE_AT_COPY", []))
fields_to_discard = set(getattr(model, "FIELDS_TO_DISCARD_AT_COPY", []))
m2m_to_preserve = {}
o2m_to_preserve = {}
creat... | def copy_model_obj(
old_parent, new_parent, model, obj, creater, copy_name="", create_kwargs=None
):
fields_to_preserve = set(getattr(model, "FIELDS_TO_PRESERVE_AT_COPY", []))
fields_to_discard = set(getattr(model, "FIELDS_TO_DISCARD_AT_COPY", []))
m2m_to_preserve = {}
o2m_to_preserve = {}
creat... | https://github.com/ansible/awx/issues/1664 | 2018-03-23 15:38:36,900 ERROR django.request Internal Server Error: /api/v2/inventory_sources/25/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python2.7/site-packages/aw... | KeyError |
def deep_copy_permission_check_func(user, new_objs):
for obj in new_objs:
for field_name in obj._get_workflow_job_field_names():
item = getattr(obj, field_name, None)
if item is None:
continue
elif field_name in ["inventory"]:
if not user.c... | def deep_copy_permission_check_func(user, new_objs):
for obj in new_objs:
for field_name in obj._get_workflow_job_field_names():
item = getattr(obj, field_name, None)
if item is None:
continue
if field_name in ["inventory"]:
if not user.can... | https://github.com/ansible/awx/issues/1664 | 2018-03-23 15:38:36,900 ERROR django.request Internal Server Error: /api/v2/inventory_sources/25/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python2.7/site-packages/aw... | KeyError |
def can_copy(self, obj):
if self.save_messages:
missing_ujt = []
missing_credentials = []
missing_inventories = []
qs = obj.workflow_job_template_nodes
qs = qs.prefetch_related(
"unified_job_template", "inventory__use_role", "credentials__use_role"
)
... | def can_copy(self, obj):
if self.save_messages:
missing_ujt = []
missing_credentials = []
missing_inventories = []
qs = obj.workflow_job_template_nodes
qs = qs.prefetch_related(
"unified_job_template", "inventory__use_role", "credentials__use_role"
)
... | https://github.com/ansible/awx/issues/1664 | 2018-03-23 15:38:36,900 ERROR django.request Internal Server Error: /api/v2/inventory_sources/25/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python2.7/site-packages/aw... | KeyError |
def _reconstruct_relationships(copy_mapping):
for old_obj, new_obj in copy_mapping.items():
model = type(old_obj)
for field_name in getattr(model, "FIELDS_TO_PRESERVE_AT_COPY", []):
field = model._meta.get_field(field_name)
if isinstance(field, ForeignKey):
if... | def _reconstruct_relationships(copy_mapping):
for old_obj, new_obj in copy_mapping.items():
model = type(old_obj)
for field_name in getattr(model, "FIELDS_TO_PRESERVE_AT_COPY", []):
field = model._meta.get_field(field_name)
if isinstance(field, ForeignKey):
if... | https://github.com/ansible/awx/issues/1664 | 2018-03-23 15:38:36,900 ERROR django.request Internal Server Error: /api/v2/inventory_sources/25/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python2.7/site-packages/aw... | KeyError |
def create_config_from_prompts(self, kwargs):
"""
Create a launch configuration entry for this job, given prompts
returns None if it can not be created
"""
if self.unified_job_template is None:
return None
JobLaunchConfig = self._meta.get_field("launch_config").related_model
config =... | def create_config_from_prompts(self, kwargs):
"""
Create a launch configuration entry for this job, given prompts
returns None if it can not be created
"""
if self.unified_job_template is None:
return None
JobLaunchConfig = self._meta.get_field("launch_config").related_model
config =... | https://github.com/ansible/awx/issues/1658 | 2018-03-23 00:17:12,246 ERROR awx.main.scheduler Task awx.main.scheduler.tasks.run_task_manager encountered exception.
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/var/lib/awx/venv/awx... | Exception |
def can_copy(self, obj):
if self.save_messages:
missing_ujt = []
missing_credentials = []
missing_inventories = []
qs = obj.workflow_job_template_nodes
qs = qs.prefetch_related(
"unified_job_template", "inventory__use_role", "credentials__use_role"
)
... | def can_copy(self, obj):
if self.save_messages:
missing_ujt = []
missing_credentials = []
missing_inventories = []
qs = obj.workflow_job_template_nodes
qs = qs.prefetch_related(
"unified_job_template", "inventory__use_role", "credential__use_role"
)
... | https://github.com/ansible/awx/issues/1658 | 2018-03-23 00:17:12,246 ERROR awx.main.scheduler Task awx.main.scheduler.tasks.run_task_manager encountered exception.
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/var/lib/awx/venv/awx... | Exception |
def _obj_capability_dict(self, obj):
"""
Returns the user_capabilities dictionary for a single item
If inside of a list view, it runs the prefetching algorithm for
the entire current page, saves it into context
"""
view = self.context.get("view", None)
parent_obj = None
if view and hasat... | def _obj_capability_dict(self, obj):
"""
Returns the user_capabilities dictionary for a single item
If inside of a list view, it runs the prefetching algorithm for
the entire current page, saves it into context
"""
view = self.context.get("view", None)
parent_obj = None
if view and hasat... | https://github.com/ansible/awx/issues/1546 | AttributeError: 'super' object has no attribute 'accessible_pk_qs'
2018-03-13 19:49:42,026 ERROR django.request Internal Server Error: /api/v2/inventory_sources/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response =... | AttributeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.