# Streaming CLI path issue

**URL:** <https://forum.liquidinstruments.com/t/streaming-cli-path-issue/1127>\
**Category:** Software & APIs\
**Created:** [February 20, 2025, 8:44pm UTC](https://forum.liquidinstruments.com/t/streaming-cli-path-issue/1127 "2025-02-20T20:44:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JackAttack720](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@JackAttack720](https://forum.liquidinstruments.com/u/JackAttack720)\
**Post date:** [February 20, 2025, 8:44pm UTC](https://forum.liquidinstruments.com/t/streaming-cli-path-issue/1127/1 "2025-02-20T20:44:32Z")

</div>

**Moku model:** Moku:Go  
**Operating system:** Windows 11  
**Software version:** MokuCLI: 2.2.3, Moku python API 3.3.3, Python 3.13.2  
**Firmware version:** 601.0

**Bug or support request description:**  
When trying to start a streaming session on a lock in amplifier in multi instrument mode I get the following error:

```auto
 File "C:\Users\jrt3\Pycharm Projects\EUVRadiometer\euv_moku_interface.py", line 156, in <module>
    example_live_plot_output(euv_interface)
    ~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^
  File "C:\Users\jrt3\Pycharm Projects\EUVRadiometer\euv_moku_interface.py", line 119, in example_live_plot_output
    lia_stream = moku_interface.lia.start_streaming()
  File "C:\Users\jrt3\Pycharm Projects\EUVRadiometer\.venv\Lib\site-packages\moku\instruments\_lockinamp.py", line 855, in start_streaming
    super().start_streaming()
    ~~~~~~~~~~~~~~~~~~~~~~~ ^^
  File "C:\Users\jrt3\Pycharm Projects\EUVRadiometer\.venv\Lib\site-packages\moku\instruments\_stream.py", line 123, in start_streaming
    check_mokucli_version(MOKU_CLI_PATH, self._compat_cli_ver)
    ~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jrt3\Pycharm Projects\EUVRadiometer\.venv\Lib\site-packages\moku\utilities.py", line 17, in check_mokucli_version
    out, _ = Popen([cli_path, "--version"], stdout=PIPE, stderr=PIPE).communicate()
             ~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jrt3\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 1038, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
    ~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        pass_fds, cwd, env,
                        ^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
                        gid, gids, uid, umask,
                        ^^^^^^^^^^^^^^^^^^^^^^
                        start_new_session, process_group)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jrt3\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 1550, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                       ~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^
                             # no special security
                             ^^^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
                             cwd,
                             ^^^^
                             startupinfo)
                             ^^^^^^^^^^^^
PermissionError: [WinError 5] Access is denied

```

I tried many things including running as adminstrator, modifying permissions on files etc, but after some debugging I found there is perhaps a bug in line 17 of moku. **init**.py:

```auto
MOKU_CLI_PATH = environ.get("MOKU_CLI_PATH", which("mokucli"))
# This seems to return the path to the folder rather than the executable.
>> 'C:\\Program Files\\Liquid Instruments\\Moku CLI\\'

```

I changed this line to

```auto
MOKU_CLI_PATH = which(os.environ.get('MOKU_CLI_PATH') + 'mokucli')
# This gives the executable file
>>'C:\\Program Files\\Liquid Instruments\\Moku CLI\\mokucli.EXE'

```

This change allowed streaming to work.

---

<div class="post-metadata">

**Author:** ![indira](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.liquidinstruments.com/indira/32/317_2.png) [@indira](https://forum.liquidinstruments.com/u/indira)\
**Post date:** [February 24, 2025, 5:02am UTC](https://forum.liquidinstruments.com/t/streaming-cli-path-issue/1127/2 "2025-02-24T05:02:40Z")

</div>

Hi Jack,

You’re right that the MOKU\_CLI\_PATH should return ‘C:\Program Files\Liquid Instruments\Moku CLI\mokucli.EXE’, and I’m glad you could get that working. However I think the error you were getting initially is because you are using an old version of mokucli (looking at `check_mokucli_version(MOKU_CLI_PATH, self._compat_cli_ver`).

If you revert these changes and then update your mokucli to the latest package you should be able to stream without any errors. You can download the latest mokicli package from [Utilities](https://www.liquidinstruments.com/software/utilities/). The installation wizard will configure everything needed to launch the CLI successfully.

Let me know how this goes

---

<div class="post-metadata">

**Author:** ![JackAttack720](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@JackAttack720](https://forum.liquidinstruments.com/u/JackAttack720)\
**Post date:** [March 12, 2025, 3:16pm UTC](https://forum.liquidinstruments.com/t/streaming-cli-path-issue/1127/3 "2025-03-12T15:16:45Z")

</div>

Hi Indira, I downloaded my installation of the mokuCLI from [utilities](https://www.liquidinstruments.com/software/utilities/) as you had suggested, and that was the version I got. Are there instructions for updating the CLI another way? It seems 2.2.3 is the latest version of windows.

Thanks

-Jack

---

<div class="post-metadata">

**Author:** ![Dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dylan](https://forum.liquidinstruments.com/u/Dylan)\
**Post date:** [March 12, 2025, 9:23pm UTC](https://forum.liquidinstruments.com/t/streaming-cli-path-issue/1127/4 "2025-03-12T21:23:37Z")

</div>

Hello Jack,  
The latest version of mokucli for all OS is 2.3.1. Please try downloading again and going through the installation wizard, ensuring to delete the old installation. Then run:  
mokucli --version  
in your terminal to verify the newest version is installed. Please let me know how it goes and if you need any more assistance!

---

<div class="post-metadata">

**Author:** ![JackAttack720](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@JackAttack720](https://forum.liquidinstruments.com/u/JackAttack720)\
**Post date:** [March 13, 2025, 1:56pm UTC](https://forum.liquidinstruments.com/t/streaming-cli-path-issue/1127/5 "2025-03-13T13:56:12Z")

</div>

Hi Dylan, downloading the latest version and installing through the wizard got me to 2.3.0, but I still don’t see 2.3.1. I don’t have any issues with 2.3.0 so far though.

Thanks.
