It is currently March 28th, 2024, 2:33 pm

Weather.ini RegExp Error

Get help with creating, editing & fixing problems with skins
Post Reply
wolfesamk
Posts: 3
Joined: February 16th, 2017, 4:19 am

Weather.ini RegExp Error

Post by wolfesamk »

Hey guys, I am very new to using Rainmeter, using a skin a found online, and there is an issue with the RegExp says the log file. not sure whats wrong with it, as its got a lot of things there.


Code: Select all

;[GATHER WEATHER INFO FROM RSS]=================================

[Current]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://XML.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=0
RegExp="(?siU).*<locale>(.*)</locale>.*<ut>(.*)</ut>.*<ud>(.*)</ud>.*<us>(.*)</us>.*<up>(.*)</up>.*<ur>(.*)</ur>.*<loc id="(.*)">.*<dnam>(.*)</dnam>.*<tm>(.*)</tm>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<cc>.*<lsup>(.*)</lsup>.*<obst>(.*)</obst>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<bar>.*<r>(.*)</r>.*<d>(.*)</d>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<hmid>(.*)</hmid>.*<vis>(.*)</vis>.*<uv>.*<i>(.*)</i>.*<t>(.*)</t>.*<dewp>(.*)</dewp>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*"

[Today]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://XML.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=1
RegExp="(?siU)<dayf>.*<lsup>(.*)</lsup>.*<day d="0" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[Tomorrow]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://XML.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=2
RegExp="(?siU)<day d="1" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[DayAfter]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://XML.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=3
RegExp="(?siU)<day d="2" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
wolfesamk
Posts: 3
Joined: February 16th, 2017, 4:19 am

Re: Weather.ini RegExp Error

Post by wolfesamk »

Here is the full code from the .ini

Code: Select all

;[BEGIN CONFIG FILE]==============================

[Rainmeter]
Author=Jeffrey Morley > modified by Dark Star > modified by Drast

;==============================================================
;Please replace your location code for Weather.com below
;Set "Metric=" to m for metric measures or f for non-metric
;==============================================================

;Metadata added by RainBrowser
;http://rainmeter.net/RainCMS/?q=Rainmeter101_AnatomyOfASkin

