Systemfehler: Schlechtes Argument für die interne Funktion

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Systemfehler: Schlechtes Argument für die interne Funktion

by Anonymous » 31 Aug 2025, 15:08

Ich bin neu in der Python -Programmierung. Ich bekomme einen Fehler unter und habe in Google keine Lösung dafür gefunden. Ich hoffe, jeder Python -Experte kann mir helfen, das Problem zu lösen. < /P>

Code: Select all

**in _convert_to_payload
#     for i in range(length_bytes):
# SystemError: Objects/listobject.c:169: bad argument to internal function**
< /code>

Ich erhalte über Fehler, während ich unten aufrufe def _convert_to_payload < /code> aufrufe. Bitte lassen Sie mich wissen, was ich hier fehlt. < /p>

def _convert_to_payload(self, value, length_bytes):
payload = []
for i in range(length_bytes):
payload.append((value >> (8 * i)) & 0xFF)
return payload

def send_status_query(self, response_address=0):
payload = self._convert_to_payload(response_address, 4)
self._send_host_command_message(CommandMessageID.StatusQuery, payload)  # pylint: disable=E1101

Top