Install basic report in Weewx

222 views
Skip to first unread message

Harry Nieuwdorp

unread,
Sep 30, 2019, 5:06:20 PM9/30/19
to weewx-user
I found the following errors when  installing basic report.

Please explain.

pi@REpb4:~$ wee_extension --install=home/pi/Weewx?Examples/basic
Request to install '/home/pi/Weewx/Examples/basic'
Traceback (most recent call last):
File "/usr/bin/wee_extension", line 82, in <module> main()
File üsr/bin/wee_extension", line 74, in main
ext.install_extension(option.install)
File üsr/share/weewx/weecfg/extension.py", line 123, in
install_extension
   self.install_from_dir(extension_path)
File "/usr/share/weewx/weecfg/__init__.py"line 1601, in get_extension_installer_
      raise ExtensionError("Cannot find ínstall'module in %s" % extension_installer_dir)
weecfg.ExtensionError: Cannot find ínstall'module
in home/pi/Weewx/Examples/basic.

ttf-dejavu-core and ttf-dejavu-extra installed.

{Extras] updated to
Current = /home/pi/Weewx/Skins/basic/current.inc
hilo =  /home/pi/Weewx/skins/basic/hilo.inc

Installed in Weewx.conf
[StdReport]
      ...
      [[basic]]
            skin = basic
            HTML_ROOT = public_html/basic

Hope to hear from you. Thanks in advance

