No module named configobj

974 views
Skip to first unread message

Janez Kranjski

unread,
May 7, 2020, 1:55:38 AM5/7/20
to weewx-user
I'm using Weewx 4.0 on my Raspberry Pi. 
A computer has installed two Python versions (2.7.13 and 3.5.3). With upgraded Weewx to 4.0, I want to start using Python3. 
But, when I change to WEEWX_PYTHON=python3 in /etc/default/weewx and restart service, I get:
May 07 07:45:10 raspberrypi weewx[5830]:   File "/usr/share/weewx/weewxd", line 21, in <module>
May 07 07:45:10 raspberrypi weewx[5830]:     import weecfg
May 07 07:45:10 raspberrypi weewx[5830]:   File "/usr/share/weewx/weecfg/__init__.py", line 22, in <module>
May 07 07:45:10 raspberrypi weewx[5830]:     import configobj
May 07 07:45:10 raspberrypi weewx[5830]: ImportError: No module named 'configobj'
May 07 07:45:10 raspberrypi weewx[5830]:  failed!



I tried to install configobj with "pip install configobj", but I don't have PIP installed. Should I install PIP and try to install configobj manually?
Or is there any other reason for the error?

Tnx.

Greg from Oz

unread,
May 7, 2020, 2:04:07 AM5/7/20
to weewx-user
If you run:

apt-cache search configobj

you should see python3-configobj

you could install it ;

sudo apt install python3-configobj

See what happens....
Message has been deleted

Tom Keffer

unread,
May 7, 2020, 8:05:40 AM5/7/20
to weewx-user
It looks like at least one of the extensions you are using, crt, has not been ported to Python 3.

On Wed, May 6, 2020 at 11:38 PM Janez Kranjski <kac...@gmail.com> wrote:
Thank you. Now I'm a step further ...

But now I got this (it is a little offtopic, but it is next step :-));

 weewx.service - LSB: weewx weather system
   
Loaded: loaded (/etc/init.d/weewx; generated; vendor preset: enabled)
   
Active: active (exited) since Thu 2020-05-07 08:36:10 CEST; 4s ago
     
Docs: man:systemd-sysv-generator(8)
 
Process: 6332 ExecStop=/etc/init.d/weewx stop (code=exited, status=0/SUCCESS)
 
Process: 6344 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)


May 07 08:36:11 raspberrypi python3[6361]: weewx[6361] CRITICAL __main__:     ****      self.loadServices(config_dict)
May 07 08:36:11 raspberrypi python3[6361]: weewx[6361] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 138, in loadServices
May 07 08:36:11 raspberrypi python3[6361]: weewx[6361] CRITICAL __main__:     ****      obj = weeutil.weeutil.get_object(svc)(self,config_dict)
May 07 08:36:11 raspberrypi python3[6361]: weewx[6361] CRITICAL __main__:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1093, in get_object
May 07 08:36:11 raspberrypi python3[6361]: weewx[6361] CRITICAL __main__:     ****      mod = __import__(module)
May 07 08:36:11 raspberrypi python3[6361]: weewx[6361] CRITICAL __main__:     ****    File "/usr/share/weewx/user/crt.py", line 420
May 07 08:36:11 raspberrypi python3[6361]: weewx[6361] CRITICAL __main__:     ****      except Exception, e: # FIXME: make this more specific
May 07 08:36:11 raspberrypi python3[6361]: weewx[6361] CRITICAL __main__:     ****                      ^
May 07 08:36:11 raspberrypi python3[6361]: weewx[6361] CRITICAL __main__:     ****  SyntaxError: invalid syntax
May 07 08:36:11 raspberrypi python3[6361]: weewx[6361] CRITICAL __main__:     ****  Exiting.



--
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/5764d246-d600-4d63-944e-2a27555c89e0%40googlegroups.com.

Tom Keffer

unread,
May 7, 2020, 8:25:14 AM5/7/20
to weewx-user

Janez Kranjski

unread,
May 7, 2020, 8:42:05 AM5/7/20
to weewx-user
Thank you. It works.  
Reply all
Reply to author
Forward
0 new messages