Problems with pynrfjprog in docker container ubuntu

I have a problem with pynrfjprog in my docker container. The code works like a charm in windows and linux but when I execute it through my docker container in ubuntu I get this error:

/usr/local/lib/python3.10/dist-packages/pynrfjprog/__init__.py:24: in set_worker_executable
    lib_path.chmod(expected | mode)
/usr/lib/python3.10/pathlib.py:1191: in chmod
    self._accessor.chmod(self, mode, follow_symlinks=follow_symlinks)
E   PermissionError: [Errno 1] Operation not permitted: '/usr/local/lib/python3.10/dist-packages/pynrfjprog/lib_x64/jlinkarm_nrf_worker.exe'

Why is it trying to run the exefile?! Im running ubuntu in my container and ubuntu aswell on my machine. Ive tried different versions of pynrfjprog without success. All dependencies are installed correctly and the file jlinkarm_nrf_worker_linux is in that folder with the exe file but I cant get it to choose it. Ive tried the same thing on a ubuntu vmware and the same error.

Please help, Im going semi crazy

Parents
  • Hi,

    I am not able to explain this. Can you share your docker container along with a description on how to reproduce it?

  • I have tried to remove everything obsolete.

    Here is from my docker container:

    FROM ubuntu:latest

    ENV DEBIAN_FRONTEND=noninteractive

    RUN apt-get update \
     && apt-get install -y \
        build-essential \
        curl \
        git \
        iputils-ping \
        libglib2.0-dev \
        libncurses5 \
        python3-pip \
        wget \
     && rm -fr /var/lib/apt/lists/*

    RUN apt-get update && apt-get install -y

    RUN apt-get update && apt-get install -y wget udev

    RUN pip3 install --upgrade pip

    COPY requirements.txt requirements.txt

    RUN pip3 install -r requirements.txt

    RUN useradd --groups dialout -ms /bin/bash tester

    USER tester
    ENV HOME /home/tester
    ENV PYTHONPATH=rig/
    WORKDIR /home/tester


        and this in requirements.txt:
        wheel
        docopt
        pytest
        pytest-dependency
        pytest-ordering
        pytest-cov
        pynrfjprog
        
     My py file contains a single line now: import pynrfjprog
    Then I run the docker container with pytest and I get this error

  • Hi,

    I have forwarded this to the responsible team that is working for a fix. In the mean time, you should be able to resolve the issue by simply removing jlinkarm_nrf_worker.exe as it is anyway not used (it is for Windows only).

Reply Children
Related