[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=

;End of added Metadata

[Variables]
Location=USCA0922
Metric=f
Font=Neuropol X Free
FontColor=838383
FontInactive=838383
UpdateFreq=1800
YGap=55

[Background]
Meter=IMAGE
ImageName=Square Background.png
X=295
Y=0
AntiAlias=1

;[Foreground]
;Meter=IMAGE
;ImageName=Jadus.png
;X=295
;Y=0
;AntiAlias=1

;===============================================================

;[GATHER WEATHER INFO FROM RSS]=================================

[Current]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://XML.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=0
RegExp="(?siU).*<locale>(.*)</locale>.*<ut>(.*)</ut>.*<ud>(.*)</ud>.*<us>(.*)</us>.*<up>(.*)</up>.*<ur>(.*)</ur>.*<loc id="(.*)">.*<dnam>(.*)</dnam>.*<tm>(.*)</tm>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<cc>.*<lsup>(.*)</lsup>.*<obst>(.*)</obst>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<bar>.*<r>(.*)</r>.*<d>(.*)</d>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<hmid>(.*)</hmid>.*<vis>(.*)</vis>.*<uv>.*<i>(.*)</i>.*<t>(.*)</t>.*<dewp>(.*)</dewp>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*"

[Today]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://XML.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=1
RegExp="(?siU)<dayf>.*<lsup>(.*)</lsup>.*<day d="0" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[Tomorrow]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://XML.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=2
RegExp="(?siU)<day d="1" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[DayAfter]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://XML.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=3
RegExp="(?siU)<day d="2" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

;[Current]=========================================

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=17

[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=19
Substitute=" And ":" and ","Lgt.":"Light ","Snow/":"Snow & "

[MeasureWeatherIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=20

[MeasureWeatherRealFeel]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=18

;[TODAY]=====================================


[MeasureWeatherDesc1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=9
Substitute=" And ":" and "

[MeasureWeatherDay1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=2

[MeasureWeatherTemp1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=4
Substitute="N/A":"666"

[MeasureWeatherIcon1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=8

[CheckNATemp]
Measure=Calc
Formula=[MeasureWeatherTemp1]
IfBelowValue=665
IfBelowAction=!execute [!RainmeterHideMeter MeterNightTemp1][!RainmeterHideMeter MeterNightDay1][!RainmeterHideMeter MeterNightDesc1][!RainmeterHideMeter MeterNightIcon1][!RainmeterShowMeter MeterTemp1][!RainmeterShowMeter MeterDay1][!RainmeterShowMeter MeterDesc1][!RainmeterShowMeter MeterIcon1]
IfEqualValue=666
IfEqualAction=!execute [!RainmeterHideMeter MeterTemp1][!RainmeterHideMeter MeterDay1][!RainmeterHideMeter MeterDesc1][!RainmeterHideMeter MeterIcon1][!RainmeterShowMeter MeterNightTemp1][!RainmeterShowMeter MeterNightDay1][!RainmeterShowMeter MeterNightDesc1][!RainmeterShowMeter MeterNightIcon1]
DynamicVariables=1

;[TONIGHT]=====================================


[MeasureWeatherNightDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=18
Substitute=" And ":" and "

[MeasureWeatherNightTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=5

[MeasureWeatherNightIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=17

;[TOMORROW]=====================================

[MeasureWeatherDesc2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=8
Substitute=" And ":" and "

[MeasureWeatherDay2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=1

[MeasureWeatherTemp2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=3

[MeasureWeatherIcon2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=7

;[DayAfter]=====================================

[MeasureWeatherDesc3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=8
Substitute=" And ":" and "

[MeasureWeatherDay3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=1

[MeasureWeatherTemp3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=3

;D+3, weather icon, id=38
[MeasureWeatherIcon3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=7

;[DISPLAY CURRENT]=================================

[MeterTemp]
MeasureName=MeasureWeatherTemp
Meter=STRING
X=495
Y=20
FontColor=#FontColor#
StringStyle=NORMAL
FontSize=8
StringAlign=RIGHT
StringEffect=Shadow
FontFace=#Font#
Antialias=1
Postfix="°"

[MeterDesc]
MeasureName=MeasureWeatherDesc
Meter=STRING
X=455
Y=21
FontColor=#FontColor#
FontSize=8
StringAlign=RIGHT
StringStyle=NORMAL
StringEffect=Shadow
FontFace=#Font#
Antialias=1

[MeterRealFeel]
MeasureName=MeasureWeatherRealFeel
Meter=STRING
X=495
Y=45
FontColor=#FontColor#
FontSize=8
StringAlign=RIGHT
StringStyle=NORMAL
StringEffect=Shadow
FontFace=#Font#
Antialias=1
Text="Feels like %1°"

[MeterIconNA]
ImageName=na.png
Meter=IMAGE
H=30
W=30
X=505
Y=15
Hidden=1

[MeterIcon]
MeasureName=MeasureWeatherIcon
Meter=IMAGE
H=50
W=50
X=505
Y=15
Hidden=0

;[DISPLAY TODAY]=============================

[MeterTemp1]
MeasureName=MeasureWeatherTemp1
Meter=STRING
X=495
Y=97
FontColor=#FontInactive#
StringStyle=NORMAL
FontSize=8
StringAlign=RIGHT
FontFace=#Font#
Antialias=1
Postfix="°"
StringEffect=Shadow
Hidden=0

[MeterDay1]
;MeasureName=MeasureWeatherDay1
Meter=STRING
X=495
Y=120
FontColor=#FontInactive#
FontSize=10
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Text="Today"
Antialias=1
StringEffect=Shadow
Hidden=0

[MeterDesc1]
MeasureName=MeasureWeatherDesc1
Meter=STRING
X=460
Y=97
FontColor=#FontInactive#
FontSize=8
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Antialias=1
StringEffect=Shadow
Hidden=0

[MeterIcon1]
MeasureName=MeasureWeatherIcon1
Meter=IMAGE
H=50
W=50
X=505
Y=90
Hidden=0

[MeterReset]
Meter=STRING
X=-10r
Y=r

[MeterNightTemp1]
MeasureName=MeasureWeatherNightTemp
Meter=STRING
X=495
Y=97
FontColor=#FontInactive#
StringStyle=NORMAL
FontSize=8
StringAlign=RIGHT
FontFace=#Font#
Antialias=1
Postfix="°"
StringEffect=Shadow
Hidden=1

[MeterNightDay1]
;MeasureName=MeasureWeatherDay1
Meter=STRING
X=495
Y=120
FontColor=#FontInactive#
FontSize=10
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Text="Tonight"
Antialias=1
StringEffect=Shadow
Hidden=1

[MeterNightDesc1]
MeasureName=MeasureWeatherNightDesc
Meter=STRING
X=460
Y=97
FontColor=#FontInactive#
FontSize=8
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Antialias=1
StringEffect=Shadow
Hidden=1

[MeterNightIcon1]
MeasureName=MeasureWeatherNightIcon
Meter=IMAGE
H=50
W=50
X=505
Y=90
Hidden=1

;[DISPLAY TOMORROW]=============================

[MeterTemp2]
MeasureName=MeasureWeatherTemp2
Meter=STRING
X=495
Y=168
FontColor=#FontInactive#
StringStyle=NORMAL
FontSize=8
StringAlign=RIGHT
FontFace=#Font#
Antialias=1
Postfix="°"
StringEffect=Shadow

[MeterDay2]
;MeasureName=MeasureWeatherDay2
Meter=STRING
X=495
Y=190
FontColor=#FontInactive#
FontSize=10
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Text="Tomorrow"
Antialias=1
StringEffect=Shadow

[MeterDesc2]
MeasureName=MeasureWeatherDesc2
Meter=STRING
X=460
Y=167
FontColor=#FontInactive#
FontSize=8
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Antialias=1
StringEffect=Shadow

[MeterIcon2]
MeasureName=MeasureWeatherIcon2
Meter=IMAGE
H=50
W=50
X=505
Y=160
User avatar
sephirotess
Posts: 332
Joined: December 8th, 2016, 6:45 am

Re: Weather.ini RegExp Error

Post by sephirotess »

Hi,

Try to replace (on the url lines):

Code: Select all

XML.weather.com/weather
by:

Code: Select all

wxdata.weather.com/wxdata/weather
wolfesamk
Posts: 3
Joined: February 16th, 2017, 4:19 am

Re: Weather.ini RegExp Error

Post by wolfesamk »

that did it! thanks friend.
User avatar
sephirotess
Posts: 332
Joined: December 8th, 2016, 6:45 am

Re: Weather.ini RegExp Error

Post by sephirotess »

You're welcome :welcome:.
Post Reply