wee_extension - ModuleNotFoundError: No module named 'configobj

735 views
Skip to first unread message

tarob...@gmail.com

unread,
Nov 5, 2022, 8:33:06 PM11/5/22
to weewx-user
Getting an error when trying to use wee_extension. I've just upgraded to 4.9.1 but I'm not sure if this is from upgrade or related to a python upgrade.

weewx is running fine, collecting data and I see no errors in the logs. When I run wee_extension I get the following:

Traceback (most recent call last):
  File "/usr/share/weewx/wee_extension", line 13, in <module>
    import weecfg.extension
  File "/usr/share/weewx/weecfg/__init__.py", line 23, in <module>
    import configobj
ModuleNotFoundError: No module named 'configobj

Running sudo systemctl status weewx
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx; generated)
   Active: active (running) since Fri 2022-11-04 14:34:54 EDT; 1 day 5h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 15064 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)
    Tasks: 2 (limit: 3720)
   CGroup: /system.slice/weewx.service
           └─15080 python3 /usr/share/weewx/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf

Any ideas? I tried running sudo install python3-configobj but getting latest is already installed. Not sure what else to do. The extension I have are all working as expected.

p q

unread,
Nov 5, 2022, 10:01:24 PM11/5/22
to weewx...@googlegroups.com
I had this problem at some point while upgrading but I don't remember the solution. It apparently is a common problem so maybe Google will have something. 

--
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/964d7907-aca8-4a3a-9dc0-f3fb21b9263fn%40googlegroups.com.

vince

unread,
Nov 6, 2022, 12:24:32 AM11/6/22
to weewx-user
Guessing you installed weewx using python2 originally.

Lets see what you're actually running.

Try "ps axu | grep wee" and it should show us which python version you're running.

An example will look something like the following for a python3 packaged install on debian 11:

root         394  0.2  2.2 103192 22496 ?        Sl   21:20   0:00 python3 /usr/share/weewx/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf

Also for a packaged install, run "cat /etc/default/weewx" which should agree.

On the same deb11 system, mine looks like:

WEEWX_PYTHON=python3
WEEWX_BINDIR=/usr/share/weewx
WEEWX_BIN=/usr/bin/weewxd
WEEWX_CFG=/etc/weewx/weewx.conf


tarob...@gmail.com

unread,
Nov 6, 2022, 6:34:13 AM11/6/22
to weewx-user
Weewx was originally installed using python3 (running on rpi 4 with buster)

Running  "ps axu | grep wee"

root     15080 15.8  3.3 122252 64084 ?        Sl   Nov04 388:36 python3 /usr/share/weewx/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf
pi       31454  0.0  0.0   7244   580 pts/0    S+   06:30   0:00 grep --color=auto wee

And running "cat /etc/default/weewx"

WEEWX_PYTHON=python3
WEEWX_PYTHON_ARGS=
WEEWX_BINDIR=/usr/share/weewx
WEEWX_BIN=/usr/bin/weewxd
WEEWX_CFG=/etc/weewx/weewx.conf

George Michalopoulos

unread,
Nov 14, 2022, 3:22:04 PM11/14/22
to weewx-user
i have the same exact problem...

# /usr/share/weewx/wee_extension --install=/usr/local/bin/WeeWX-MQTTSubscribe/v2.2.2.tar.gz
Traceback (most recent call last):
  File "/usr/share/weewx/wee_extension", line 13, in <module>
    import weecfg.extension
  File "/usr/share/weewx/weecfg/__init__.py", line 23, in <module>
    import configobj
ImportError: No module named configobj

i run python3 and my /etc/default/weewx is
 
WEEWX_PYTHON=python3
WEEWX_PYTHON_ARGS=
WEEWX_BINDIR=/usr/share/weewx
WEEWX_BIN=/usr/bin/weewxd
WEEWX_CFG=/etc/weewx/weewx.conf

Troy Roberts

unread,
Nov 14, 2022, 3:33:42 PM11/14/22
to weewx...@googlegroups.com
What fixed it for me:

sudo pip3 install configobj

-Troy

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/ZK7Y7uDx4w0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/3eff76b2-76bf-49d7-8fd1-a0ac5df8decbn%40googlegroups.com.

George Michalopoulos

unread,
Nov 15, 2022, 7:59:54 AM11/15/22
to weewx-user
this was not working...

# /usr/share/weewx/wee_extension --install=/usr/local/bin/WeeWX-MQTTSubscribe/v2.2.2.tar.gz
Traceback (most recent call last):
  File "/usr/share/weewx/wee_extension", line 13, in <module>
    import weecfg.extension
  File "/usr/share/weewx/weecfg/__init__.py", line 23, in <module>
    import configobj
ImportError: No module named configobj

this was working...

# wee_extension --install=/usr/local/bin/WeeWX-MQTTSubscribe/v2.2.2.tar.gz
Request to install '/usr/local/bin/WeeWX-MQTTSubscribe/v2.2.2.tar.gz'
Extracting from tar archive /usr/local/bin/WeeWX-MQTTSubscribe/v2.2.2.tar.gz
Saving installer file to /usr/share/weewx/user/installer/MQTTSubscribe
Saved configuration dictionary. Backup copy at /etc/weewx/weewx.conf.20221115145432
Finished installing extension '/usr/local/bin/WeeWX-MQTTSubscribe/v2.2.2.tar.gz'

how many wee_extention are in my system (debian 10) ?

# find / -name wee_extension
/usr/share/weewx/wee_extension
/usr/bin/wee_extension
/etc/weewx/scripts/wee_extension

are there any symlinks, etc ?

# ls -al /usr/share/weewx/wee_extension
-rwxr-xr-x 1 root root 3292 Oct 25 14:29 /usr/share/weewx/wee_extension
# ls -al /usr/bin/wee_extension
-rwxr-xr-x 1 root root 316 Oct 25 14:29 /usr/bin/wee_extension
# ls -al /etc/weewx/scripts/wee_extension
-rwxr-xr-x 1 root root 316 Oct 25 14:29 /etc/weewx/scripts/wee_extension

vince

unread,
Nov 15, 2022, 1:08:32 PM11/15/22
to weewx-user
If you did a package installation of weewx, as you did, the executables are in /usr/bin so your "this was working" makes sense.   It's finding wee_extension because your shell's $PATH includes that directory by default.   Don't overthink things.  It works !!
Reply all
Reply to author
Forward
0 new messages