Received "An error occurred while preparing to issue the HTTP request: null"

I read the forum topic "An error occurred while preparing to issue the HTTP request: null" posted 6/24/09 but can't seem to fix a similar problem. I have an extractor pattern that grabs HTML pieces and save them into a session variables. The saved session variables are than inserted in the URL.

The log is as follows:

ADDRESS=7365 SHERMAN HOYT Ave
Storing this value in a session variable.
ZIP=92277
Storing this value in a session variable.
Zillow: Preliminary URL: http://www.zillow.com/homes/map/~#ADDRESS#~,-~#ZIP#~_rb/
Zillow: Using strict mode.
Zillow: An error occurred while preparing to issue the HTTP request: null

I'm absolutely sure that the variable isn't 'null' since I can see the results in the log.

The URL is http://www.zillow.com/homes/map/7365-SHERMAN-HOYT-Ave-,-92277_rb/

Thanks for your help.

Just so that I can clarify

Just so that I can clarify something you said:

You get the 'null' problem, but then you said that you can "see the results in the log", and you posted the real URL.

The way that this normally happens is, first, the 'null', and then the scrapeableFile never gets run, because of the 'null' error. What you said makes it sound like your scrapeableFile did get a chance to run.

Anyway, in short, the 'null' problem is usually a show-stopper for a scrapeableFile, so I'm just trying to make sure I understand what you mean by that last part of seeing the results in the log.

...
Is it possible that maybe the "ADDRESS" variable has a strange character in it? like.. a newline character? The 'null' error is unfortunately a little misleading; it doesn't forcibly mean that the variable was null. It just means that some illegal character got inside of your variable. Even a space could cause this problem, since spaces are supposed to be replaced with "%20" when it comes to URLs.

Hope that's a good start,
Tim

Fixed!!! :-)

Hi Tim,

I guess I'm getting better because I fixed it, I replaced the blank spaces with hyphens in the address.

Thanks!!!

Perfect :) Yes, spaces are

Perfect :)

Yes, spaces are unfortunately a problem with URLS. It's okay when you put then in the variables in the Parameters tab, but in the URL textbox, it gives you trouble-- just like you've seen.

If you encounter the error again in the future, just remember that it'll usually be because there is a non-URL-friendly character in there. Spaces are included, and usually need to be replaced by hyphens or the strange '%20's.

Glad you figured it out!

Yes, the scrapeableFile did get a chance to run...

Yes, the scrapeableFile did get a chance to run. The Zillow portion of the log is as follows:
Processing script: "Scrape Zillow"
Scraping file: "Zillow"
Zillow: Preliminary URL: http://www.zillow.com/homes/map/~#ADDRESS#~-,-~#ZIP#~_rb/
Zillow: Using strict mode.
Zillow: An error occurred while preparing to issue the HTTP request: null

Can you elaborate on your statement that a “null” is a show-stopper for a scrapeableFile?

I do not think the “ADDRESS” variable has a newline character in it because I can see it in the log:

ADDRESS=7365 SHERMAN HOYT Ave
Storing this value in a session variable.
ZIP=92277
Storing this value in a session variable.

Also, I have copied the ADDRESS and ZIP from the log and pasted it into a URL and was able to go to the website.

The URL is http://www.zillow.com/homes/map/7365-SHERMAN-HOYT-Ave-,-92277_rb/

This is so puzzling because it seems so simple and I have spent so many hours trying to fix the problem. I don’t know what to do. Please help me!!!