X8 RPC example from tutorial not working (image version 934)

I recently obtained a new Portenta x8. I started working through the tutorials. I updated the FW to the latest:

ID=lmp-xwayland
NAME="Linux-microPlatform XWayland"
VERSION="4.0.11-934-91"
VERSION_ID=4.0.11-934-91
PRETTY_NAME="Linux-microPlatform XWayland 4.0.11-934-91"
HOME_URL="https://foundries.io/"
SUPPORT_URL="https://support.foundries.io/"
DEFAULT_HOSTNAME="portenta-x8"
LMP_MACHINE="portenta-x8"
LMP_FACTORY="arduino"
LMP_FACTORY_TAG="main"
IMAGE_ID=lmp-factory-image
IMAGE_VERSION=934

I followed the Data Exchange tutorial:

https://docs.arduino.cc/tutorials/portenta-x8/python-arduino-data-exchange/

The sketch running on the M4:

#include <RPC.h>
#include <SerialRPC.h>

/*
  Tested with arduino-91.4 and mbed portenta 4.1.5.
  This is a fake BME680 sensor example over rpc.
  We implement several rpc stubs which will answer with the same (fixed)
  data over and over. It works great as a real use-case for sensor acquisition
  from M4 over RPC protocol on the Portenta-X8 without the need to actually wire the
  sensors over I2C.
*/

void setup()
{
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, HIGH);

  Serial.begin(115200);
  //while (!Serial){};
  Serial.println("Fake BME680 test on M4");

  Serial.println("Registering rpc calls...");
  RPC.bind("temperature", []{ return 100; });
  RPC.bind("humidity", []{ return 200; });
  RPC.bind("pressure", []{ return 300; });
  RPC.bind("gas", []{ return 400; });
  RPC.bind("altitude", []{ return 500; });

  /*if (RPC.cpu_id() == CM7_CPUID) {
    // Introduce a brief delay to allow the M4 sufficient time
    // to bind remote functions before invoking them.
    delay(100);
  }*/

  spettacolino();
  Serial.println("Finished Init");
}

void loop()
{
  Serial.print("Temperature = ");
  Serial.print(100);
  Serial.println(" *C");

  Serial.print("Pressure = ");
  Serial.print(200);
  Serial.println(" hPa");

  Serial.print("Humidity = ");
  Serial.print(300);
  Serial.println(" %");

  Serial.print("Gas = ");
  Serial.print(400);
  Serial.println(" KOhms");

  Serial.print("Approx. Altitude = ");
  Serial.print(500);
  Serial.println(" m");

  Serial.println();

  delay(1000);
}

void spettacolino() {
  for(int i=0; i<6; i++) {
    digitalWrite(LED_BUILTIN, LOW);
    delay(800);
    digitalWrite(LED_BUILTIN, HIGH);
    delay(200);
  }
  digitalWrite(LED_BUILTIN, LOW);
}

The docker-compose.yml for the container:

services:
  python-sensor-rpc:
    #image: hub.foundries.io/arduino/python-sensor-rpc:latest
    image: python-sensor-rpc:latest
    restart: unless-stopped
    environment:
      - PYTHONUNBUFFERED=1
    volumes:
      - /var/run/secrets:/app/config/
    extra_hosts:
      - "m4-proxy:172.17.0.1"

The python script running in the container:

import time
from msgpackrpc import Address as RpcAddress, Client as RpcClient, error as RpcError


# Fixed configuration parameters
port = 8884
publish_interval = 5

# The M4 Proxy address needs to be mapped via Docker's extra hosts
m4_proxy_address = 'm4-proxy'
m4_proxy_port = 5001

