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

Trouble to install on weewx 5 #4

Open
jens-b opened this issue Apr 12, 2024 · 6 comments
Open

Trouble to install on weewx 5 #4

jens-b opened this issue Apr 12, 2024 · 6 comments

Comments

@jens-b
Copy link

jens-b commented Apr 12, 2024

can't install it on weewx 5:
Extracting from zip archive weewxMQTT.zip
Traceback (most recent call last):
File "/usr/share/weewx/weectl.py", line 74, in
main()
File "/usr/share/weewx/weectl.py", line 66, in main
namespace.func(namespace)
File "/usr/share/weewx/weectllib/init.py", line 121, in dispatch
namespace.action_func(config_dict, namespace)
File "/usr/share/weewx/weectllib/extension_cmd.py", line 116, in install_extension
ext.install_extension(namespace.source, no_confirm=namespace.yes)
File "/usr/share/weewx/weecfg/extension.py", line 138, in install_extension
extension_name = self._install_from_file(extension_path, filetype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weecfg/extension.py", line 168, in _install_from_file
extension_name = self.install_from_dir(extension_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weecfg/extension.py", line 179, in install_from_dir
installer_path, installer = weecfg.get_extension_installer(extension_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weecfg/init.py", line 714, in get_extension_installer
import('install')
File "/tmp/tmpt73g4vp7/weewxMQTT-master/install.py", line 49
files=[('bin/users/wxMesh'])]

@morrowwm
Copy link
Owner

morrowwm commented Apr 13, 2024

I haven't tried weewx 5. I will spin up a test system...

Update: I've changed one line in wxMesh.py which seemed to be stopping my driver from starting. It's working OK now in my test system. Also updated the repository here.

diff weather/weewx/wxMesh.py_4 weather/weewx/wxMesh.py 
46c46
< DRIVER_VERSION = "0.2"
---
> DRIVER_VERSION = "0.3"
60c60
<     return wxMesh(**config_dict['wxMesh'])
---
>     return wxMesh(**config_dict[DRIVER_NAME])
87c87
<       self.client = mqtt.Client(client_id=self.client_id, protocol=mqtt.MQTTv31)
---
>       self.client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1, client_id=self.client_id, protocol=mqtt.MQTTv31)

I set up the test system for this with the "pip" install method. Also had to add to install paho-mqtt in the venv:

python3 -m pip install  paho-mqtt

@morrowwm
Copy link
Owner

Please close the issue if it works for you.

@jens-b
Copy link
Author

jens-b commented Apr 14, 2024

Hello morrowwm, it doesn't work for me:
Downloaded it with
wget -O weewxMQTT.zip https://github.com/morrowwm/weewxMQTT/archive/refs/heads/master.zip

try to install with:
sudo weectl extension install weewxMQTT.zip
gaves me the same error:
Traceback (most recent call last):
File "/usr/share/weewx/weectl.py", line 74, in
main()
File "/usr/share/weewx/weectl.py", line 66, in main
namespace.func(namespace)
File "/usr/share/weewx/weectllib/init.py", line 121, in dispatch
namespace.action_func(config_dict, namespace)
File "/usr/share/weewx/weectllib/extension_cmd.py", line 116, in install_extension
ext.install_extension(namespace.source, no_confirm=namespace.yes)
File "/usr/share/weewx/weecfg/extension.py", line 138, in install_extension
extension_name = self._install_from_file(extension_path, filetype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weecfg/extension.py", line 168, in _install_from_file
extension_name = self.install_from_dir(extension_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weecfg/extension.py", line 179, in install_from_dir
installer_path, installer = weecfg.get_extension_installer(extension_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weecfg/init.py", line 714, in get_extension_installer
import('install')
File "/tmp/tmp1ctg3n1w/weewxMQTT-master/install.py", line 49
files=[('bin/users/wxMesh'])]

kind regards
jens

@morrowwm
Copy link
Owner

There was an obvious error in the install script. @jens-b, could you try again?

@flippyreaper
Copy link

Hello, I have same problem as jens-b

flippy@weewx-ubuntu ~> sudo weectl extension install weewxMQTT.zip
Using configuration file /etc/weewx/weewx.conf
Install extension 'weewxMQTT.zip' (y/n)? y
Extracting from zip archive weewxMQTT.zip
Traceback (most recent call last):
File "/usr/share/weewx/weectl.py", line 74, in
main()
File "/usr/share/weewx/weectl.py", line 66, in main
namespace.func(namespace)
File "/usr/share/weewx/weectllib/init.py", line 121, in dispatch
namespace.action_func(config_dict, namespace)
File "/usr/share/weewx/weectllib/extension_cmd.py", line 116, in install_extension
ext.install_extension(namespace.source, no_confirm=namespace.yes)
File "/usr/share/weewx/weecfg/extension.py", line 138, in install_extension
extension_name = self._install_from_file(extension_path, filetype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weecfg/extension.py", line 168, in _install_from_file
extension_name = self.install_from_dir(extension_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weecfg/extension.py", line 179, in install_from_dir
installer_path, installer = weecfg.get_extension_installer(extension_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weecfg/init.py", line 714, in get_extension_installer
import('install')
File "/tmp/tmp3jg50xll/weewxMQTT-master/install.py", line 49
files=[('bin/users/wxMesh.py'])]
^
SyntaxError: closing parenthesis ']' does not match opening parenthesis '('

@morrowwm
Copy link
Owner

Hello, I have same problem as jens-b

 line 49 files=[('bin/users/wxMesh.py'])] ^ SyntaxError: closing parenthesis ']' does not match opening parenthesis '('

Argh, sorry. I made a mistake with the fix. Could you please try again? Thank you for testing this.

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

3 participants