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

When using standalone CLI, --nodes gives: No module named 'timeago.locales.en' #480

Closed
Scarg opened this issue Jan 15, 2024 · 3 comments
Closed

Comments

@Scarg
Copy link

Scarg commented Jan 15, 2024

Description

When using the standalone CLI (tested both Ubuntu and Windows) while things like --info do work, running meshtastic --nodes results in the following error:

Connected to radio
Aborting due to: No module named 'timeago.locales.en'

This was already reported some time ago here: #331.

It works fine if you do not use the standalone version, to reproduce the issue the standalone version must be used.

Considering that the ticket was closed too quickly last time, I'll try to write down a "how-to replicate" section.

Reproduction steps

Downloaded version

  1. Download https://github.com/meshtastic/python/releases/download/2.2.17/meshtastic_ubuntu or https://github.com/meshtastic/python/releases/download/2.2.17/meshtastic_windows.
  2. Execute the downloaded file with the --info parameter (via USB or via --host ipAddr it is the same), the result should be fine
  3. Execute the downloaded file with the --nodes parameter (via USB or via --host ipAddr it is the same) the result will be
    Aborting due to: No module named 'timeago.locales.en'

Build it

  1. As per the build-and-publish-windows workflow, run in the repository:
    1.1 pip uninstall meshtastic #at least i guess so, I have no clue
    1.2 pip install pyinstaller
    1.3 pip install -r requirements.txt
    1.4 pip install .
    1.5 pyinstaller -F -n meshtastic --collect-all meshtastic meshtastic/__main__.py
  2. Now run .\dist\meshtastic.exe --nodes (windows) or .\dist\meshtastic --nodes (ubuntu)
  3. The result should be Aborting due to: No module named 'timeago.locales.en'

If step 1.5 is slightly changed to pyinstaller -F -n meshtastic --collect-all meshtastic --add-data "%USERPROFILE%\AppData\Local\Programs\Python\Python310\Lib\site-packages\timeago\locales\en.py;timeago/locales" meshtastic/__main__.py (on windows at least) the built version works fine.

Notes

I have no idea of what I'm doing
Also might be related to hustcc/timeago#40 (comment) "Locales not imported with PyInstaller".

@mattriney
Copy link

mattriney commented Jan 29, 2024

This does seem to be related to the issue #40 listed above for "timeago."

I just ran into the same issue with 2.2.19 version of the standalone cli:

I did not build it, I only downloaded it from the releases.

Exact same error message:

Aborting due to: No module named 'timeago.locales.en'

@dgarley
Copy link

dgarley commented Mar 10, 2024

Same here with downloaded Win standalone 2.2.22, reproduceable as per OP Scarg steps in "Downloaded version" above.
Running on:
OS Name Microsoft Windows 10 Pro
Version 10.0.19045 Build 19045

NOTE: meshtastic_windows.exe --port com12 --info returns all expexted nodes along with the rest of the expected info.

@garthvh
Copy link
Member

garthvh commented Mar 16, 2024

The standalone windows version has been removed from distribution

@garthvh garthvh closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2024
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

4 participants