thomasstenersen / pyrtt-viewer

A simple RTT client using Python 3 and pynrfjprog
MIT License
21 stars 5 forks source link

NRFJPROG DLL: -254 INTERNAL_ERROR #9

Closed nkernytskyy closed 2 years ago

nkernytskyy commented 2 years ago

It runs fine on some machines, but on others it fails with this output from Python:

Traceback (most recent call last):
File "pyrtt-viewer-mt-original.py", line 188, in <module>
main()
File "pyrtt-viewer-mt-original.py", line 174, in main
nrf = connect(args.segger_id)
File "pyrtt-viewer-mt-original.py", line 64, in connect
nrf.open()
File "/home/ihor/.local/lib/python3.8/site-packages/pynrfjprog/LowLevel.py", line 177, in open
raise APIError(result, error_data=self.get_errors())
pynrfjprog.APIError.APIError: An error was reported by NRFJPROG DLL: -254 INTERNAL_ERROR.

It runs fine on Ubuntu 20.04, Windows 7, Windows 10.

It fails on few other Ubuntu 20.04, Kubuntu 21.10, and two macOS.

All systems have installed Segger JLink software pack, Nordic Command Line Tools, and pynrfjprog.

thomasstenersen commented 2 years ago

Which versions of JLink do you have?

nrfjprog --version
pip show pynrfjprog
nkernytskyy commented 2 years ago

nrfjprog --version ERROR: An internal error has occurred, please try again. NOTE: For additional output, try running again with logging enabled (--log). NOTE: Any generated log error messages will be displayed.

pip show pynrfjprog Name: pynrfjprog Version: 10.15.1 Summary: A simple Python interface for the nrfjprog functionality Home-page: http://www.nordicsemi.com/ Author: Nordic Semiconductor ASA Author-email: sagtools@nordicsemi.no License: Nordic 5-clause License Location: /home/kubuntu/.local/lib/python3.9/site-packages Requires: future Required-by: pyrtt-viewer

nkernytskyy commented 2 years ago

nrfjprog was installed from this package: nrf-command-line-tools-10.15.1_linux-amd64

nkernytskyy commented 2 years ago

sudo nrfjprog --log ERROR: [ Client] - Worker process is dead, cannot execute command. ERROR: An internal error has occurred, please try again.

nkernytskyy commented 2 years ago

SEGGER J-Link Commander V7.58d (Compiled Dec 2 2021 15:27:09) DLL version V7.58d, compiled Dec 2 2021 15:26:53

thomasstenersen commented 2 years ago

Looks like there's a problem with your nrfjprog installation. You might want to seek more help at devzone.nordicsemi.com.

nkernytskyy commented 2 years ago

Thank you.

mped-oticon commented 1 year ago

export LANG=C worked in my case.

strace showed that worker process jlinkarm_nrf_worker_linux tried to load en_US.UTF-8 without these being installed on the machine we use for regression.