Problem with WeeWX5 "driver" directory

282 views
Skip to first unread message

Remy Lavabre

unread,
Feb 25, 2024, 1:55:27 PMFeb 25
to weewx-user
Hello,

weewx is installed in virtual PIP mode -> ~/weewx-data/... and ~/weewx-venv/...
I manually added the xxx.py driver for my weather station in the ~/weewx-data/bin/user directory.
It is declared in weewx.conf as "driver = usr.xxx", as was done in version 4.x

When launching weewxd, I get the message:
   File "/home/pi/weewx-venv/lib/python3.8/site-packages/weewx/engine.py", line 104, in setupStation
     __import__(driver)
ModuleNotFoundError: No module named 'usr'

I tried "driver = xxx.py" without success

if I put my driver in ~/weewx-venv/lib/python3.8/site-packages/weewx/drivers/xxx.py and I put driver = xxx.py in weewx.conf there is no longer the error.

Moral: Would it be possible to tell me the exact location where to put my driver in the user directory and how to declare it in weewx.conf ?

Thank you...

Remy Lavabre

unread,
Feb 25, 2024, 1:58:55 PMFeb 25
to weewx-user
Sorry, small error on my part, it's not "usr" that should be read but "user"

vince

unread,
Feb 25, 2024, 2:34:28 PMFeb 25
to weewx-user
You should install your driver with "weectl extension install" if it is packaged correctly to support that.  See https://github.com/weewx/weewx/wiki/Weewx-Driver-Development-Tips for how and use any of the available drivers as examples if you are packaging a driver you wrote.

But to answer, you add user things under ~/weewx-data so it would be ~/weewx-data/bin/user/xxx.py if you copy it into place manually.

Tom Keffer

unread,
Feb 25, 2024, 4:45:37 PMFeb 25
to weewx...@googlegroups.com
From your description, you're installing it in the correct spot, however you're not giving us much information. Instead of just showing the single error line, it would be helpful to see the log from startup. The reason is that it will log the location of the user directory.

Set debug=1, then restart weewxd. Post the log from startup through the error.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a6fe6217-0ad7-45b0-8dae-74c94db83fbdn%40googlegroups.com.

Remy LAVABRE

unread,
Feb 28, 2024, 2:54:49 AMFeb 28
to weewx...@googlegroups.com
Hello Tom,
First problem : when trying to install a driver in virtual environnement :

(weewx-venv) remy@remy-virtual-machine:~/weewx-data$ weectl extension install AWEKAS.zip
Using configuration file /home/remy/weewx-data/weewx.conf
Install extension 'AWEKAS.zip' (y/n)? y
Extracting from zip archive AWEKAS.zip
Traceback (most recent call last):
  File "/home/remy/weewx-venv/bin/weectl", line 8, in <module>
    sys.exit(main())
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectl.py", line 66, in main
    namespace.func(namespace)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/__init__.py", line 121, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/extension_cmd.py", line 116, in install_extension
    ext.install_extension(namespace.source, no_confirm=namespace.yes)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 138, in install_extension
    extension_name = self._install_from_file(extension_path, filetype)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 168, in _install_from_file
    extension_name = self.install_from_dir(extension_dir)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 185, in install_from_dir
    self._install_files(installer['files'], extension_dir)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 269, in _install_files
    shutil.copy(source_path, destination_path)
  File "/usr/lib/python3.8/shutil.py", line 418, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.8/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmprpxo6tw5/AWEKAS/bin/user/awekaswx.py'

and the install.py :

# installer for Awekas Bresser awekaswx driver
# Copyright 2024 Remy LAVABRE

from setup import ExtensionInstaller

def loader():
    return awekaswxInstaller()

class awekaswxInstaller(ExtensionInstaller):
    def __init__(self):
        super(awekaswxInstaller, self).__init__(
            version="1.3",
            name='awekaswx',
            description='Get Bresser 7in1 data on Awekas',
            author="Remy LAVABRE",
            author_email="remy.l...@gmail.com",
            files=[('bin/user', ['bin/user/awekaswx.py'])],
            config={
                'awekaswx': {
                    'driver' : 'bin.user.awekaswx',
                    'poll_interval': '60',
                    'awekasapikey' :'My_API_Awekas_Key','
                    'openweatherapikey': 'My_API_OpenWeather_Key',
                    'send_syslog': 'True',
                    'model': 'Bresser 7in1'
                }
            }
        )

