Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

with LowLevel.API("NRF91") as api fails with internal error -254 #29

Open
fredaas opened this issue Dec 9, 2021 · 4 comments
Open

with LowLevel.API("NRF91") as api fails with internal error -254 #29

fredaas opened this issue Dec 9, 2021 · 4 comments

Comments

@fredaas
Copy link

fredaas commented Dec 9, 2021

Following the installation guide and installing the required JLink dlls, opening the api fails with the following error:

Traceback (most recent call last):
  File "./main.py", line 6, in <module>
    with LowLevel.API("NRF91") as api:
  File "/usr/local/lib/python3.8/dist-packages/pynrfjprog-10.14.0-py3.8.egg/pynrfjprog/LowLevel.py", line 1723, in __enter__
    self.open()
  File "/usr/local/lib/python3.8/dist-packages/pynrfjprog-10.14.0-py3.8.egg/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.

Same error occurs installing from the pip3 package and building from source.

System: Linux 5.11.0-41-generic, Ubuntu 20.04.2 LTS

@fredaas
Copy link
Author

fredaas commented Dec 21, 2021

Any feedback on this?

@blavka
Copy link

blavka commented Jan 10, 2022

I have same problem

2022-01-10 16:14:16,901 INFO: pynrfjprog.HighLevel: [HighLevel] Creating new probe
2022-01-10 16:14:16,901 INFO: pynrfjprog.HighLevel: [HighLevel] Initialize new probe.
2022-01-10 16:14:16,902 INFO: pynrfjprog.HighLevel: [Probes.801009414] [DebugProbe] Load library at /usr/local/lib/python3.7/dist-packages/pynrfjprog/lib_armhf/libnrfjprogdll.so.
2022-01-10 16:14:16,904 INFO: pynrfjprog.HighLevel: [Probes.801009414] [DebugProbe] Library loaded, loading member functions.
2022-01-10 16:14:16,905 INFO: pynrfjprog.HighLevel: [Probes.801009414] [DebugProbe] Member functions succesfully loaded.
2022-01-10 16:14:16,906 INFO: pynrfjprog.HighLevel: [Probes.801009414] [DebugProbe] Connecting to device from NRF91 family.
2022-01-10 16:14:16,929 ERROR: pynrfjprog.HighLevel: [Probes.801009414] [DebugProbe] Failed to open nfrjprogdll
2022-01-10 16:14:16,929 ERROR: pynrfjprog.HighLevel: [Probes.801009414] [DebugProbe] With family "NRF91".
2022-01-10 16:14:16,929 INFO: pynrfjprog.HighLevel: [Probes.801009414] [DebugProbe] Uninitializing probe with serial number 801009414.
2022-01-10 16:14:16,930 ERROR: pynrfjprog.HighLevel: [Probes.801009414] [Client] Worker process is dead, cannot execute command.
2022-01-10 16:14:17,040 ERROR: pynrfjprog.HighLevel: [HighLevel] Failed while initializing probe
2022-01-10 16:14:17,542 ERROR: pynrfjprog.HighLevel: [Probes.801009414] b'An error was reported by NRFJPROG DLL: -254 INTERNAL_ERROR. \n[Probes.801009414] [DebugProbe] Failed to open nfrjprogdll\n\textra: [Probes.801009414] [DebugProbe] With family "NRF91".\n\textra: [Probes.801009414] [Client] Worker process is dead, cannot execute command.\n\textra: [HighLevel] Failed while initializing probe'
2022-01-10 16:14:17,542 INFO: pynrfjprog.HighLevel: [HighLevel] Closing and freeing sub dlls.

@blavka
Copy link

blavka commented Jan 24, 2022

Hi I was able to trace the program and I found where the problem was.
Worker is dependent on files from the locale.
If the locale is incorrect, it will fall.
For fix locale I use on ubuntu:
sudo dpkg-reconfigure locales

or you can try only generate locale files:
sudo locale-gen

@blavka
Copy link

blavka commented Jan 24, 2022

And fix executable flag on worker

for me work this:
sudo chmod +x /usr/local/lib/python3.9/dist-packages/pynrfjprog/lib_x64/jlinkarm_nrf_worker_linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants