Registry and module error installing Natlink (Python 38 on Windows 10)

  installation, module, python, registry, windows-10

Recently, I have had to reinstall the operating system on my machine. In the process I upgraded Dragon NaturallySpeaking (DNS) from v13 to v15 and in reconfiguring my voice recognition environment (DNS + Natlink + Dragonfly) the following Natlink message now appears on DNS start:

Failed to find Natlink key in Windows registry.
Failed to extract value from Natlink key.
An exception occurred loading 'natlinkmain' module
Error message:
No module named 'natlinkmain'

My DNS version: 15.61.200.010

My OS specifications:

  • Edition: Windows 10 Pro
  • Version: 20H2
  • Installed on: 3/‎12/‎2021
  • OS build: 19042.867
  • Experience Windows Feature Experience Pack: 120.2212.551.0

To troubleshoot I have:

  1. Reinstalled Python and Natlink several times to ensure that I’m installing correctly (per the NatLink installation instructions):

Python 3.8.8 (32-bit), all users, at C:Python38-32

I also cleared my system of all Python and Natlink remnants and restarted the operating system with each reinstall.

Everything I have attempted has been with OS administrative privileges.

  1. Added additional system path variables in the following order:

    C:Python38-32Libsite-packagesnatlinkcore
    C:Python38-32Libsite-packages
    C:Python38-32Scripts
    C:Python38-32

  2. Added the following registry entry:

Registry Entry

This last effort advanced initialization past the first message above to this new DNS startup Natlink message:

An exception occurred loading 'natlinkmain' module
Error message:
no module named 'natlinkmain'
  1. Attempted to import natlinkmain:

Python Import

The referenced line…

Line 113

Additional information…

I did notice that using C:Python38-32Scriptsstart_natlinkconfig.exe to configure Natlink produces the following error message only on the first initialization attempt:

Error Message

The executable would also produce two GUI configuration windows, but run successfully despite the error message and the two windows.

The corresponding message in .natlinkconfigurenatlink_error.txt:

Traceback (most recent call last):
  File "c:python38-32libsite-packagesnatlinkcoreConfigureNatlinkconfigurenatlink.pyw", line 1355, in <module>
    app = MyApp(True)
  File "C:python38-32libsite-packageswxcore.py", line 2137, in __init__
    self._BootstrapApp()
SystemExit: OnInit returned false, exiting...

The settings in .natlinknatlinkstatus.ini:

[usersettings]

NatlinkPydOrigin = C:Python38-32Libsite-packagesnatlinkcorePYDnatlink_3.8_Ver15.pyd

At this point I am out of ideas and am wondering if anyone has come across this error message before and resolved, or have any ideas on how I might resolve it? I need Natlink to successfully launch in order to run Dragonfly word macros.

In troubleshooting I have referenced the following issue:

https://github.com/dictation-toolbox/natlink/issues/20

Source: Python Questions

LEAVE A COMMENT