Sorry - can't help more not seeing any logs nor transcripts of what/how you 
installed whatever you added.

This is why I run only weewx venv installations here.  Much simpler and 
predictable for me FWIW.  Just activate the venv and add stuff into it then 
no gymnastics required.

On Friday, July 10, 2026 at 11:14:15 AM UTC-7 Patrick Sifford wrote:

> just ran your bash...   whoami is weewx
>
> I don't normally run it as sudo...     i did that as a test to see if i 
> could figure out what was happenning.  
>
> I am happy that I can run it as me... using weewxd...   however when the 
> system boots it runs the service (I believe as root) and that is an issue  
> I do know that if I commit out the data_service line (in weewx.conf) for 
> the BMP280   all works no matter how I start it.  (but then I am not 
> getting the pressure data).
>
> I have run the three suggestions and have not had any luck.
>
> I am going to try to install  the BMP drivers in /etc/weewx and see if 
> that helps...   although that process was a bit of a issue!!!
>
> THanks
> Ill let you know how that goes
>
>
>
>
> On Friday, July 10, 2026 at 1:55:26 PM UTC-4 Vince Skahan wrote:
>
>> v5 runs as unprivileged user 'weewx' not as root, so sudo should never be 
>> needed other after installation.
>>
>> In order to test you need to run your command as user 'weewx' not as 
>> you...
>>
>> # open a bash shell as user weewx:
>> sudo -u weewx bash
>>
>> # verify this returns 'weewx' as the output
>> whoami
>>
>> # then run the weewxd command and see how it looks:
>> PYTHONPATH=/etc/weewx/bin:/usr/share/weewx:/home/me/some/path/here weewxd 
>> /etc/weewx/weewx.conf
>>
>> And then exit the bash shell you opened above.
>>
>> I don't really have a great solution for how to add python libraries 
>> using 'pip' to a system running a dpkg installation of weewx.  I 'suppose' 
>> you could add the libraries into the same place in PYTHONPATH that weewx 
>> expects already but that's even messier.  Try setting the PYTHONPATH and 
>> see if you can get it working...
>>
>>
>> On Friday, July 10, 2026 at 10:42:06 AM UTC-7 Patrick Sifford wrote:
>>
>>> Vince...   I will give that a try!!   
>>>
>>> I did just do a test..    I ran:
>>> sudo weewxd /etc/weewx/weewx.conf
>>>
>>> and I have the same error...   where running
>>> weewxd   I dont get the error
>>>
>>> What is the normal place for the adafruit_bmp280 to be located?
>>>
>>> Thanks
>>>
>>> On Friday, July 10, 2026 at 1:35:47 PM UTC-4 Vince Skahan wrote:
>>>
>>>> The basic problem is systemd doesn't know that you added more libraries 
>>>> in an unexpected location. 
>>>>
>>>> From some google and weewx-user searches there seem to be a couple 
>>>> things to try....
>>>>
>>>> Edit the ExecStart section in /usr/lib/systemd/system/weewx.service to 
>>>> prepend setting PYTHONPATH
>>>>      
>>>> ExecStart=PYTHONPATH=/etc/weewx/bin:/usr/share/weewx:/home/me/some/path/here
>>>>  
>>>> weewxd /etc/weewx/weewx.conf
>>>>
>>>> Or add a line in the [Service] section there to set PYTHONPATH similarly
>>>>     Environment=/etc/weewx/bin:/usr/share/weewx:/home/me/some/path/here
>>>>
>>>> Obviously use whatever path you installed things into.  You'll likely 
>>>> have to 'sudo systemctl daemon-reload' after editing that file before 
>>>> testing.
>>>>
>>>> Disclaimer - I didn't test the above...
>>>>
>>>> On Friday, July 10, 2026 at 7:16:54 AM UTC-7 Patrick Sifford wrote:
>>>>
>>>>> Hello...    I am new to this group and have been trying to get weewx 
>>>>> up and running on a Raspberry pi 4 with Debian GNU/Linux 
>>>>>
>>>>> I have had great success with my initial setup:
>>>>>       Acurite Atlas sensor
>>>>>      RTL-433/SDR
>>>>>      weewx 5.4.0
>>>>>       Hubitat Interface
>>>>>
>>>>>       This has been running nicely for a few day and I have been able 
>>>>> to add data to the Hubitat Interface.
>>>>>
>>>>>      during this I have had no issues with either weewx or weewxd
>>>>>
>>>>>      I have now decided to add a BMP280 to get pressure sensor data.  
>>>>> I have successfully loaded the libraries (took several attempts)
>>>>>
>>>>>    I have been able to run a test-bmp250.py file and obtain the 
>>>>> appropriate data back from the system.
>>>>>
>>>>>     I then started integrating with weewx.   initially I had issues 
>>>>> with both weewxd and weewx.   I would get an error:
>>>>>
>>>>>         : Traceback (most recent call last):
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File 
>>>>> "/usr/share/weewx/weewxd.py", line 226, in <module>
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:     main()
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:     ~~~~^^
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File 
>>>>> "/usr/share/weewx/weewxd.py", line 121, in main
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:     engine = 
>>>>> weewx.engine.StdEngine(config_dict)
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File 
>>>>> "/usr/share/weewx/weewx/engine.py", line 89, in __init__
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:     
>>>>> self.loadServices(config_dict)
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:     
>>>>> ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File 
>>>>> "/usr/share/weewx/weewx/engine.py", line 157, in loadServices
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:     obj = 
>>>>> weeutil.weeutil.get_object(svc)(self, config_dict)
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:           
>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File 
>>>>> "/usr/share/weewx/weeutil/weeutil.py", line 1405, in get_object
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:     module = 
>>>>> importlib.import_module(module_name)
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File 
>>>>> "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:     return 
>>>>> _bootstrap._gcd_import(name[level:], package, level)
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:           
>>>>>  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File "<frozen 
>>>>> importlib._bootstrap>", line 1387, in _gcd_import
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File "<frozen 
>>>>> importlib._bootstrap>", line 1360, in _find_and_load
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File "<frozen 
>>>>> importlib._bootstrap>", line 1331, in _find_and_load_unlocked
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File "<frozen 
>>>>> importlib._bootstrap>", line 935, in _load_unlocked
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File "<frozen 
>>>>> importlib._bootstrap_external>", line 1026, in exec_module
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File "<frozen 
>>>>> importlib._bootstrap>", line 488, in _call_with_frames_removed
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:   File 
>>>>> "/etc/weewx/bin/user/BMP280_service.py", line 6, in <module>
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]:     import adafruit_bmp280
>>>>> Jul 10 09:11:29 raspberrypi weewxd[2198]: ModuleNotFoundError: No 
>>>>> module named 'adafruit_bmp280'
>>>>> Jul 10 09:11:29 raspberrypi systemd[1]: weewx.service: Main process 
>>>>> exited, code=exited, status=1/FAILURE
>>>>> Jul 10 09:11:29 raspberrypi systemd[1]: weewx.service: Failed with 
>>>>> result 'exit-code'.
>>>>>
>>>>> After playing with several group and ownership issues I was successful 
>>>>> in running weewxd and ingesting pressure, altitude, and temperature data 
>>>>> in 
>>>>> to weewx and into hubitat!!!!!!!
>>>>>
>>>>> However, when trying to run weewx (using the sudo systemctl start 
>>>>> weewx command) I still get the same response.
>>>>>
>>>>> I have put as much as I know in the weewx group.  the BMP library 
>>>>> ("Adafruit_BMP280_Library) got loaded into my home directory. with weewx 
>>>>> as 
>>>>> the group and owner.
>>>>>
>>>>> At a lost...   to be soo close and yet soo far.  Has anyone run into a 
>>>>> situation where weewxd and weewx return different results?
>>>>>
>>>>> thanks
>>>>> Patrick Sifford
>>>>>
>>>>

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/11cae035-fd62-4a2e-bea9-2a9c86f2a0e3n%40googlegroups.com.

Reply via email to