Rémy LAVABRE



gjr80

unread,
Feb 28, 2024, 3:32:00 AMFeb 28
to weewx-user
What does unzip -l AWEKAS.zip show? Does bin/user/awekaswx.py actually exist in the zip file?

Gary

Tom Keffer

unread,
Feb 28, 2024, 7:52:49 PMFeb 28
to weewx...@googlegroups.com
I haven't tried it, but I'm thinking the problem is that the awekas extension uses

from setup import ExtensionInstaller

which has been deprecated for a long time and will no longer work with V5. It should be

from weecfg.extension import ExtensionInstaller

Try modifying the extension and see if that helps.

vince

unread,
Feb 28, 2024, 8:26:15 PMFeb 28
to weewx-user
I found an old extension of Gary’s the other day that needed setuptools to be able to install it…it has the same old syntax…

gjr80

unread,
Feb 28, 2024, 8:54:43 PMFeb 28
to weewx-user
Not quite sure this is the problem, as far as I know the following gives backward compatibility with setup.ExtensionInstaller:

# Very old extensions did:
#   from setup import ExtensionInstaller
# Redirect references to 'setup' to me instead.
sys.modules['setup'] = sys.modules[__name__]


Plus I am still using the old style in the Ecowitt driver installer which works just fine under v5 and python 3.6+.

Gary

gjr80

unread,
Feb 28, 2024, 8:56:14 PMFeb 28
to weewx-user
Not quite sure of the relevance of setuptools; if that was the problem here it would be VERY evident.

Gary

vince

unread,
Feb 28, 2024, 10:13:45 PMFeb 28
to weewx-user
Dunno Gary but I had to install that for StackedWindRose to get v5 pip to install it successfully here.  Details on the issue I opened on your github repo.

gjr80

unread,
Feb 29, 2024, 12:16:23 AMFeb 29
to weewx-user
I thought we were trying to solve the OPs problem? The OPs problem has nothing to do with setuptools (or perhaps more correctly the python distutils package); setuptools/distutils is not used in the OPs installer and there is no error re distutils in the provided console output. If the absence of setuptools/distutils was the issue the error trace would clearly identify this.

Sure, I have used distutils in my installers and when run on a system where the in-use python version no longer includes distutils (python 3.12 and later) the installer will fail - as you found with StackedWindRose.

Gary

Remy LAVABRE

unread,
Feb 29, 2024, 2:48:14 AMFeb 29
to weewx...@googlegroups.com
with :
from weecfg.extension import ExtensionInstaller


def loader():
    return awekaswxInstaller()

class awekaswxInstaller(ExtensionInstaller):
    def __init__(self):
        super(awekaswxInstaller, self).__init__(
            version="1.3",
            name='awekaswx',
            description='Get Bresser 7in1 data on Awekas',
            author="Remy LAVABRE",
            author_email="remy.l...@gmail.com",
            files=[('bin/user', ['bin/user/awekaswx.py'])]
            )

We have :

(weewx-venv) remy@remy-virtual-machine:~/weewx-data$ weectl extension install awekas.zip
Using configuration file /home/remy/weewx-data/weewx.conf
Install extension 'awekas.zip' (y/n)? y

Traceback (most recent call last):
  File "/home/remy/weewx-venv/bin/weectl", line 8, in <module>
    sys.exit(main())
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectl.py", line 66, in main
    namespace.func(namespace)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/__init__.py", line 121, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/extension_cmd.py", line 116, in install_extension
    ext.install_extension(namespace.source, no_confirm=namespace.yes)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 143, in install_extension
    raise InstallError(f"Unrecognized type for {extension_path}")
weecfg.extension.InstallError: Unrecognized type for awekas.zip

Rémy LAVABRE



Remy LAVABRE

unread,
Feb 29, 2024, 2:50:33 AMFeb 29
to weewx...@googlegroups.com
with :  unzip -l AWEKAS.zip 
we have :
(weewx-venv) remy@remy-virtual-machine:~/weewx-data$ unzip -l AWEKAS.zip
Archive:  AWEKAS.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2024-02-29 08:42   AWEKAS/
      565  2024-02-29 08:42   AWEKAS/install.py
    35149  2024-02-26 10:33   AWEKAS/LICENSE.txt
    56528  2024-02-26 10:33   AWEKAS/awekaswx.py
