sudo weectl station reconfigure --driver=user.MQTTSubscribe
Traceback (most recent call last):
File "/usr/share/weewx/weectl.py", line 75, in <module>
main()
File "/usr/share/weewx/weectl.py", line 67, in main
namespace.func(namespace)
File "/usr/share/weewx/weectllib/station_cmd.py", line 222, in reconfigure_station
weecfg.station_config.station_reconfigure(config_path=namespace.config,
File "/usr/share/weewx/weecfg/station_config.py", line 102, in station_reconfigure
config_config(config_path, config_dict, dry_run=dry_run, *args, **kwargs)
File "/usr/share/weewx/weecfg/station_config.py", line 134, in config_config
config_driver(config_dict, driver=driver, no_prompt=no_prompt)
File "/usr/share/weewx/weecfg/station_config.py", line 350, in config_driver
driver_editor, driver_name, driver_version = weecfg.load_driver_editor(final_driver)
File "/usr/share/weewx/weecfg/__init__.py", line 423, in load_driver_editor
driver_module = importlib.import_module(driver_module_name)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'user.MQTTSubscribe'
user@weewx:~$ ls /etc/weewx/bin/user/
installer MQTTSubscribe.py
user@weewx:~$
['/usr/share/weewx', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages', '/etc/weewx/bin']
If I insert print(sys.path) into /usr/share/weewx/weecfg/__init__.py I get:['/usr/share/weewx', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages', '/etc/weewx/bin']
On Saturday, November 25, 2023 at 8:30:15 AM UTC-8 Karen K wrote:If I insert print(sys.path) into /usr/share/weewx/weecfg/__init__.py I get:['/usr/share/weewx', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages', '/etc/weewx/bin']
The last item in the path tells me it's looking for /etc/weewx/bin/user/MQTTSubscribe.py
I seem to recall there was a bug at one point in time for the betas related to where weewx looked for bin/user things and the fix was to copy the file into the expected location. Find where your installation put MQTTSubscribe.py and copy it to /etc/weewx/bin/user and see if that works for you.
user@weewx:~$ ls /etc/weewx/bin/user/
installer MQTTSubscribe.py
user@weewx:~$
--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/4c3d068d-ec47-4935-a7fb-26879811f699n%40googlegroups.com.
This issue is already known (always read the Upgrade Guide!). See https://weewx.com/docs/5.0/upgrade/#new-location-for-user-directory
--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/35032165-08d5-4415-8e9d-d2996ce8ca84n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/CAPq0zEAtRxWk2JG7OYC_ontEnv-fFLLdXGUr2KDzf_nyv24XaQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/6062f16b-2fbb-452d-91e4-42037cc3ebc0n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/CAPq0zEAVnxh7Un%3DSzbK9s0DkJpbhXWRsinEW1gXG75vm%3D3JzKA%40mail.gmail.com.
On Nov 26, 2023, at 2:48 PM, Joel Bion <jpb...@gmail.com> wrote:
Hi -