TGonZo / rainmeter

Automatically exported from code.google.com/p/rainmeter
0 stars 0 forks source link

AccuWeather Parsing Error #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to parse a weather page from the AccuWeather API
2.
3.

What is the expected output? What do you see instead?
In the Rainmeter log, expected matching strings should be seen. Instead,
see "WebParser (788) Unknown error: 12002"

What version of the product are you using? On what operating system?
Using version 14001 on Windows Vista Home Premium 32-bit

Please provide any additional information below. If the problem is a
related to some config option attaching a example is always a good idea.
Try to keep it as simple as possible and make sure that it is a fully
working Rainmeter config (i.e. it includes all graphics too).

Here is sample of meter:
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=http://rainmeter.accu-weather.com/widget/rainmeter/weather-data.asp?location
=16803&metric=0
RegExp="(?si)<city>(.*?)</city>"
FinishAction=!RainmeterRedraw
CodePage=28591
StringIndex=1
Debug=1

Here is a sample of the logs:
DEBUG: (03:31:25.237) WebParser: Fetching URL:
http://rainmeter.accu-weather.com/widget/rainmeter/weather-data.asp?location=168
03&metric=0
DEBUG: (03:32:02.334) WebParser: Fetching URL: http://ipdetect.dnspark.com/
DEBUG: (03:32:02.474) WebParser: Finished URL: http://ipdetect.dnspark.com/
DEBUG: (03:32:25.235) WebParser (788) Unknown error: 12002
DEBUG: (03:34:34.466) WebParser: Fetching URL: http://ipdetect.dnspark.com/
DEBUG: (03:34:34.607) WebParser: Finished URL: http://ipdetect.dnspark.com/

Then it repeats the last two lines constantly.

What i want to know is, why the heck is it fetching that ipdetect page?

Original issue reported on code.google.com by ksja...@gmail.com on 14 Jul 2009 at 8:11

GoogleCodeExporter commented 9 years ago
No problems could be confirmed in this config.
Ipdetect might be a site used by other some skins. (i.e. IP adress checker) So 
It is
important for debugging to start this skin alone.
Probably this issue is unrelated to Rainmeter and your connection state seems 
to be a
cause.
"Error: 12002" means timeout. That is, Rainmeter cannot access this site.

http://rainmeter.accu-weather.com/widget/rainmeter/weather-data.asp?location=168
03&metric=0

By the way, can you access this site by a browser?

Original comment by kenz0.sa...@gmail.com on 14 Jul 2009 at 12:09

GoogleCodeExporter commented 9 years ago
RegExp="(?si)<city>(.*?)</city>"

The issue is in the parse the parse request ellement is wrong, you have it 
typed like
this:
(?si)
The "U" is missing

It should be:
(?siU)

So the corrected parse opening is actually:
RegExp="(?siU)

Try this and see if you get a correct reading 

Original comment by evmckay on 14 Jul 2009 at 5:48

GoogleCodeExporter commented 9 years ago
Thanks for your help, everyone, but after pulling an all-nighter and poring 
through
the forums (An author of quite a few of those articles being present) i finally
figured out what was wrong.

As to the WebParser.dll, i cannot say. i had to re-install Rainmeter 0.14.1 for 
it to
parse correctly. Even after correcting my RegExp to 
"(?siU).*<city>(.*)</city>.*", it
still refused to parse correctly, so i did the desperate thing to do.

As to displaying the parsed data (which took another 3 hours), i discovered 
that you
have to enable BackgroundMode and create a Background with a height and width
sufficient enough to display all of the data.

My creation can be found here:
http://contentdb.emule-project.net/view.php?pid=2003

It's the Dark Rainmeter made originally by JsMorley. i've updated it a bit and 
now it
uses the AccuWeather API while still complying to AccuWeather's terms.

Thanks for Rainmeter, the extensive forums, and the new API.

Original comment by ksja...@gmail.com on 14 Jul 2009 at 7:00

GoogleCodeExporter commented 9 years ago
Whoa! Issue NOT solved. The webparser is starting to make the same error as it 
had
before. Attached are the log and config files.

This time, it's not the config because it has been working most of the day.

Is the parser causing my sorrows?

Original comment by ksja...@gmail.com on 15 Jul 2009 at 1:37

Attachments:

GoogleCodeExporter commented 9 years ago
Are you running Rainmeter with Administrative Privileges?

If not you may try his and let us know the result

Original comment by evmckay on 15 Jul 2009 at 1:42

GoogleCodeExporter commented 9 years ago
After restarting my computer, it is working again.

i'm not doing the Admin Privileges because of the hassle, but i did do the 
Solution
4: Full control permissions to the Rainmeter's folder for the Users group in the
Caution page.

Original comment by ksja...@gmail.com on 15 Jul 2009 at 3:39

GoogleCodeExporter commented 9 years ago
Very Good.

I know if is a bit to ask, but if you could keep and eye on this, and see if it
happens again,and maybe any certain conditions, I would greatly appreciate it 

Original comment by evmckay on 15 Jul 2009 at 6:22

GoogleCodeExporter commented 9 years ago
No problem, glad to help.

i suspect it happens after my computer goes to sleep and then returns, which is 
a
known bug, no?

Also, i noticed a different error on line 50 of the Rainmeter.log:
DEBUG: (00:21:25.963) WebParser (788) Unknown error: 12029

Afterwards, the 12002 errors started showing up.

i'll do more testing when i can, though (Supposed to have an interview in 12 
hours).

Original comment by ksja...@gmail.com on 15 Jul 2009 at 6:52

GoogleCodeExporter commented 9 years ago
Although I say once again, this is a issue unrelated to parsing. Because it 
doesn't
reach even the parsing work. It is clear as long as the log was read.
If a problem is in parsing, a matching error should be returned like this.

DEBUG: (00:04:56.469) WebParser: Matching error! (-1)

It seems that you have failed in retrieve of raw source. This is considered 
that a
problem is out of Rainmeter.
Then, you should check the following.

1. Change to "Debug=2" and then check whether the file (WebParserDump.txt) has
downloaded to C:\.

2. Check access to the source by a browser directly.
(http://rainmeter.accu-weather.com/widget/rainmeter/weather-data.asp?location=16
803&metric=0)

3. Check other skins. (i.e. Tranquil > Weather)

4. Check whether it is blocked by the firewall.

@ evmckay
"pattern-match modifiers" should be added if needed. in this case, "s", "i" 
,"U", all
are unnecessary.

RegExp="<city>(.*?)</city>"

This is enough. a useless pattern will only reduce performance.

Original comment by kenz0.sa...@gmail.com on 15 Jul 2009 at 6:56

GoogleCodeExporter commented 9 years ago
Closed: Not a defect in the application.

Original comment by kimmo.pekkola on 19 Aug 2009 at 6:32