---------                     -------
    92242                     4 files


Rémy LAVABRE



Remy Lavabre

unread,
Feb 29, 2024, 3:01:00 AMFeb 29
to weewx-user
Hello Tom,

A basic skeleton for your file might look like the one below.

from setup import ExtensionInstaller
...

gjr80

unread,
Feb 29, 2024, 3:35:50 AMFeb 29
to weewx-user
On Thursday 29 February 2024 at 17:50:33 UTC+10 remy.l...@gmail.com wrote:
with :  unzip -l AWEKAS.zip 
we have :
(weewx-venv) remy@remy-virtual-machine:~/weewx-data$ unzip -l AWEKAS.zip
Archive:  AWEKAS.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2024-02-29 08:42   AWEKAS/
      565  2024-02-29 08:42   AWEKAS/install.py
    35149  2024-02-26 10:33   AWEKAS/LICENSE.txt
    56528  2024-02-26 10:33   AWEKAS/awekaswx.py
---------                     -------
    92242                     4 files

And there is your problem, the structure of your extension package/archive does not agree with the instructions you have given to the installer. The line:

files=[('bin/user', ['bin/user/awekaswx.py'])],

in your installer is telling the extension installer to copy the file awekaswx.py from the bin/user directory in your extension package/archive to the WeeWX bin/user directory. The problem is bin/user/awekaswx.py does not exist in your archive, you have awekaswx.py in the main directory (AWEKAS) of your archive.

Take for example the Ecowitt gateway driver extension package, its structure is:

gary@cockatoo1:~ $ unzip -l ./gw1000.zip
Archive:  ./gw1000.zip

  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2024-02-21 19:39   gw1000/bin/
        0  2024-02-21 19:39   gw1000/bin/user/
     6148  2024-02-11 20:14   gw1000/bin/user/.DS_Store
   390698  2024-02-21 19:39   gw1000/bin/user/gw1000.py
     8355  2024-02-21 19:39   gw1000/changelog
    11114  2024-02-21 19:39   gw1000/install.py
    11346  2024-02-21 19:39   gw1000/readme.txt
---------                     -------


The extension installer has the same line:

files=[('bin/user', ['bin/user/gw1000.py'])],
 
(well the same but of course a different file name). Note bin/user/gw1000.py exists in the extension package/extension. 

 To fix you have two choices, change the files = line in your extension installer or change the structure of your extension package/archive. I favour the latter, it keeps the structure of the extension package more akin to the WeeWX file structure and avoids the 'put everything in one directory' approach. Your choice.

Gary


Remy Lavabre

unread,
Feb 29, 2024, 4:00:48 AMFeb 29
to weewx-user
Yesss ! Thank's Gary!!! We progress... :-)))

