Workaround

I changed in files weewx_'xxxx'.service the path of weewxd.py as follows:
/root/.local/lib/python3.9/site-packages/weewxd.py
into:
./usr/local/lib/python3.9/dist-packages/weewxd.py

Now weewx starts ok with command
systemctl restart weewx_'xxxx'

Probably I did something wrong with the update of weewx

Op vrijdag 26 mei 2023 om 10:07:19 UTC-3 schreef Lucas Heijst:

> I think I found the cause of the error.
> The location of my weewxd.py is in 
> ./usr/local/lib/python3.9/*dist*-packages/weewxd.py
>
> Where the startup file expects it in
> ./usr/local/lib/python3.9/*site*-packages/weewxd.py
>
> I quess somehow a symbolic link earlier was present which pointed to the 
> right source
>
>
> Op vrijdag 26 mei 2023 om 09:42:09 UTC-3 schreef Lucas Heijst:
>
>> Additional data
>>
>> systemctl was configured as follows for weewx v5.0.0.a20:
>> ====
>>
>> *Create daemon voor rtld*
>>
>> cd ~/weewx-data
>>
>> cp util/systemd/weewx_rtld.service /etc/systemd/system
>>
>> chmod -wx /etc/systemd/system/weewx_rtld.service
>>
>> systemctl daemon-reload
>>
>> systemctl enable weewx_rtld
>>
>>
>> *Start weewx_rtld*
>>
>> systemctl restart weewx_rtld
>> ====
>>
>> After each update of v 5.0.0axx with 
>> python3 -m pip install weewx --upgrade --user
>> weewx could be started, restarted and stopped with commands like
>> systemctl start weewx_rtld, systemctl restart weewx_rtld, systemctl stop 
>> weewx_rtld
>>
>> After an update from version 5.0.0a23/24/25 to 5.0.0b1 I got the error as 
>> described above.
>> Op vrijdag 26 mei 2023 om 09:24:51 UTC-3 schreef Lucas Heijst:
>>
>>> 'xxxx' stands for cmon, wbx1, rtld, and so on. each weewx instance has 
>>> it's own systemctl files and weewx_xxxxx.conf settings
>>>
>>> Op vrijdag 26 mei 2023 om 09:16:44 UTC-3 schreef Lucas Heijst:
>>>
>>>> It's a modified copy of ~weewx-data//bin/util/systemd/weewx.service
>>>>
>>>> =====
>>>> # systemd unit configuration file for WeeWX
>>>> #
>>>> # For information about running WeeWX under systemd,
>>>> # be sure to read https://github.com/weewx/weewx/wiki/systemd
>>>> #
>>>> [Unit]
>>>> Description=pi35 rtld
>>>> Documentation=https://weewx.com/docs
>>>>
>>>> Requires=time-sync.target
>>>> After=time-sync.target
>>>> RequiresMountsFor=/home
>>>>
>>>> [Service]
>>>> ExecStart=/usr/bin/python3 
>>>> /root/.local/lib/python3.9/site-packages/weewxd.py 
>>>> /root/weewx-data/weewx_rtld.conf
>>>> StandardOutput=null
>>>> # To run as a non-root user, uncomment and set username and group here:
>>>> User=root
>>>> Group=root
>>>>
>>>> [Install]
>>>> WantedBy=multi-user.target
>>>>
>>>> =====
>>>>
>>>> Op vrijdag 26 mei 2023 om 08:42:57 UTC-3 schreef Tom Keffer:
>>>>
>>>>> Where did  weewx_xxxx.service come from? What's inside it?
>>>>>
>>>>> On Fri, May 26, 2023 at 4:30 AM Lucas Heijst <ljm.h...@gmail.com> 
>>>>> wrote:
>>>>>
>>>>>> Additional info
>>>>>> When command 'python3 -m pip install weewx --upgrade --user' is 
>>>>>> executed again the console show:
>>>>>>
>>>>>> root@pi35:~/weewx-data# python3 -m pip install weewx --upgrade --user
>>>>>> Looking in indexes: https://pypi.org/simple, 
>>>>>> https://www.piwheels.org/simple
>>>>>> Requirement already satisfied: weewx in 
>>>>>> /usr/local/lib/python3.9/dist-packages (5.0.0b1)
>>>>>> Collecting weewx
>>>>>>   Using cached 
>>>>>> https://www.piwheels.org/simple/weewx/weewx-5.0.0b1-py3-none-any.whl 
>>>>>> (3.2 MB)
>>>>>>   Using cached 
>>>>>> https://www.piwheels.org/simple/weewx/weewx-5.0.0a30-py3-none-any.whl 
>>>>>> (3.2 MB)
>>>>>> Requirement already satisfied: configobj<6.0,>=5.0 in 
>>>>>> /root/.local/lib/python3.9/site-packages (from weewx) (5.0.8)
>>>>>> Requirement already satisfied: pyserial<4.0,>=3.4 in 
>>>>>> /root/.local/lib/python3.9/site-packages (from weewx) (3.5)
>>>>>> Requirement already satisfied: PyMySQL[rsa]<2.0,>=1.0 in 
>>>>>> /root/.local/lib/python3.9/site-packages (from weewx) (1.0.3)
>>>>>> Requirement already satisfied: pyephem<4.0,>=3.7 in 
>>>>>> /root/.local/lib/python3.9/site-packages (from weewx) (3.7.7.0)
>>>>>> Requirement already satisfied: pyusb<2.0.0,>=1.0.2 in 
>>>>>> /root/.local/lib/python3.9/site-packages (from weewx) (1.2.1)
>>>>>> Requirement already satisfied: six<2,>=1 in 
>>>>>> /usr/lib/python3/dist-packages (from weewx) (1.16.0)
>>>>>> Requirement already satisfied: Pillow>=5.2 in 
>>>>>> /usr/lib/python3/dist-packages (from weewx) (8.1.2)
>>>>>> Requirement already satisfied: CT3<4.0,>=3.1 in 
>>>>>> /root/.local/lib/python3.9/site-packages (from weewx) (3.3.1)
>>>>>> Requirement already satisfied: ephem==3.7.7.0 in 
>>>>>> /root/.local/lib/python3.9/site-packages (from pyephem<4.0,>=3.7->weewx) 
>>>>>> (3.7.7.0)
>>>>>> Requirement already satisfied: cryptography in 
>>>>>> /root/.local/lib/python3.9/site-packages (from 
>>>>>> PyMySQL[rsa]<2.0,>=1.0->weewx) (40.0.1)
>>>>>> Requirement already satisfied: cffi>=1.12 in 
>>>>>> /root/.local/lib/python3.9/site-packages (from 
>>>>>> cryptography->PyMySQL[rsa]<2.0,>=1.0->weewx) (1.15.1)
>>>>>> Requirement already satisfied: pycparser in 
>>>>>> /root/.local/lib/python3.9/site-packages (from 
>>>>>> cffi>=1.12->cryptography->PyMySQL[rsa]<2.0,>=1.0->weewx) (2.21)
>>>>>> root@pi35:~/weewx-data#
>>>>>>
>>>>>> Op vrijdag 26 mei 2023 om 08:19:23 UTC-3 schreef Lucas Heijst:
>>>>>>
>>>>>>> After the update of weewx 5.0.0.a25 (or other a.. versions) to 
>>>>>>> version 5.0.0.b1 with:
>>>>>>> python3 -m pip install weewx --upgrade --user
>>>>>>> Weewx won't run anymore
>>>>>>>
>>>>>>> All instances of weewx got the same error when started with:
>>>>>>> systemctl restart weewx_xxxx
>>>>>>>
>>>>>>> May 25 18:35:02 pi35 systemd[1]: Started weewx xxxx.
>>>>>>> May 25 18:35:02 pi35 systemd[1]: weewx_xxxx.service: Main process 
>>>>>>> exited, code=exited, status=2/INVALIDARGUMENT
>>>>>>> May 25 18:35:02 pi35 systemd[1]: weewx_xxxx.service: Failed with 
>>>>>>> result 'exit-code'.
>>>>>>>
>>>>>> -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "weewx-development" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to weewx-developm...@googlegroups.com.
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/weewx-development/fa014936-4304-4f17-936c-6e1495dfd821n%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/weewx-development/fa014936-4304-4f17-936c-6e1495dfd821n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-development+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/6226a343-3499-41f0-a221-2bd1243e074cn%40googlegroups.com.

Reply via email to