def get_data_from_m4():
    """Get data from the M4 via RPC (MessagePack-RPC)

    The Arduino sketch on the M4 must implement the following methods
    returning the suitable values from the attached sensor:

    * `temperature`
    * `humidity`
    * `pressure`
    * `gas`
    * `altitude`

    """

    rpc_address = RpcAddress(m4_proxy_address, m4_proxy_port)

    data = ()

    try:
        rpc_client = RpcClient(rpc_address)
        temperature = rpc_client.call('temperature')

        rpc_client = RpcClient(rpc_address)
        humidity = rpc_client.call('humidity')

        rpc_client = RpcClient(rpc_address)
        pressure = rpc_client.call('pressure')

        rpc_client = RpcClient(rpc_address)
        gas = rpc_client.call('gas')

        rpc_client = RpcClient(rpc_address)
        altitude = rpc_client.call('altitude')

        data = temperature, humidity, pressure, gas, altitude

    except RpcError.TimeoutError:
        print("Unable to retrive data from the M4.")

    return data


if __name__ == '__main__':

    print()
    print("============================================")
    print("==       Portenta X8 Sensor reading       ==")
    print("============================================")
    print()

    try:
        while True:
            data = get_data_from_m4()
            if len(data) > 0:
                print("Temperature: ", data[0])
                print("Humidity: ", data[1])
                print("Pressure: ", data[2])
                print("Gas: ", data[3])
                print("Altitude: ", data[4])
            time.sleep(publish_interval)
    except KeyboardInterrupt:
        print('Stopped.')

The output from running the python-sensor-rpc container is the following:

python-sensor-rpc-python-sensor-rpc-1  |
python-sensor-rpc-python-sensor-rpc-1  | ============================================
python-sensor-rpc-python-sensor-rpc-1  | ==       Portenta X8 Sensor reading       ==
python-sensor-rpc-python-sensor-rpc-1  | ============================================
python-sensor-rpc-python-sensor-rpc-1  |
python-sensor-rpc-python-sensor-rpc-1  | Unable to retrive data from the M4.
python-sensor-rpc-python-sensor-rpc-1  | Unable to retrive data from the M4.

I verified that there is some serial data coming across by using the py-serial download from the documentation. (I named the container serial-debugger) It outputs the following:

serial-debugger  | [1758922463.6315038] Call b'Pressure = '
serial-debugger  | Pressure =
serial-debugger  | [1758922463.6321552] Call b'100'
serial-debugger  | 100
serial-debugger  | [1758922464.6219401] Call b'Temperature = '
serial-debugger  | Temperature =
serial-debugger  | [1758922464.622339] Call b'100'
serial-debugger  | 100
serial-debugger  | [1758922464.6230464] Call b' *C'
serial-debugger  |  *C
serial-debugger  | [1758922464.623662] Call b'\r\n'
serial-debugger  |
serial-debugger  |
serial-debugger  | [1758922464.624251] Call b'Pressure = '
serial-debugger  | Pressure =
serial-debugger  | [1758922464.62478] Call b'200'
serial-debugger  | 200
serial-debugger  | [1758922464.6253357] Call b' hPa'
serial-debugger  |  hPa
serial-debugger  | [1758922464.6258812] Call b'\r\n'
serial-debugger  |
serial-debugger  |
serial-debugger  | [1758922464.6264505] Call b'Humidity = '
serial-debugger  | Humidity =
serial-debugger  | [1758922464.6270015] Call b'300'
serial-debugger  | 300
serial-debugger  | [1758922464.627612] Call b' %'
serial-debugger  |  %
serial-debugger  | [1758922464.6281621] Call b'\r\n'
serial-debugger  |
serial-debugger  |
serial-debugger  | [1758922464.6287236] Call b'400'
serial-debugger  | 400
serial-debugger  | [1758922464.6292787] Call b'Gas = '
serial-debugger  | Gas =
serial-debugger  | [1758922464.6297827] Call b' KOhms'
serial-debugger  |  KOhms
serial-debugger  | [1758922464.6303189] Call b'\r\n'

From having done some research, some people in the past had success with using a blink example:
https://github.com/joel35/portenta-x8-blink-rpc/tree/main

I tried that and it gave me the same "unable to retrieve data from the M4".

So, I am all out of ideas. This is the most basic functionality and why this unit was purchased in the first place. It's the "hello world" of getting the RPC stuff to work, and should just work.

