Request to install '/home/pi/Desktop/weewx-svg2png.zip'
Extracting from zip archive /home/pi/Desktop/weewx-svg2png.zip
Traceback (most recent call last):
File "/usr/share/weewx/wee_extension", line 92, in <module>
main()
File "/usr/share/weewx/wee_extension", line 84, in main
ext.install_extension(options.install)
File "/usr/share/weewx/weecfg/extension.py", line 130, in install_extension
self.install_from_dir(extension_dir)
File "/usr/share/weewx/weecfg/extension.py", line 150, in install_from_dir
installer_path, installer = weecfg.get_extension_installer(extension_dir)
File "/usr/share/weewx/weecfg/__init__.py", line 1904, in get_extension_installer
installer = loader()
File "/var/tmp/weewx-svg2png-master/install.py", line 8, in loader
File "/var/tmp/weewx-svg2png-master/install.py", line 12, in __init__
NameError: name 'SNMPInstaller' is not defined
--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a4dfa6cd-44ca-4803-8f16-b0dcfd4f645dn%40googlegroups.com.
/var/www/html/weewx/webcam/snap.jpg
Here is the content of my snap.svg.tmpl
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="2688" height="1512" viewBox="0 0 2688 1512">
<style>
text {
font-family: Roboto, sans-serif;
font-weight: 300;
line-height: 1.625;
margin: 0;
font-size: 48px;
fill: white;
}
</style>
## webcam image
<image x="0" y="0" width="2688" height="1512" href="/webcam/snap.jpg" />
## readings
<text x="2400" y="1450" text-anchor="middle">$current.outTemp $current.windSpeed $current.barometer</text>
</svg>
[SVGtoPNGGenerator]
[[file1]]
# file name without extension (optional)
file = /var/www/html/weewx/webcam/snap
# image width in pixels (optional)
#width = replace_me
# image height in pixels (optional)
#height = replace_me
[[[file1]]]
template = snap.svg.tmpl
[Generators]
generator_list = weewx.cheetahgenerator.CheetahGenerator, weewx.reportengine.CopyGenerator, user.belchertown.HighchartsJsonGenerator, user.svg2png.SVGtoPNGGenerator
The .svg is getting created but not the png….
Is there something to do with files path?
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/40aa1301-9c54-4210-a9c1-5d21f46a9cf0n%40googlegroups.com.
So now the snap.svg.tmpl is residing in /etc/weewx/skins/Belchertown/webcam
- move the template "snap.svg.tmpl" to the "webcam" sub-directory in your skin directory (something like "/etc/weewx/skins/...”).à
- Change the template line to "template = webcam/snap.svg.tmpl”.
- Change the file line to "file = webcam/snap".
- Double check "href="/webcam/snap.jpg"". Are you sure that is situated in the root directory? May be you want to remove the slash at the beginning.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/6bd6d023-6863-4d3e-8cdb-24876cd22f58n%40googlegroups.com.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="2688" height="1512" viewBox="0 0 2688 1512">
<style>
text {
font-family: Roboto, sans-serif;
font-weight: 300;
line-height: 1.625;
margin: 0;
font-size: 48px;
fill: white;
}
</style>
## webcam image
<image x="0" y="0" width="2688" height="1512" href="webcam/snap.jpg" />
## readings
<text x="400" y="570" text-anchor="left">Temp:$current.outTemp - Dir:$current.windDir.ordinal_compass - Speed:$current.windSpeed - Bar:$current.barometer - Total Rain:$day.rain.sum - $current.pm2_5_aqi</text>
</svg>
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/4b2ccbfa-4a9f-49f0-ae24-b932a3ac7dc0n%40googlegroups.com.
# Where the generated reports should go, relative to WEEWX_ROOT
HTML_ROOT = /var/www/html/weewx
/var/www/html/weewx/webcam/snap.jpg
Now there is a snap.png and snap.svg in that folder now
pi@Weewx-APRS3695:/var/www/html/weewx/webcam $ ls -la
total 536
drwxrwxrwx 2 root root 4096 Oct 11 15:55 .
drwxr-xr-x 15 root root 4096 Oct 11 15:55 ..
-rw-r--r-- 1 pi pi 492892 Oct 11 15:55 snap.jpg
-rw-r--r-- 1 root root 33150 Oct 11 15:55 snap.png
-rw-r--r-- 1 root root 682 Oct 11 15:55 snap.svg
-rwxrwxrwx 1 root root 482 Oct 11 15:55 '#Webcam_FTP.last’
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/53500b69-c8e1-48d0-aa3e-d7a535dbabcdn%40googlegroups.com.
Oct 12 15:21:08 XXXX weewx[119729] ERROR user.svg2png: URLError <urlopen error [Errno 2] Datei oder Verzeichnis nicht gefunden: '/var/www/html/weewx/belchertown/webcam/webcam.jpg'>
/etc/weewx/skins/Belchertown/webcam/snap.svg.tmpl
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="2688" height="1512" viewBox="0 0 2688 1512">
<style>
text {
font-family: Roboto, sans-serif;
font-weight: 300;
line-height: 1.625;
margin: 0;
font-size: 48px;
fill: white;
}
</style>
## webcam image
<image x="0" y="0" width="2688" height="1512" href="/webcam/snap.jpg" />
## readings
<text x="400" y="570" text-anchor="left">Temp:$current.outTemp - Dir:$current.windDir.ordinal_compass - Speed:$current.windSpeed - Bar:$current.barometer - Total Rain:$day.rain.sum - $current.pm2_5_aqi</text>
</svg>
Oct 12 10:15:39 Weewx-APRS3695 weewx[24286] INFO user.svg2png: Created 1 PNG file in 1.52 seconds
Oct 12 10:15:39 Weewx-APRS3695 weewx[24286] INFO weewx.cheetahgenerator: Generated 1 files for report AirLinkReport in 0.03 seconds
Oct 12 10:15:39 Weewx-APRS3695 weewx[24286] INFO weewx.imagegenerator: Generated 2 images for report AirLinkReport in 0.23 seconds
Oct 12 10:15:42 Weewx-APRS3695 weewx[24286] INFO weewx.cheetahgenerator: Generated 13 files for report Belchertown in 2.76 seconds
Oct 12 10:15:42 Weewx-APRS3695 weewx[24286] INFO weewx.reportengine: Copied 3 files to /var/www/html/weewx/belchertown
Oct 12 10:15:46 Weewx-APRS3695 weewx[24286] INFO user.svg2png: Created 1 PNG file in 1.53 seconds
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a94442f0-afa8-4e0d-af79-0411f2313676n%40googlegroups.com.
- What says ls -l /webcam ?
pi@Weewx-APRS3695:/ $ ls -l
total 68
lrwxrwxrwx 1 root root 7 May 2 20:04 bin -> usr/bin
drwxr-xr-x 4 root root 4096 Dec 31 1969 boot
drwxr-xr-x 16 root root 3840 Oct 7 21:27 dev
drwxr-xr-x 124 root root 12288 Sep 27 19:53 etc
drwxr-xr-x 3 root root 4096 May 2 20:37 home
lrwxrwxrwx 1 root root 7 May 2 20:04 lib -> usr/lib
drwx------ 2 root root 16384 May 2 20:34 lost+found
drwxr-xr-x 2 root root 4096 May 2 20:04 media
drwxr-xr-x 2 root root 4096 May 2 20:04 mnt
drwxr-xr-x 4 root root 4096 May 2 20:14 opt
dr-xr-xr-x 235 root root 0 Dec 31 1969 proc
drwx------ 5 root root 4096 Sep 5 22:13 root
drwxr-xr-x 29 root root 880 Oct 12 12:58 run
lrwxrwxrwx 1 root root 8 May 2 20:04 sbin -> usr/sbin
drwxr-xr-x 2 root root 4096 May 2 20:04 srv
dr-xr-xr-x 12 root root 0 Dec 31 1969 sys
drwxrwxrwt 18 root root 4096 Oct 12 12:59 tmp
drwxr-xr-x 11 root root 4096 May 2 20:04 usr
drwxr-xr-x 12 root root 4096 Sep 5 22:25 var
pi@Weewx-APRS3695:/ $
- you have log_failure = True ?
- set debug = 1 in weewx.conf, restart WeeWX and look at the log again. There should be a message containing the file names and paths of the files read and created
Oct 12 13:02:35 Weewx-APRS3695 wee_reports[29176] DEBUG user.svg2png: /var/www/html/weewx/webcam/snap.svg --> /var/www/html/weewx/webcam/snap.png
Oct 12 13:02:35 Weewx-APRS3695 wee_reports[29176] INFO user.svg2png: Created 1 PNG file in 1.60 seconds
Oct 12 13:02:43 Weewx-APRS3695 wee_reports[29176] DEBUG user.svg2png: /var/www/html/weewx/webcam/snap.svg --> /var/www/html/weewx/webcam/snap.png
Oct 12 13:02:43 Weewx-APRS3695 wee_reports[29176] INFO user.svg2png: Created 1 PNG file in 1.52 seconds
--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/5107f476-1c67-4708-8378-4277d217b94bn%40googlegroups.com.
pi@Weewx-APRS3695:/ $ ls -l /webcam
ls: cannot access '/webcam': No such file or directory
pi@Weewx-APRS3695:/ $
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/38fe7f85-050d-4f8c-afe1-ff8c591431a2n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c055358f-1efb-4a35-8e54-ae674a0497b8n%40googlegroups.com.
Nothing as changed in my case, still not getting the image, only the text…..
Oct 13 14:20:36 Weewx-APRS3695 weewx[3256] INFO user.svg2png: Created 1 PNG file in 1.60 seconds
Oct 13 14:20:43 Weewx-APRS3695 weewx[3256] INFO user.svg2png: Created 1 PNG file in 1.52 seconds
Oct 13 14:25:31 Weewx-APRS3695 weewx[3256] INFO user.svg2png: Created 1 PNG file in 1.54 seconds
Oct 13 14:25:38 Weewx-APRS3695 weewx[3256] INFO user.svg2png: Created 1 PNG file in 1.51 seconds
Oct 13 14:30:37 Weewx-APRS3695 weewx[3256] INFO user.svg2png: Created 1 PNG file in 1.52 seconds
Oct 13 14:30:45 Weewx-APRS3695 weewx[3256] INFO user.svg2png: Created 1 PNG file in 1.55 seconds
Once again here are my conf….
Content and location /etc/weewx/skins/Belchertown/webcam/snap.svg.tmpl
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="2688" height="1512" viewBox="0 0 2688 1512">
<style>
text {
font-family: Roboto, sans-serif;
font-weight: 300;
line-height: 1.625;
margin: 0;
font-size: 48px;
fill: white;
}
</style>
## webcam image
<image x="0" y="0" width="2688" height="1512" href="/var/www/weewx/webcam/snap.jpg" />
## readings
<text x="400" y="570" text-anchor="left">Temp:$current.outTemp - Dir:$current.windDir.ordinal_compass - Speed:$current.windSpeed - Bar:$current.barometer - Total Rain:$day.rain.sum - $current.pm2_5_aqi</text>
</svg>
[[ToDate]]
# Reports that show statistics "to date", such as day-to-date,
# week-to-date, month-to-date, etc.
[[[weewx_data]]]
template = json/weewx_data.json.tmpl
[[[Belchertown]]]
template = js/belchertown.js.tmpl
[[[home]]]
template = index.html.tmpl
[[[about]]]
template = about/index.html.tmpl
[[[graphs]]]
template = graphs/index.html.tmpl
[[[records]]]
template = records/index.html.tmpl
[[[reports]]]
template = reports/index.html.tmpl
[[[pi]]]
template = pi/index.html.tmpl
[[[kiosk]]]
template = kiosk.html.tmpl
[[[manifest]]]
encoding = utf8
template = manifest.json.tmpl
[[[file1]]]
template = webcam/snap.svg.tmpl
###############################################################################
[CopyGenerator]
# This section is used by the generator CopyGenerator
# List of files to be copied only the first time the generator runs
copy_once = favicon.ico, images/*, json/index.html, js/index.html, js/responsive-menu.js, robots.txt
# List of files to be copied each time the generator runs
copy_always = *.css
###############################################################################
#
# The list of generators that are to be run:
#
[Generators]
generator_list = weewx.cheetahgenerator.CheetahGenerator, weewx.reportengine.CopyGenerator, user.belchertown.HighchartsJsonGenerator, user.svg2png.SVGtoPNGGenerator
[SVGtoPNGGenerator]
[[file1]]
# file name without extension (optional)
file = /var/www/html/weewx/webcam/snap
# image width in pixels (optional)
#width = replace_me
# image height in pixels (optional)
#height = replace_me
pi@Weewx-APRS3695:~ $ ls -la /var/www/html/weewx/webcam/
total 544
drwxrwxrwx 2 root root 4096 Oct 13 15:40 .
drwxr-xr-x 15 root root 4096 Oct 13 15:40 ..
-rw-r--r-- 1 pi pi 500914 Oct 13 15:40 snap.jpg
-rw-r--r-- 1 root root 34386 Oct 13 15:40 snap.png
-rw-r--r-- 1 root root 694 Oct 13 15:40 snap.svg
-rwxrwxrwx 1 root root 482 Oct 13 15:40 '#Webcam_FTP.last'
pi@Weewx-APRS3695:~ $
<snap.svg><snap.png><snap.jpeg>
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/4eeadb23-976e-4b11-8933-742141600768n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/AB2C18E2-00FB-4249-9B45-83E6441599F7%40gmail.com.
You want to provide your settings?
I'm not particularly familiar with that corner of weewx, but since you said you also copied the image, the package ImageMagick will convert image types, sizes, etc. You can find it here: https://imagemagick.org/index.php
It's available for most Linux distros via the resident package manager (apt, dnf, yum, ...) Windows, etc.
If this is off-base, my apologies.
--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/8796836c-7f35-4859-9673-de149c16fac9n%40googlegroups.com.
On Oct 18, 2023, at 08:02, Joachim Puttkammer <jputt...@gmail.com> wrote:
I also have the problem that the webcam image (snap.jpg) is not made into a common image (snap.png) with the generated weather data image (snap.svg).
--