Új hozzászólás Aktív témák

  • Janos46

    tag

    válasz kovisoft #2714 üzenetére

    3-ast használok. Az átküldött program F pontját futtasd le. Ezt írja ki:
    Traceback (most recent call last):
    File "/media/pi/FEKETE/Kesz_lesz/Pyrthon_oktato.py", line 126, in <module>
    mylcd.lcd_display_string(get_ip_address('eth0'), 2)
    File "/media/pi/FEKETE/Kesz_lesz/Pyrthon_oktato.py", line 123, in get_ip_address
    struct.pack('256s', ifname[:15])
    struct.error: argument for 's' must be a bytes object
    ------------------------------------------------------------
    Ez pedig az ifconfig:
    pi@raspberrypi:~ $ ifconfig
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.1.137 netmask 255.255.255.0 broadcast 192.168.1.255
    inet6 fe80::e092:4c9a:94f4:d2e1 prefixlen 64 scopeid 0x20<link>
    ether dc:a6:32:72:44:4a txqueuelen 1000 (Ethernet)
    RX packets 1367 bytes 1014588 (990.8 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 887 bytes 125612 (122.6 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 1000 (Local Loopback)
    RX packets 90 bytes 45284 (44.2 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 90 bytes 45284 (44.2 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.1.133 netmask 255.255.255.0 broadcast 192.168.1.255
    inet6 fe80::a832:8cdf:a38b:1346 prefixlen 64 scopeid 0x20<link>
    ether dc:a6:32:72:44:4c txqueuelen 1000 (Ethernet)
    RX packets 142 bytes 20973 (20.4 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 41 bytes 7175 (7.0 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    pi@raspberrypi:~ $

Új hozzászólás Aktív témák