I would love to know if this is a known issue on this version of FW and if there is a plan to fix it, and when that might be. My company needs to make a decision on whether to buy more of these or pivot to another solution.

Thanks.

Hi @coffeedev. I believe you can fix the RPC communication problem by updating the M7 core's firmware. I'll provide instructions you can follow to do that:

  1. Click the following link to download the binary for version 0.0.5 of the firmware:
    STM32H747AII6_CM7.zip (45.2 KB)
    I am providing the binary I built because it is a bit complicated and inconvenient to build it yourself. However, if you prefer, you are welcome to build the firmware yourself from the source code instead of trusting the binary I am providing. The instructions for doing that are here (note that they don't mention there is a requirement to have a recent version of the ARM GNU Toolchain AKA "arm-none-eabi-gcc" or "gcc-arm-none-eabi" installed).
  2. Wait for the download to finish.
  3. Extract the downloaded file to any convenient location on your computer.
  4. Use adb push to upload the STM32H747AII6_CM7.bin file from the extracted folder to the Portenta X8 's Linux machine, just as you did before with the python-sensor-rpc folder.
  5. Use adb shell to open a shell on the Portenta X8 's Linux machine as usual.
  6. Type the following command (reference) in the terminal prompt of the Portenta X8 's Linux machine shell:
    sudo mount -o remount,rw /usr && sudo mv STM32H747AII6_CM7.bin /usr/lib/firmware/arduino/stm32h7-fw/STM32H747AII6_CM7.bin && sudo bash -c /usr/arduino/extra/program.sh
    
  7. Press the Enter key.
  8. Wait for the firmware update to finish successfully.
  9. Use docker compose up to run the python-sensor-rpc container, just as you did before when following the instructions from the tutorial.

Please let us know if you have any questions or problems while following those instructions.

There was a known issue affecting RPC communications in previous versions of the M7 core firmware. The problem has already been fixed in the latest version 0.0.5 of the firmware:

@ptillisch Updated firmware and it is still not reading. @coffeedev did this solution work for you?

Hi @cpinnock00. I confirm the problem. I investigated and found that there is an incompatibility between the Python script from the tutorial's Docker image and the operating system image version 934.

There is actually a separate arduino/python-rpc-sensors Docker image that does the same thing as the one from the tutorial, but has a fix for the incompatibility:

Other than that fix, the significant difference between the arduino/python-rpc-sensors image and the "python-sensor-rpc" image from the tutorial is that the sketch bundled with the arduino/python-rpc-sensors only produces dummy sensor data (as opposed to the sketches bundled with the tutorial's image, which reads real data from the sensor):

The reason the "rpc-sensors" sketch bundled with the arduino/python-rpc-sensors image produces dummy data is to make it a more simple basic "hello world" demonstration. If you only want a minimal demonstration of RPC communication, the tutorial's dependence on an external sensor introduces significant irrelevant complexity.

You can see the fix that was made in the arduino/python-rpc-sensors image's Python script for the incompatibility with OS image 934 here:

https://github.com/arduino/portenta-containers/compare/198902fc75d6c6e522826509d0fdeb5f99bd74fd^..b705c9c0fb263dee267d436ff42143559671ea61

--- a/python-rpc-sensors/python/main.py
+++ b/python-rpc-sensors/python/main.py
@@ -8,7 +8,7 @@
 m4_proxy_host = 'm4-proxy'
 m4_proxy_call_port = 5001
 
-def get_data_from_m4(rpc_client):
+def get_data_from_m4(rpc_address):
     """Get data from the M4 via RPC (MessagePack-RPC)
 
     The Arduino sketch on the M4 must implement the following methods
@@ -20,17 +20,19 @@ def get_data_from_m4(rpc_client):
     * `gas`
     * `altitude`
 
+    WARNING: due to a known issue with msgpackrpc library, we can only
+    make a single call after RpcClient. If we need to make multiple calls,
+    we need to create a new RpcClient instance for each call.
+
     """
     data = ()
+    sensors = ('temperature', 'humidity', 'pressure', 'gas', 'altitude')
     try:
-        temperature = rpc_client.call('temperature')
-        humidity = rpc_client.call('humidity')
-        pressure = rpc_client.call('pressure')
-        gas = rpc_client.call('gas')
-        altitude = rpc_client.call('altitude')
-        data = temperature, humidity, pressure, gas, altitude
+        get_value = lambda value: RpcClient(rpc_address).call(value)
+        data = tuple(get_value(measure) for measure in sensors)
+
     except RpcError.TimeoutError:
-        print("Unable to retrive data from the M4.")
+        print("Unable to retrieve data from the M4.")
     return data
 
 if __name__ == '__main__':
@@ -43,9 +45,8 @@ def get_data_from_m4(rpc_client):
 
     try:
         rpc_address = RpcAddress(m4_proxy_host, m4_proxy_call_port)
-        rpc_client = RpcClient(rpc_address)
         while True:
-            data = get_data_from_m4(rpc_client)
+            data = get_data_from_m4(rpc_address)
             if len(data) > 0:
                 print("Temperature: ", data[0])
                 print("Humidity: ", data[1])

So the easiest solution will be to use the arduino/python-rpc-sensors image. I'll provide instructions you can follow to do that:

  1. Use adb shell to open a shell in the X8's Linux machine, as usual.
  2. Run the following command to create a folder to store the Docker "Compose file" that is used to configure the container:
    mkdir python-rpc-sensors && cd python-rpc-sensors
    
  3. Run the following command to download the Compose file:
    wget https://raw.githubusercontent.com/arduino/portenta-containers/refs/heads/main/python-rpc-sensors/docker-compose.yml
    
  4. Run the following command to override the image configuration from the downloaded Compose file to use the public image Arduino distributes via the Docker Hub registry:
    echo '
    services:
      python-rpc-sensors:
        image: arduino/python-rpc-sensors:latest
    ' > compose.override.yaml
    
    • This is required because the Compose file is configured to pull the image from a private FoundriesFactory image registry. That is useful if you have a FoundriesFactory account and want to manage your own copy/variant of the image via that service, but the publicly available image is perfectly sufficient for this simple demo.
  5. Run the following command:
    sudo docker compose up
    

The container will now start running. You should see output with this form:

$ sudo docker compose up
WARN[0000] The "FACTORY" variable is not set. Defaulting to a blank string.
[+] Building 0.0s (0/0)
[+] Running 1/0
 ✔ Container python-rpc-sensors-python-rpc-sensors-1     Created                                                                                                                                                                                                             0.0s
Attaching to python-rpc-sensors-python-rpc-sensors-1
python-rpc-sensors-python-rpc-sensors-1  |
python-rpc-sensors-python-rpc-sensors-1  | ============================================
python-rpc-sensors-python-rpc-sensors-1  | ==       Portenta X8 Sensor reading       ==
python-rpc-sensors-python-rpc-sensors-1  | ============================================
python-rpc-sensors-python-rpc-sensors-1  |
python-rpc-sensors-python-rpc-sensors-1  | Temperature:  25.904266357421875
python-rpc-sensors-python-rpc-sensors-1  | Humidity:  25.564695358276367
python-rpc-sensors-python-rpc-sensors-1  | Pressure:  976.4400024414062
python-rpc-sensors-python-rpc-sensors-1  | Gas:  136.496
python-rpc-sensors-python-rpc-sensors-1  | Altitude:  311.0769348144531

[...]

You can use the arduino/python-rpc-sensors image with the "M4_BME680_RPC" sketch that is bundled with the image provided by the tutorial, or with the simplified "rpc-sensors" sketch.


Please let us know if you have any questions or problems while following those instructions.


I have notified the people at Arduino responsible for the tutorial about the problem of the incompatibility of the tutorial with the current operating system version. I apologize for any confusion and inconvenience this error has caused.

Everything is up to date and followed your protocol. I still get this and this on a brand new board my last noe was older and couldn't handle the image version:

WARN[0000] The "FACTORY" variable is not set. Defaulting to a blank string. 
[+] Building 0.0s (0/0)                                                         
[+] Running 1/0
 ✔ Container python-rpc-sensors-python-rpc-sensors-1  Created              0.0s 
Attaching to python-rpc-sensors-python-rpc-sensors-1
python-rpc-sensors-python-rpc-sensors-1  | 
python-rpc-sensors-python-rpc-sensors-1  | ============================================
python-rpc-sensors-python-rpc-sensors-1  | ==       Portenta X8 Sensor reading       ==
python-rpc-sensors-python-rpc-sensors-1  | ============================================
python-rpc-sensors-python-rpc-sensors-1  | 
python-rpc-sensors-python-rpc-sensors-1  | Unable to retrieve data from the M4.
python-rpc-sensors-python-rpc-sensors-1  | Unable to retrieve data from the M4.
python-rpc-sensors-python-rpc-sensors-1  | Unable to retrieve data from the M4.
python-rpc-sensors-python-rpc-sensors-1  | Unable to retrieve data from the M4.
python-rpc-sensors-python-rpc-sensors-1  | Unable to retrieve data from the M4.
python-rpc-sensors-python-rpc-sensors-1  | Unable to retrieve data from the M4.
python-rpc-sensors-python-rpc-sensors-1  | Unable to retrieve data from the M4.
python-rpc-sensors-python-rpc-sensors-1  | Unable to retrieve data from the M4.
python-rpc-sensors-python-rpc-sensors-1  | Unable to retrieve data from the M4

The good thing is that with the latest image version update everything is matching the tutorials. Event the syntax. I wonder if I'm missing something? Please help.

Please provide the output from running the following command in the shell of the Linux machine on the X8:

cat /sys/kernel/x8h7_firmware/version

Please also tell me which Arduino sketch you are running on the M4 core. The ZIP file you download from the tutorial contains two different sketches:

  • M4_BME280_RPC
  • M4_BME680_RPC

Did you upload one of those two sketches from the tutorial to your Portenta X8? Or did you instead upload a custom sketch?

@coffeedev this worked for me. My first board was too old to handle the 934 uuu flash and got permanently stock. After updating my new board toe 934 and running M7 update @ptillisch suggested. I used these commands after pushing the extracted file to my board:

sudo mount -o remount,rw /usr

sudo cp STM32H747AII6_CM7.bin /usr/lib/firmware/arduino/stm32h7-fw/STM32H747AII6_CM7.bin

sudo /usr/arduino/extra/program.sh

After I did that I re-uploaded the sketch from the Arduino IDE and started getting values:

[+] Building 0.0s (0/0)                                                                                                        
[+] Running 1/0
 ✔ Container python-rpc-sensors-python-rpc-sensors-1  Created                                                             0.0s 
Attaching to python-rpc-sensors-python-rpc-sensors-1
python-rpc-sensors-python-rpc-sensors-1  | 
python-rpc-sensors-python-rpc-sensors-1  | ============================================
python-rpc-sensors-python-rpc-sensors-1  | ==       Portenta X8 Sensor reading       ==
python-rpc-sensors-python-rpc-sensors-1  | ============================================
python-rpc-sensors-python-rpc-sensors-1  | 
python-rpc-sensors-python-rpc-sensors-1  | Unable to retrieve data from the M4.
python-rpc-sensors-python-rpc-sensors-1  | Temperature:  100
python-rpc-sensors-python-rpc-sensors-1  | Humidity:  200
python-rpc-sensors-python-rpc-sensors-1  | Pressure:  300
python-rpc-sensors-python-rpc-sensors-1  | Gas:  400
python-rpc-sensors-python-rpc-sensors-1  | Altitude:  500
python-rpc-sensors-python-rpc-sensors-1  | Temperature:  100
python-rpc-sensors-python-rpc-sensors-1  | Humidity:  200
python-rpc-sensors-python-rpc-sensors-1  | Pressure:  300
python-rpc-sensors-python-rpc-sensors-1  | Gas:  400
python-rpc-sensors-python-rpc-sensors-1  | Altitude:  500
python-rpc-sensors-python-rpc-sensors-1  | Temperature:  100
python-rpc-sensors-python-rpc-sensors-1  | Humidity:  200
python-rpc-sensors-python-rpc-sensors-1  | Pressure:  300

Also the rpc blink examples from works:

[+] Building 0.0s (0/0)                                                                                                        
[+] Running 1/0
 ✔ Container python-blink-rpc-python-blink-rpc-1  Created                                                                 0.0s 
Attaching to python-blink-rpc-python-blink-rpc-1
python-blink-rpc-python-blink-rpc-1  | 
python-blink-rpc-python-blink-rpc-1  | ============================================
python-blink-rpc-python-blink-rpc-1  | ==       Portenta X8 M4 output            ==
python-blink-rpc-python-blink-rpc-1  | ============================================
python-blink-rpc-python-blink-rpc-1  | 
python-blink-rpc-python-blink-rpc-1  | count:  53
python-blink-rpc-python-blink-rpc-1  | led:  0
python-blink-rpc-python-blink-rpc-1  | count:  54
python-blink-rpc-python-blink-rpc-1  | led:  1
python-blink-rpc-python-blink-rpc-1  | count:  55
python-blink-rpc-python-blink-rpc-1  | led:  0
python-blink-rpc-python-blink-rpc-1  | count:  56
python-blink-rpc-python-blink-rpc-1  | led:  1
python-blink-rpc-python-blink-rpc-1  | count:  57
python-blink-rpc-python-blink-rpc-1  | led:  0
python-blink-rpc-python-blink-rpc-1  | count:  58
python-blink-rpc-python-blink-rpc-1  | led:  1
python-blink-rpc-python-blink-rpc-1  | count:  59
python-blink-rpc-python-blink-rpc-1  | led:  0

Thank you I almost gave up!

Great news! Thanks for taking the time to post an update.

In addition to reporting the problem with the Python script provided by the tutorial, as I mentioned in post #4. I have also notified the developers about the problem with the version of the M7 firmware that is bundled with version 934 of the operating system image. We will be sure to ship the firmware fix with the next release of the OS image.

Nice one! I really like the simplicity of that example.

The BME sensor example from the tutorial is useful as a demonstration of a real world application. However, the dependence on external hardware introduces significant complexity that is not needed if we are only looking for a basic "Hello, world!" example to help us learn the fundamentals, and to serve as a "smoke test" to verify basic functionality of RPC communication. A "blink" example that only depends on the on-board LED is always ideal for such an application.

Sorry for the slow reply, I was out of town for the last couple of weeks and was unable to test this.

After I downloaded the FW that @ptillisch provided and updated my board it all just worked. Both the sensor rpc example and the blink example.

Thanks!

You are welcome. I'm glad it is working now. Thanks for taking the time to post an update.

Regards, Per

I follow the instructions: but hving same problem.

LED is blinking on the board.

fio@portenta-x8-82f2a09dabc013f:~/python-rpc-sensors$ sudo docker compose up
[+] Running 1/1
! python-rpc-sensors Warning 2.9s
[+] Building 48.2s (11/11) FINISHED
=> [python-rpc-sensors internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 891B 0.0s
=> [python-rpc-sensors internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [python-rpc-sensors internal] load metadata for Docker Hub Container Image Library | App Containerization 3.6s
=> [python-rpc-sensors 1/6] FROM Docker Hub Container Image Library | App Containerization 9.7s
=> => resolve Docker Hub Container Image Library | App Containerization 0.0s
=> => sha256:f6b180b7c269eb933bfcbf41f72ec970aab43e96deedb9ac13d0b6eee9802150 14.51MB / 14.51MB 6.5s
=> => sha256:1567c44f47c8136752ee4301be2e94130a5f8e1fb7a0e737ccac28fb8f66fd0f 1.65kB / 1.65kB 0.0s
=> => sha256:1e0795d202ab011b9e1d80f8c5a21745ec071be72b33e6f19424444b1609de4a 1.37kB / 1.37kB 0.0s
=> => sha256:3e96469960ffcff5b265b7e3cd64cc19185dcd55098cc0e7f7e3be836826594b 7.04kB / 7.04kB 0.0s
=> => sha256:47517142f6ba87eca6b7bdca1e0df160b74671c81e4b9605dad38c1862a43be3 2.72MB / 2.72MB 2.2s
=> => sha256:c731b7986d62e5b932f888fa4b4c6539247b88d5c795bc180f5aebf82d0821b3 663.15kB / 663.15kB 1.5s
=> => sha256:2c46554fedc1047b8a7cdb47f23b00dc9aca24a9ec5397eb8101d22f31cf1dff 231B / 231B 2.5s
=> => extracting sha256:47517142f6ba87eca6b7bdca1e0df160b74671c81e4b9605dad38c1862a43be3 0.3s
=> => sha256:585927c8f1a4da28fdacf16ed0d23a4b5582962eff0446d5d2a12c18a472bd2f 3.06MB / 3.06MB 6.5s
=> => extracting sha256:c731b7986d62e5b932f888fa4b4c6539247b88d5c795bc180f5aebf82d0821b3 1.0s
=> => extracting sha256:f6b180b7c269eb933bfcbf41f72ec970aab43e96deedb9ac13d0b6eee9802150 1.8s
=> => extracting sha256:2c46554fedc1047b8a7cdb47f23b00dc9aca24a9ec5397eb8101d22f31cf1dff 0.0s
=> => extracting sha256:585927c8f1a4da28fdacf16ed0d23a4b5582962eff0446d5d2a12c18a472bd2f 0.9s
=> [python-rpc-sensors internal] load build context 0.0s
=> => transferring context: 4.34kB 0.0s
=> [python-rpc-sensors 2/6] RUN pip install msgpack-rpc-python 32.6s
=> [python-rpc-sensors 3/6] RUN mkdir /app && mkdir /app/python && mkdir /app/firmware 0.7s
=> [python-rpc-sensors 4/6] COPY ./python/main.py /app/python/main.py 0.1s
=> [python-rpc-sensors 5/6] COPY ./firmware/rpc-sensors /app/firmware/rpc-sensors 0.1s
=> [python-rpc-sensors 6/6] WORKDIR /app/python 0.1s
=> [python-rpc-sensors] exporting to image 1.0s
=> => exporting layers 1.0s
=> => writing image sha256:eab6657d01cbf11a3c52d7ef7e0499d479d9aba46eeddedf755bfe6d92de0b0c 0.0s
=> => naming to docker.io/arduino/python-rpc-sensors:latest 0.0s
[+] Running 2/2
:check_mark: Network python-rpc-sensors_default Created 0.2s
:check_mark: Container python-rpc-sensors-python-rpc-sensors-1 Created 0.1s
Attaching to python-rpc-sensors-python-rpc-sensors-1
python-rpc-sensors-python-rpc-sensors-1 | I am starting *****
python-rpc-sensors-python-rpc-sensors-1 | Traceback (most recent call last):
python-rpc-sensors-python-rpc-sensors-1 | File "/app/python/main.py", line 14, in
python-rpc-sensors-python-rpc-sensors-1 | temperature = rpc_client.call('temperature')
python-rpc-sensors-python-rpc-sensors-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python-rpc-sensors-python-rpc-sensors-1 | File "/usr/local/lib/python3.11/site-packages/msgpackrpc/session.py", line 41, in call
python-rpc-sensors-python-rpc-sensors-1 | return self.send_request(method, args).get()
python-rpc-sensors-python-rpc-sensors-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python-rpc-sensors-python-rpc-sensors-1 | File "/usr/local/lib/python3.11/site-packages/msgpackrpc/future.py", line 43, in get
python-rpc-sensors-python-rpc-sensors-1 | raise self._error
python-rpc-sensors-python-rpc-sensors-1 | msgpackrpc.error.TimeoutError: Request timed out
unexpected EOF