Regards Harry de PE1IAA. (beginner with Raspberry

PS: i cannot change file in /ectc/weewx/weewx.conf
I saw somthing like chmod 777, please explain.

gjr80

unread,
Sep 30, 2019, 9:02:44 PM9/30/19
to weewx-user
Hi,

Does the directory home/pi/Weewx/Examples/basic exist and what are its contents? Try using the following command:

$ ls -ail home/pi/Weewx/Examples/basic

What output do you see?

If i understand your weewx.conf question correctly you cannot make any changes to weewx.conf. There are a couple of solutions to this, broadly speaking you can change the permissions on weewx.conf so that the user you are logged in as has permissions to change the file. You might use something like:

$ sudo chmod 777 /home/weewx/weewx.conf

Bear in mind this gives all users permission to edit weewx.conf, which may or may not be an issue for you. Alternatively, run your editor with elevated privileges using the sudo command, something like:'

$ sudo nano /home/weewx/weewx.conf

Gary

Harry Nieuwdorp

unread,
Oct 1, 2019, 1:50:12 PM10/1/19
to weewx-user
Hallo Garry,

1- Command not found. Made directories myself.
home/pi/Weewx/Examples and home//pi/Weewx/Skins

2- Command Nano works but is difficult to handle. I prefer Text editor.

Weewx is running with weewxd weewx1.conf (weewx1.conf in /home/pi/ directory.)
Running on Raspberry 4 with 4 gb
installed with .rpm

Installations using .deb or .rpm

Now consider the case where weewx was installed from a .deb or .rpm package. In this case, the following are equivalent:

/usr/share/weewx/weewxd /etc/weewx/weewx.conf

cd /usr/share/weewx

./weewxd /etc/weewx/weewx.conf

weewxd /etc/weewx/weewx.conf
Harry de PE1IAA

Op dinsdag 1 oktober 2019 03:02:44 UTC+2 schreef gjr80:

gjr80

unread,
Oct 1, 2019, 9:24:02 PM10/1/19
to weewx-user
Hi,

Comments below:

Gary

On Wednesday, 2 October 2019 03:50:12 UTC+10, Harry Nieuwdorp wrote:
1- Command not found. Made directories myself.
home/pi/Weewx/Examples and home//pi/Weewx/Skins

The ls command was not found? Odd. Could you please post screen (text) captures showing the exact command entered and the exact response. Makes it much easier for us to diagnose and give you help so we don't waste both your time and ours.
 
2- Command Nano works but is difficult to handle. I prefer Text editor.

You can use whatever editor you are comfortable with (as long as it is a text editor). The main point here was to run your editor with elevated privileges rather than as (the unprivileged) user pi.
 
Weewx is running with weewxd weewx1.conf (weewx1.conf in /home/pi/ directory.)
Running on Raspberry 4 with 4 gb
installed with .rpm

Installations using .deb or .rpm

Now consider the case where weewx was installed from a .deb or .rpm package. In this case, the following are equivalent:

/usr/share/weewx/weewxd /etc/weewx/weewx.conf

cd /usr/share/weewx

./weewxd /etc/weewx/weewx.conf

weewxd /etc/weewx/weewx.conf

I am not sure from this whether WeeWX is running as you want (with the extension installed from your first post). If it is that is good, but just a word or warning. WeeWX will run quite happily with a config file named something other than weewx.conf and located somewhere other than /home/weewx or /etc/weewx, but if you don't keep your wits about you can easily end up with multiple config files and you may edit or use the wrong one and wonder why changes don't work.
 

Harry Nieuwdorp

unread,
Oct 15, 2019, 11:47:56 AM10/15/19
to weewx-user
Hallo Garry,

Sorry for late reaction, but i was one week to Italy.
Problems solved. basic and xstats are running now and show in html. sudo did the trick.
i have still some strange /var//log/messages:
Oct 15 17:15:18 Rpb4 weewx[1672]: manager: Added record 2019-10-15 17:15:00 CEST (1571152500) to daily summary in 'weewx.sdb'
Oct 15 17:15:19 Rpb4 weewx[1672]: restx: PWSWeather: Published record 2019-10-15 17:15:00 CEST (1571152500)
Oct 15 17:15:19 Rpb4 weewx[1672]: cheetahgenerator: Generated 8 files for report SeasonsReport in 0.77 seconds
Oct 15 17:15:19 Rpb4 weewx[1672]: restx: AWEKAS: Published record 2019-10-15 17:15:00 CEST (1571152500)
Oct 15 17:15:20 Rpb4 weewx[1672]: imagegenerator: Generated 14 images for SeasonsReport in 0.53 seconds
Oct 15 17:15:20 Rpb4 weewx[1672]: copygenerator: copied 0 files to /var/www/html/weewx
Oct 15 17:15:20 Rpb4 weewx[1672]: ****  Traceback (most recent call last):
Oct 15 17:15:20 Rpb4 weewx[1672]: ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 332, in generate
Oct 15 17:15:20 Rpb4 weewx[1672]: ****      fd.write(str(compiled_template))
Oct 15 17:15:20 Rpb4 weewx[1672]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1045, in __str__
Oct 15 17:15:20 Rpb4 weewx[1672]: ****      rc = getattr(self, mainMethName)()
Oct 15 17:15:20 Rpb4 weewx[1672]: ****    File "_etc_weewx_skins_basic_index_html_tmpl.py", line 165, in respond
Oct 15 17:15:20 Rpb4 weewx[1672]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1685, in _handleCheetahInclude
Oct 15 17:15:20 Rpb4 weewx[1672]: ****      file=file)
Oct 15 17:15:20 Rpb4 weewx[1672]: ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 738, in compile
Oct 15 17:15:20 Rpb4 weewx[1672]: ****      fileHash += str(os.path.getmtime(file))
Oct 15 17:15:20 Rpb4 weewx[1672]: ****    File "/usr/lib/python2.7/genericpath.py", line 62, in getmtime
Oct 15 17:15:20 Rpb4 weewx[1672]: ****      return os.stat(filename).st_mtime
Oct 15 17:15:20 Rpb4 weewx[1672]: ****  OSError: [Errno 2] Bestand of map bestaat niet: '/etc/weewx/skins/basic/INST_SKIN_ROOT/basic/current.inc'
Oct 15 17:15:20 Rpb4 weewx[1672]: cheetahgenerator: Generated 0 files for report basic in 0.06 seconds
Oct 15 17:15:20 Rpb4 weewx[1672]: imagegenerator: Generated 10 images for basic in 0.40 seconds
Oct 15 17:15:20 Rpb4 weewx[1672]: copygenerator: copied 0 files to /var/www/html/weewx/basic
Oct 15 17:15:20 Rpb4 weewx[1672]: cheetahgenerator: Generated 6 files for report SmartphoneReport in 0.05 seconds
Oct 15 17:15:20 Rpb4 weewx[1672]: imagegenerator: Generated 6 images for SmartphoneReport in 0.27 seconds
Oct 15 17:15:20 Rpb4 weewx[1672]: copygenerator: copied 0 files to /var/www/html/weewx/smartphone
Oct 15 17:15:20 Rpb4 weewx[1672]: cheetahgenerator: Generated 1 files for report MobileReport in 0.02 seconds
Oct 15 17:15:21 Rpb4 weewx[1672]: imagegenerator: Generated 4 images for MobileReport in 0.15 seconds
Oct 15 17:15:21 Rpb4 weewx[1672]: copygenerator: copied 0 files to /var/www/html/weewx/mobile
Oct 15 17:15:22 Rpb4 weewx[1672]: rsyncupload: rsync executed in 1.23 seconds
Oct 15 17:15:39 Rpb4 kernel: [  694.346111] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:15:42 Rpb4 kernel: [  697.350116] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:16:13 Rpb4 kernel: [  728.958770] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:16:16 Rpb4 kernel: [  731.962514] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:16:47 Rpb4 kernel: [  762.834099] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:16:50 Rpb4 kernel: [  765.837852] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:16:53 Rpb4 kernel: [  768.839277] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:17:25 Rpb4 kernel: [  800.342602] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:17:28 Rpb4 kernel: [  803.346337] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:17:59 Rpb4 kernel: [  834.342858] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:18:02 Rpb4 kernel: [  837.344433] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:18:05 Rpb4 kernel: [  840.348268] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:18:36 Rpb4 kernel: [  871.835777] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use
Oct 15 17:18:39 Rpb4 kernel: [  874.839909] usb 1-1.1: usbfs: process 1672 (python) did not claim interface 0 before use

