Trouble with GW1000 driver

68 views
Skip to first unread message

super zee

unread,
Sep 26, 2021, 2:29:28 AM9/26/21
to weewx-user
After installing the GW1000 driver, I try to test it using the python command, but get the following error:

pi@raspberrypi:~ $ sudo PYTHONPATH=/usr/share/weewx python -m user.gw1000 --test-driver
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/share/weewx/user/gw1000.py", line 504, in <module>
    import configobj
ImportError: No module named configobj


Can someone tell me why it can find the configobj file?

Thanks, 
Chris 

gjr80

unread,
Sep 26, 2021, 2:50:32 AM9/26/21
to weewx-user
Hi,

What version of python did you install WeeWX under? Chances are it was python3 and changing python to python3 in your command may work. As per the GW1000 driver readme you need to run the GW1000 driver under the same python version as WeeWX was installed otherwise you will likely find python pre-requisite packages such as configobj are missing (well they are there but not for the version of python you are trying to run). Try starting WeeWX and have a look at the log, it will tell you what version of python WeeWX is using. Alternatively have a look at the shebang at the first line of any WeeWX executable, for example /usr/share/weewx/wee_database, it should include the python version. If the python version is 3 then try the above command with python3 instead of python (the version of python started by using the command python varies from system to system, your uses python2). If that does not work let us know as you have a more sinister problem.

Gary

super zee

unread,
Sep 27, 2021, 1:46:55 AM9/27/21
to weewx-user
Thanks Gary.  Since it was a brand new install, python3 was the answer.  Once I got the command right, you could see the driver interrogating the GW1000.

Chris 

Reply all
Reply to author
Forward
0 new messages