here are the logs

pi@raspberrypi:~ $ sudo systemctl status weewx
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx; generated; vendor preset: enabled)
   Active: active (exited) since Tue 2020-09-01 09:14:20 BST; 4h 57min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 548 ExecStop=/etc/init.d/weewx stop (code=exited, 
status=0/SUCCESS)
  Process: 692 ExecStart=/etc/init.d/weewx start (code=exited, 
status=0/SUCCESS)
   CGroup: /system.slice/weewx.service

Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****      self.loadServices(config_dict)
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****    File "/usr/share/weewx/weewx/engine.py", line 138, in loadServices
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****      obj = weeutil.weeutil.get_object(svc)(self,config_dict)
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1093, in 
get_object
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****      mod = __import__(module)
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****    File "/usr/share/weewx/user/opsgenie.py", line 61
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****      except KeyError, e:
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****                     ^
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****  SyntaxError: invalid syntax
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****  Exiting.
pi@raspberrypi:~ $ sudo /etc/init.d/weewx start
[ ok ] Starting weewx (via systemctl): weewx.service.
pi@raspberrypi:~ $ sudo systemctl status weewx
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx; generated; vendor preset: enabled)
   Active: active (exited) since Tue 2020-09-01 09:14:20 BST; 4h 58min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 548 ExecStop=/etc/init.d/weewx stop (code=exited, 
status=0/SUCCESS)
  Process: 692 ExecStart=/etc/init.d/weewx start (code=exited, 
status=0/SUCCESS)
   CGroup: /system.slice/weewx.service

Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****      self.loadServices(config_dict)
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****    File "/usr/share/weewx/weewx/engine.py", line 138, in loadServices
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****      obj = weeutil.weeutil.get_object(svc)(self,config_dict)
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1093, in 
get_object
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****      mod = __import__(module)
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****    File "/usr/share/weewx/user/opsgenie.py", line 61
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****      except KeyError, e:
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****                     ^
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****  SyntaxError: invalid syntax
Sep 01 09:14:20 raspberrypi python3[727]: weewx[727] CRITICAL __main__:    
 ****  Exiting.


On Tuesday, 1 September 2020 at 13:32:15 UTC+1 [email protected] wrote:

> What are the results of the command
>
> *sudo systemctl status weewx*
>
> Then try it again after trying to start weewxd:
>
> *sudo /etc/init.d/weewx start*
> *sudo systemctl status weewx*
>
>
>
>
> On Tue, Sep 1, 2020 at 5:08 AM 'Season Ticket' via weewx-user <
> [email protected]> wrote:
>
>> ok thanks I didn't know that the recompile would be done automatically.
>>
>> here is the content of /etc/default/weewx
>> pi@raspberrypi:~ $ more /etc/default/weewx
>> WEEWX_PYTHON=/usr/bin/python3
>> WEEWX_BINDIR=/usr/share/weewx
>> WEEWX_BIN=/usr/bin/weewxd
>> WEEWX_CFG=/etc/weewx/weewx.conf
>>
>> and
>>
>> pi@raspberrypi:~ $ ls -altr /usr/bin/weewxd
>> -rwxr-xr-x 1 root root 279 Jun  1 23:16 /usr/bin/weewxd
>> pi@raspberrypi:~ $ ls -altr /usr/bin/python3
>> lrwxrwxrwx 1 root root 9 Jan 20  2017 /usr/bin/python3 -> python3.5
>> pi@raspberrypi:~ $ ls -altr /usr/bin/python2
>> lrwxrwxrwx 1 root root 9 Jan 24  2017 /usr/bin/python2 -> python2.7
>> pi@raspberrypi:~ $ ls -altr /usr/share/weewx
>> total 284
>> -rwxr-xr-x   1 root root 23741 Jun  1 23:16 wunderfixer
>> -rwxr-xr-x   1 root root  9840 Jun  1 23:16 weewxd
>> -rwxr-xr-x   1 root root  3806 Jun  1 23:16 wee_reports
>> -rwxr-xr-x   1 root root 38823 Jun  1 23:16 wee_import
>> -rwxr-xr-x   1 root root  3157 Jun  1 23:16 wee_extension
>> -rwxr-xr-x   1 root root  2195 Jun  1 23:16 wee_device
>> -rwxr-xr-x   1 root root 16776 Jun  1 23:16 wee_debug
>> -rwxr-xr-x   1 root root 43183 Jun  1 23:16 wee_database
>> -rwxr-xr-x   1 root root  5637 Jun  1 23:16 wee_config
>> -rw-r--r--   1 root root 32452 Jun  1 23:16 six.py
>> -rw-r--r--   1 root root  2888 Jun  1 23:16 daemon.py
>> drwxr-xr-x 237 root root 12288 Aug 29 22:38 ..
>> drwxr-xr-x   2 root root  4096 Sep  1 09:10 weeimport
>> -rw-r--r--   1 root root 31099 Sep  1 09:10 six.pyc
>> -rw-r--r--   1 root root  2712 Sep  1 09:10 daemon.pyc
>> drwxr-xr-x   2 root root  4096 Sep  1 09:11 weeplot
>> drwxr-xr-x  11 root root  4096 Sep  1 09:14 .
>> drwxr-xr-x   3 root root  4096 Sep  1 09:14 weecfg
>> drwxr-xr-x   2 root root  4096 Sep  1 09:14 __pycache__
>> drwxr-xr-x   3 root root  4096 Sep  1 09:14 weeutil
>> drwxr-xr-x   3 root root  4096 Sep  1 09:14 weedb
>> drwxr-xr-x   4 root root  4096 Sep  1 09:14 weewx
>> drwxr-xr-x   4 root root  4096 Sep  1 09:14 user
>> drwxr-xr-x   3 root root  4096 Sep  1 09:14 schemas
>> pi@raspberrypi:~ $ ls -altr /etc/weewx/weewx.conf
>> -rw-r--r-- 1 root root 31815 Sep  1 09:22 /etc/weewx/weewx.conf
>>
>>
>>
>> On Tuesday, 1 September 2020 at 12:40:31 UTC+1 [email protected] wrote:
>>
>>> You're making things harder than it needs to be! No need to recompile 
>>> anything. That is done automatically by the interpreter.
>>>
>>> 1. What is in /etc/default/weewx? 
>>>
>>> 2. In /etc/default/weewx, the variable WEEWX_BIN points to the copy of 
>>> weewxd to be used. *Make sure it exists*. If it does not, this will 
>>> cause /etc/init.d/weewx to exit without warning.
>>>
>>> -tk
>>>
>>> On Tue, Sep 1, 2020 at 1:39 AM 'Season Ticket' via weewx-user <
>>> [email protected]> wrote:
>>>
>>>> thanks for your persistence with this.
>>>> I reinstalled because I expected that the code would need to be 
>>>> recompiled with python3.  
>>>> I can revert back to python2  by,  a) changing the /etc/defaults/weewx 
>>>> to reference python2 and then reinstall again using "sudo dpkg -i 
>>>> python-weewx_4.1.1-1_all.deb"
>>>> I tried again this time with only changing the /etc/defaults/weewx file 
>>>> and running weewxd.  
>>>>
>>>> This time I got some errors due to the following:
>>>>      user.alarm_multi.MyAlarm,
>>>>      user.opsgenie.OpsGenieAlerts, user.opsgenie.OpsGenieHeartbeat
>>>> which I have removed and now weewxd works fine
>>>>
>>>> However when I start the daemon "sudo /etc/init.d/weewx start" I still 
>>>> get nothing,   no process is started and no logs.  Any ideas?
>>>>
>>>>
>>>> On Monday, 31 August 2020 at 23:49:51 UTC+1 [email protected] wrote:
>>>>
>>>>> Any particular reason why you tried to reinstall weewx? And, the 
>>>>> version you reinstalled is for python2.
>>>>>
>>>>> NB: there is only one code base for weewx. There is no separate Python 
>>>>> 2 and Python 3 versions. The only difference between the two packages is 
>>>>> in 
>>>>> which prerequisites get installed. But, the actually weewx code base is 
>>>>> identical.
>>>>>
>>>>> That is why you only needed to install the new prerequisites.
>>>>>
>>>>> Surely there is something in the logs. What happens if you try to run 
>>>>> weewxd directly from the command line?
>>>>>
>>>>>
>>>>> On Mon, Aug 31, 2020 at 3:26 PM 'Season Ticket' via weewx-user <
>>>>> [email protected]> wrote:
>>>>>
>>>>>>
>>>>>> I changed /etc/default/weewx to use /usr/bin/python3
>>>>>> then 
>>>>>>
>>>>>> sudo dpkg -i python-weewx_4.1.1-1_all.deb
>>>>>>
>>>>>> but now weewx won't start and no logs in /var/log/syslog
>>>>>> On Monday, 31 August 2020 at 23:06:15 UTC+1 [email protected] wrote:
>>>>>>
>>>>>>> I'm assuming you want to keep everything the same, except you want 
>>>>>>> to run under Python 3. So, all you have to do is make sure python3 gets 
>>>>>>> invoked, instead of python2. How to do that depends on your install 
>>>>>>> method.
>>>>>>>
>>>>>>> A, If you did a *package install* using apt-get, you will need to 
>>>>>>> go into /etc/default/weewx and change option WEEWX_PYTHON to
>>>>>>>
>>>>>>> WEEWX_PYTHON=/usr/bin/python3
>>>>>>>
>>>>>>> B. If you did a *setup.py install*, you will have to change the 
>>>>>>> very first line of /home/weewx/bin/weewxd to read
>>>>>>>
>>>>>>> #!/usr/bin/python3
>>>>>>>
>>>>>>> Same with other utilities. 
>>>>>>>
>>>>>>> -tk
>>>>>>>
>>>>>>> On Mon, Aug 31, 2020 at 2:55 PM 'Season Ticket' via weewx-user <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> if I choose these instructions  what do I change home to,  
>>>>>>>> weewx.conf is in /etc/weewx?
>>>>>>>> To specify an install location different from the 
>>>>>>>> default /home/weewx, modify the parameter home in the setup.cfg file. 
>>>>>>>> Mac 
>>>>>>>> users will want to change it to /Users/Shared/weewx.  
>>>>>>>> On Monday, 31 August 2020 at 22:08:58 UTC+1 [email protected] wrote:
>>>>>>>>
>>>>>>>>> Take a look at the prerequisite requirements for the setup.py 
>>>>>>>>> instructions <http://www.weewx.com/docs/setup.htm>. Specifically:
>>>>>>>>>
>>>>>>>>> sudo apt update
>>>>>>>>>
>>>>>>>>> # Requiredsudo apt install python3-configobj
>>>>>>>>> sudo apt install python3-pil
>>>>>>>>> sudo apt install python3-serial
>>>>>>>>> sudo apt install python3-usb
>>>>>>>>>
>>>>>>>>> # The following tests for distutils and installs if not present:
>>>>>>>>> python3 -c "import distutils" 2>/dev/null || sudo apt install 
>>>>>>>>> python3-distutils
>>>>>>>>>
>>>>>>>>> # Install pip3 and cheetah3:
>>>>>>>>> sudo apt install python3-pip
>>>>>>>>> sudo pip3 install cheetah3
>>>>>>>>>
>>>>>>>>> # Optional: for extended almanac informationsudo apt install 
>>>>>>>>> python3-ephem
>>>>>>>>>
>>>>>>>>> # Required if you are using MySQL (MariaDB):sudo apt install 
>>>>>>>>> mysql-client
>>>>>>>>> sudo apt install python3-mysqldb
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Aug 31, 2020 at 1:55 PM 'Season Ticket' via weewx-user <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> i'm running weewx on raspbian v9,  with python 2.7 weewx 4.1.1,  
>>>>>>>>>> and I'm trying to upgrade to python3.  I already have python version 
>>>>>>>>>> 3.5.3 
>>>>>>>>>> installed.
>>>>>>>>>>
>>>>>>>>>> what do I need to do to run weewx under python3?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
>>>>>>>>>> NAME="Raspbian GNU/Linux"
>>>>>>>>>> VERSION_ID="9"
>>>>>>>>>> VERSION="9 (stretch)"
>>>>>>>>>> ID=raspbian
>>>>>>>>>> ID_LIKE=debian
>>>>>>>>>> HOME_URL="http://www.raspbian.org/";
>>>>>>>>>> SUPPORT_URL="http://www.raspbian.org/RaspbianForums";
>>>>>>>>>> BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs";
>>>>>>>>>>
>>>>>>>>>> pi@raspberrypi:~ $ python --version
>>>>>>>>>> Python 2.7.13
>>>>>>>>>>
>>>>>>>>>> pi@raspberrypi:~ $ python3 --version
>>>>>>>>>> Python 3.5.3
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> wee_config --version
>>>>>>>>>> 4.1.1
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>>> 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 on the web visit 
>>>>>>>>>> https://groups.google.com/d/msgid/weewx-user/a8ad9b18-aaf9-4267-ae4a-0ab78337df6an%40googlegroups.com
>>>>>>>>>>  
>>>>>>>>>> <https://groups.google.com/d/msgid/weewx-user/a8ad9b18-aaf9-4267-ae4a-0ab78337df6an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>>> .
>>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>> 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 on the web visit 
>>>>>>>> https://groups.google.com/d/msgid/weewx-user/4eb92ee2-a2a8-4f26-b6d4-032fb05ae5e9n%40googlegroups.com
>>>>>>>>  
>>>>>>>> <https://groups.google.com/d/msgid/weewx-user/4eb92ee2-a2a8-4f26-b6d4-032fb05ae5e9n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>> -- 
>>>>>> 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 on the web visit 
>>>>>> https://groups.google.com/d/msgid/weewx-user/51af5239-d94d-465f-a496-2274d8b1c984n%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/weewx-user/51af5239-d94d-465f-a496-2274d8b1c984n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> -- 
>>>> 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 on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-user/4d685c57-58dd-4d1f-b613-fe45a60aac39n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/4d685c57-58dd-4d1f-b613-fe45a60aac39n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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 on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/b2f2b1f7-554a-4226-b940-b1f0d488b4d2n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/b2f2b1f7-554a-4226-b940-b1f0d488b4d2n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/weewx-user/13f8e809-4247-40fc-be8f-ca5154cbd33an%40googlegroups.com.

Reply via email to