I want to have temp4 in graph how do i update that this shoes in index.html with shorter context like temp1-temp2-temp3-temp4
made extra temp4 in weewx.conf

Regards Harry de PE1IAA

Op woensdag 2 oktober 2019 03:24:02 UTC+2 schreef gjr80:

gjr80

unread,
Oct 24, 2019, 6:51:05 PM10/24/19
to weewx-user
Hallo Harry,

My apologies for the tardy reply, meant to come back to your post but forgot.

Oct 15 17:15:20 Rpb4 weewx[1672]: **** OSError: [Errno 2] Bestand of map bestaat niet: '/etc/weewx/skins/basic/INST_SKIN_ROOT/basic/current.inc'

Judging by this error message it looks like Cheetah is having trouble finding some files for the basic skin. Perhaps when you had troubles installing the basic skin you ended up with a directory tree that is confusing WeeWX/Cheetah? Normally you would install the basic skin from the examples directory shipped with WeeWX. I see you installed WeeWX via a package so that will change the location of the examples directory, that is quite likely why you could not install it earlier. I suggest you cut your losses on your current basic skin install and try to re-install. Try the following:

1. First let's get rid of your existing basic skin install:

$ sudo rm -rf /etc/weewx/skins/basic

2. Try re-installing the basic skin using the wee_extension utility:

$ /usr/share/weewx/wee_extension --install=/usr/share/doc/weewx/examples/basic

3. If no errors restart WeeWX:

$ sudo /etc/init.d/weewx restart

See how that goes. If you get any errors performing any of the above commands or in the log please post the exact commands used and the response, take a copy of the console output and post it rather than summarising/retyping.

Now for the second part of your post:

I want to have temp4 in graph how do i update that this shoes in index.html with shorter context like temp1-temp2-temp3-temp4
made extra temp4 in weewx.conf

I am not sure exactly what you mean. When you refer to temp1, temp2, temp3 and temp4 do you mean extraTemp1, extraTemp2, extraTemp3 and extraTemp4? If so before you can plot extraTemp4 you will need to include in it the database schema (WeeWX ships with only extraTemp1, extraTemp2 and extraTemp3 in the database schema) . You can add extraTemp4 to the database schema by following these instructions in the Customization Guide. I strongly suggest you make sure you backup your database and weewx.conf before attempting this.If in fact you did mean temp1, temp2, temp3 and temp4 then you will need to have all of these fields in the database schema before you can plot them. The process for adding is the same as for extraTemp4, just there are more of them and they have different names.

Once you database schema includes the additional fields and provided they are being filled with data you can easily go ahead and plot them all on one plot by adding a new plot to the [ImageGenerator] stanza of the skin under which you want to create the plot. Refer to Plotting multiple observations in the Customization Guide though you will also find similar examples in the Standard and Seasons skins skin.conf files.

If I have misunderstood your question please correct me.

Gary

Harry Nieuwdorp

unread,
Nov 25, 2019, 4:41:11 AM11/25/19
to weewx-user
Hello Garry,

I have tried this:
pi@Rpb4:~ $ sudo rm -rf /etc/weewx/skins/basic
pi@Rpb4:~ $ /usr/share/weewx/wee_extension --install=/usr/share/doc/weewx/examples/basic
Request to install '/usr/share/doc/weewx/examples/basic'
Traceback (most recent call last):
  File "/usr/share/weewx/wee_extension", line 82, in <module>
    main()
  File "/usr/share/weewx/wee_extension", line 74, in main
    ext.install_extension(options.install)
  File "/usr/share/weewx/weecfg/extension.py", line 123, in install_extension
    self.install_from_dir(extension_path)
  File "/usr/share/weewx/weecfg/extension.py", line 174, in install_from_dir
    shutil.copy(source_path, destination_path)
  File "/usr/lib/python2.7/shutil.py", line 139, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 97, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: '/etc/weewx/skins/basic/basic.css'
pi@Rpb4:~ $ 

Seems this does not work.

Regards Harry de PE1IAA


Op maandag 30 september 2019 23:06:20 UTC+2 schreef Harry Nieuwdorp:

gjr80

unread,
Dec 6, 2019, 1:56:36 AM12/6/19
to weewx-user
Hallo Harry,

Sorry for the delay in getting back to you, I think this is a permissions problem. Try prefixing the wee_extension command with sudo, ie:

$ sudo /usr/share/weewx/wee_extension --install=/usr/share/doc/weewx/examples/basic

Gary
Reply all
Reply to author
Forward
0 new messages