Floh 💻🚫|*> script
Enter filename (Tab to complete CTRL+C to cancel): demo
{
"adv_type": 1,
"tx_power": 22,
etc…
}
Floh 💻🚫|*>
Floh 💻🚫|*> script demo
Error: cannot access local variable 'file_name' where it is not associated with a value
Traceback (most recent call last):
File "/path/to/.local/pipx/venvs/meshcore-cli/lib/python3.14/site-packages/meshcore_cli/meshcore_cli.py", line 4723, in cli
asyncio.run(main(sys.argv[1:]))
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/path/to/python@3.14/3.14.4/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/runners.py", line 204, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/path/to/python@3.14/3.14.4/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/runners.py", line 127, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/path/to/python@3.14/3.14.4/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/base_events.py", line 719, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/path/to/.local/pipx/venvs/meshcore-cli/lib/python3.14/site-packages/meshcore_cli/meshcore_cli.py", line 4717, in main
await process_cmds(mc, ["chat"], json_output)
File "/path/to/.local/pipx/venvs/meshcore-cli/lib/python3.14/site-packages/meshcore_cli/meshcore_cli.py", line 3636, in process_cmds
cmds = await next_cmd(mc, cmds, json_output)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/.local/pipx/venvs/meshcore-cli/lib/python3.14/site-packages/meshcore_cli/meshcore_cli.py", line 3599, in next_cmd
await interactive_loop(mc)
File "/path/to/.local/pipx/venvs/meshcore-cli/lib/python3.14/site-packages/meshcore_cli/meshcore_cli.py", line 1123, in interactive_loop
await process_cmds(mc, args)
File "/path/to/.local/pipx/venvs/meshcore-cli/lib/python3.14/site-packages/meshcore_cli/meshcore_cli.py", line 3636, in process_cmds
cmds = await next_cmd(mc, cmds, json_output)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/.local/pipx/venvs/meshcore-cli/lib/python3.14/site-packages/meshcore_cli/meshcore_cli.py", line 3612, in next_cmd
if not file_name is None:
^^^^^^^^^
UnboundLocalError: cannot access local variable 'file_name' where it is not associated with a value
I have a simple script called
demoin my home directory, which simply issues theinfoscommand.I can run the script when calling the
scriptcommand and using tab auto completion or entering the filename when asked:But handing the filename as parameter as described in the documentations (
script <filename>) ends up in an error and meshcore-cli exits:I also tried passing the script like so:
script ./demoscript ~/demoscript /path/to/demoInfos