BUT... :-(((
Now with from weecfg.extension import ExtensionInstaller or from setup import ExtensionInstaller the error in install.py, the error is :

 (weewx-venv) remy@remy-virtual-machine:~/weewx-data$ weectl extension install awekas.zip
Using configuration file /home/remy/weewx-data/weewx.conf
Install extension 'awekas.zip' (y/n)? y

Traceback (most recent call last):
  File "/home/remy/weewx-venv/bin/weectl", line 8, in <module>
    sys.exit(main())
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectl.py", line 66, in main
    namespace.func(namespace)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/__init__.py", line 121, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/extension_cmd.py", line 116, in install_extension
    ext.install_extension(namespace.source, no_confirm=namespace.yes)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 143, in install_extension
    raise InstallError(f"Unrecognized type for {extension_path}")
weecfg.extension.InstallError: Unrecognized type for awekas.zip

gjr80

unread,
Feb 29, 2024, 5:34:11 AMFeb 29
to weewx-user
Where is awekas.zip? is it in ~/weewx-data ? Previously you named your extension package AWEKAS.zip not awekas.zip, did you change names or are you still using AWEKAS.zip? If so you need weectl extension install AWEKAS.zip not weectl extension install awekas.zip.

Gary

Tom Keffer

unread,
Feb 29, 2024, 10:40:17 AMFeb 29
to weewx...@googlegroups.com
On Thu, Feb 29, 2024 at 12:01 AM Remy Lavabre <remy.l...@gmail.com> wrote:
Hello Tom,

A basic skeleton for your file might look like the one below.

from setup import ExtensionInstaller

Wow. That's the first time I've noticed that page! Fixed.

In any case, it looks like that was not the problem.

Remy Lavabre

unread,
Feb 29, 2024, 10:53:05 AMFeb 29
to weewx-user
Ok thanks Tom, thanks Gary.
1/ Sorry for all these inconveniences, especially since the name in capital letters was a big stupidity on my part... But by getting so angry, we end up no longer seeing the obvious...

2/ These few stupidities having been resolved, there is a new problem arriving... It will never end! :-(
Obviously the installation is trying to be done in /etc/weewx/bin/user and not in the virtual environment...Or have I missed something again???

FileNotFoundError: [Errno 2] No such file or directory: '/etc/weewx/bin/user/awekaswx.py'
(weewx-venv) remy@remy-virtual-machine:~/weewx-data$



Thank you once again! :-(

Tom Keffer

unread,
Feb 29, 2024, 10:59:12 AMFeb 29
to weewx...@googlegroups.com
It should be trying to install in the WEEWX_ROOT directory, which is generally the directory that weewx.conf is in. To diagnose, we need to see more of the log. It will tell you what WEEWX_ROOT is. 

Also, it would be useful to see the full transcript when you ran weectl extension install, not just the error.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Remy Lavabre

unread,
Feb 29, 2024, 11:05:18 AMFeb 29
to weewx-user
Feb 29 17:03:12 remy-virtual-machine weectl[3059]: INFO weectllib: Initializing weectl version 5.0.2
Feb 29 17:03:12 remy-virtual-machine weectl[3059]: INFO weectllib: Command line: /home/remy/weewx-venv/bin/weectl extension install AWEKAS.zip
Feb 29 17:03:12 remy-virtual-machine weectl[3059]: ERROR weeutil.startup: Cannot load user extensions: No module named 'user'

Tom Keffer

unread,
Feb 29, 2024, 11:45:55 AMFeb 29
to weewx...@googlegroups.com
How about the transcript? What did you see when you ran weectl?

Remy LAVABRE

unread,
Feb 29, 2024, 1:13:05 PMFeb 29
to weewx...@googlegroups.com
Sorry Tom, I don’t understand what you want exactly...

Tom Keffer

unread,
Feb 29, 2024, 1:58:08 PMFeb 29
to weewx...@googlegroups.com
When you run "weectl extension install", what shows up on the terminal? It should tell you which configuration file it is using. That will tell us what it expects WEEWX_ROOT to be. 

Remy LAVABRE

unread,
Feb 29, 2024, 4:19:57 PMFeb 29
to weewx...@googlegroups.com
Sorry Tom but I’ve already send you the return of the terminal :

(weewx-venv) remy@remy-virtual-machine:~/weewx-data$ extension weectl installer AWEKAS.zip
Utilisation du fichier de configuration /home/remy/weewx-data/weewx.conf
Installer l'extension « AWEKAS.zip » (o/n) ? oui
Extraction de l'archive zip AWEKAS.zip
Traceback (dernier appel le plus récent) :
Fichier "/home/remy/weewx-venv/bin/weectl", ligne 8, dans <module>
sys.exit(main())
Fichier "/home/remy/weewx-venv/lib/python3.8/site-packages/weectl.py", ligne 66, dans main
espace de noms.func (espace de noms)
Fichier "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/__init__.py", ligne 121, dans dispatch
espace de noms.action_func(config_dict, espace de noms)
Fichier "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/extension_cmd.py", ligne 116, dans install_extension
ext.install_extension (namespace.source, no_confirm=namespace.yes)
Fichier "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", ligne 138, dans install_extension
extension_name = self._install_from_file (extension_path, type de fichier)
Fichier "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", ligne 168, dans _install_from_file
extension_name = self.install_from_dir(extension_dir)
Fichier "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", ligne 185, dans install_from_dir
self._install_files(installer['files'], extension_dir)
Fichier "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", ligne 269, dans _install_files
close.copy (chemin_source, chemin_destination)
Fichier "/usr/lib/python3.8/shutil.py", ligne 418, en copie
copyfile(src, dst, follow_symlinks=follow_symlinks)
Fichier "/usr/lib/python3.8/shutil.py", ligne 264, dans le copyfile
avec open(src, 'rb') comme fsrc, open(dst, 'wb') comme fdst :
FileNotFoundError : [Errno 2] Aucun fichier ou répertoire de ce type : '/etc/weewx/bin/user/awekaswx.py'
(weewx-venv) remy@remy-virtual-machine:~/weewx-data$

I have nothing else except syslog already sent...
If there there is another information you want, I do not know which one and how to get it... 😞
???



Remy Lavabre

unread,
Feb 29, 2024, 4:23:04 PMFeb 29
to weewx-user
Sorry.. US version :

Tom Keffer

unread,
Feb 29, 2024, 4:29:43 PMFeb 29
to weewx...@googlegroups.com
You sent it for the "Unrecognized type" error, not the "No such file" error.

Could you send me the entire file AWEKAS.zip and I will try it on my end?

-tk

Remy LAVABRE

unread,
Feb 29, 2024, 4:43:17 PMFeb 29
to weewx...@googlegroups.com
I do not think that the problem come from awekaswx.py.
The install try to put it in etc/weewx/bin/user/awekaswx.py which does not exist as I am under virtuel python environnement !
The problem is independant of what is in awekaswx.py... no ?
You want it anyway ?



Tom Keffer

unread,
Feb 29, 2024, 5:16:46 PMFeb 29
to weewx...@googlegroups.com
Yes, I do want it. I am unable to reproduce the problem. It's possible the problem is with how the extension has been packaged. 

Tom Keffer

unread,
Mar 1, 2024, 8:10:15 AMMar 1
to weewx...@googlegroups.com
(Remy sent me a copy of awekas.zip)

It worked for me. Could you try it one more time, this time asking for a more verbose output? It will give us clues where it is trying to copy files to and from.

weectl extension install awekas.zip --verbosity=3


Remy Lavabre

unread,
Mar 1, 2024, 8:21:47 AMMar 1
to weewx-user
(weewx-venv) remy@remy-virtual-machine:~/weewx-data$ weectl extension install AWEKAS.zip --verbosity=3

Using configuration file /home/remy/weewx-data/weewx.conf
Install extension 'AWEKAS.zip' (y/n)? y
Extracting from zip archive AWEKAS.zip
  Request to install extension found in directory /tmp/tmpmlahffu4/AWEKAS/
  Found extension with name 'awekaswx'
  Copying new files...
    Copying from '/tmp/tmpmlahffu4/AWEKAS/bin/user/awekaswx.py' to '/etc/weewx/bin/user/awekaswx.py'

Traceback (most recent call last):
  File "/home/remy/weewx-venv/bin/weectl", line 8, in <module>
    sys.exit(main())
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectl.py", line 66, in main
    namespace.func(namespace)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/__init__.py", line 121, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/extension_cmd.py", line 116, in install_extension
    ext.install_extension(namespace.source, no_confirm=namespace.yes)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 138, in install_extension
    extension_name = self._install_from_file(extension_path, filetype)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 168, in _install_from_file
    extension_name = self.install_from_dir(extension_dir)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 185, in install_from_dir
    self._install_files(installer['files'], extension_dir)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 269, in _install_files
    shutil.copy(source_path, destination_path)
  File "/usr/lib/python3.8/shutil.py", line 418, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.8/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/weewx/bin/user/awekaswx.py'


Mar  1 14:20:09 remy-virtual-machine weectl[3382]: INFO weectllib: Initializing weectl version 5.0.2
Mar  1 14:20:09 remy-virtual-machine weectl[3382]: INFO weectllib: Command line: /home/remy/weewx-venv/bin/weectl extension install AWEKAS.zip --verbosity=3
Mar  1 14:20:09 remy-virtual-machine weectl[3382]: ERROR weeutil.startup: Cannot load user extensions: No module named 'user'

Remy Lavabre

unread,
Mar 1, 2024, 8:26:37 AMMar 1
to weewx-user
Hello Tom,

I have also try with the Bresser6in1 driver of Bob Atchley  -> https://github.com/BobAtchley/weewx-ws6in1

Same problem :

Using configuration file /home/remy/weewx-data/weewx.conf
Install extension '6in1.zip' (y/n)? y
Extracting from zip archive 6in1.zip
  Request to install extension found in directory /tmp/tmp1rbnn6un/weewx-ws6in1-master/
  Found extension with name 'WS6in1'
  Copying new files...
    Copying from '/tmp/tmp1rbnn6un/weewx-ws6in1-master/bin/user/ws6in1.py' to '/etc/weewx/bin/user/ws6in1.py'

Traceback (most recent call last):
  File "/home/remy/weewx-venv/bin/weectl", line 8, in <module>
    sys.exit(main())
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectl.py", line 66, in main
    namespace.func(namespace)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/__init__.py", line 121, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weectllib/extension_cmd.py", line 116, in install_extension
    ext.install_extension(namespace.source, no_confirm=namespace.yes)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 138, in install_extension
    extension_name = self._install_from_file(extension_path, filetype)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 168, in _install_from_file
    extension_name = self.install_from_dir(extension_dir)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 185, in install_from_dir
    self._install_files(installer['files'], extension_dir)
  File "/home/remy/weewx-venv/lib/python3.8/site-packages/weecfg/extension.py", line 269, in _install_files
    shutil.copy(source_path, destination_path)
  File "/usr/lib/python3.8/shutil.py", line 418, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.8/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/weewx/bin/user/ws6in1.py'

matthew wall

unread,
Mar 1, 2024, 9:10:52 AMMar 1
to weewx-user
remy,

the extension installer is using weewx.conf in ~/weewx-data, but it is trying to put the extension into /etc/weewx/bin/user

what is the content of /etc/weewx on your system?

tom, why would the extension plumbing try to install to /etc/weewx/bin/user when the weewx.conf is in ~/weewx-data?

m

matthew wall

unread,
Mar 1, 2024, 9:13:04 AMMar 1
to weewx-user
remy,

does /etc/weewx exist?

does /etc/weewx/bin/user exist?

in the file ~/weewx-data/weewx.conf, what is WEEWX_ROOT?

how did the file ~/weewx-data/weewx.conf get to its current state?

m

Remy Lavabre

unread,
Mar 1, 2024, 9:34:55 AMMar 1
to weewx-user
Hi Matthew,
Thank you for your help !

--->>> /etc/weewx does not exist
remy@remy-virtual-machine:/etc$ cd weewx
bash: cd: weewx: Aucun fichier ou dossier de ce type
 

---->>> # Root directory of the weewx data file hierarchy for this station
WEEWX_ROOT = /


---->>>> The weewx.conf file was recovered from version 4.10.2 which works perfectly and replaced the weewx.conf file from version 5 after installation in a virtual environment and by modifying:
SKIN_ROOT = skins
HTML_ROOT = public_html
version = 5.0.2


Le vendredi 1 mars 2024 à 15:13:04 UTC+1, matthew wall a écrit :
remy,

does /etc/weewx exist?
--->>>>> 

Remy Lavabre

unread,
Mar 1, 2024, 9:38:55 AMMar 1
to weewx-user
SOLVED.... -->> Thank-you MATTHEW ! (and Tom of course...)
With WEEWX_ROOT = ~/weewx-data/

Result -> 
Saving installer file to /home/remy/weewx-data/~/weewx-data/bin/user/installer/awekaswx
Saved copy of configuration as /home/remy/weewx-data/weewx.conf.20240301153706
Finished installing extension awekaswx from awekaswx.zip

:ooo))))))))

