Closed Scarg closed 6 months ago
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'
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.
The standalone windows version has been removed from distribution
Description
When using the standalone CLI (tested both Ubuntu and Windows) while things like
--info
do work, runningmeshtastic --nodes
results in the following error: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
--info
parameter (via USB or via--host ipAddr
it is the same), the result should be fine--nodes
parameter (via USB or via--host ipAddr
it is the same) the result will beAborting due to: No module named 'timeago.locales.en'
Build it
pip uninstall meshtastic #at least i guess so, I have no clue
1.2pip install pyinstaller
1.3pip install -r requirements.txt
1.4pip install .
1.5pyinstaller -F -n meshtastic --collect-all meshtastic meshtastic/__main__.py
.\dist\meshtastic.exe --nodes
(windows) or.\dist\meshtastic --nodes
(ubuntu)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 https://github.com/hustcc/timeago/issues/40#issue-1116686280 "Locales not imported with PyInstaller".