Tom Keffer

unread,
Mar 1, 2024, 9:54:48 AMMar 1
to weewx...@googlegroups.com
Thank you, Matthew. I had totally forgotten that older weewx.conf files set WEEWX_ROOT=/

Remy: as Matthew asked, do you know how your weewx.conf came to be in its state? Did you copy it from a previous debian install?

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Remy Lavabre

unread,
Mar 1, 2024, 10:21:06 AMMar 1
to weewx-user
Yes Tom, as I told Matthew in my previous post, I installed V5 in a virtual environment then copied the weewx.conf file from my version 4.10.2 which works perfectly.
I took the precaution of changing a few variables like SKIN_ROOT = skins, HTML_ROOT = public_html, version = 5.0.2
but not WEEWX_ROOT = ~/weewx-data/… :-(((((

From the tests I have carried out, it even seems possible to do without defining this WEEWX_ROOT variable in weewx.conf of V5... Can you confirm Tom?

Many thanks for your software and your much appreciated help! ;-)

Tom Keffer

unread,
Mar 1, 2024, 11:09:28 AMMar 1
to weewx...@googlegroups.com
This is true: you do not need a value for WEEWX_ROOT. The default value is the directory where weewx.conf is found. In fact, weewx.conf installed by V5 do not contain a value.

Reply all
Reply to author
Forward
0 new messages