Ask Your Question

Error "Could not get URL" Pulling Images

asked 2015-09-24 11:16:18 -0600

updated 2015-09-30 14:18:57 -0600


Recently when my application is trying to update all the data including images I always got the error on my server: "ExceptionType":"librets.RetsHttpExceptionNative","ExceptionMessage":"Could not get URL [] when it was trying to get either thumbnails or photos from you. I was thinking if there are issues with the Rets Session here.

The rets version is 1.7.2. My account name is NTPV16641 and librets version is 1.6.1.

So wondering if there's session time our or something that's causing the issue?

edit retag flag offensive close merge delete


The session should not be a problem unless your application is idle for a period of time. Do you receive any other information about the error? Does it always fail on the same request?

mdean gravatar imagemdean ( 2015-09-28 14:47:03 -0600 )edit

That's the only issue I'm having right now. I changed the timeout to be 1 hour on the server, now it just kept processing without doing anything now.

aven gravatar imageaven ( 2015-09-29 08:48:30 -0600 )edit

I tested getobject for Property and I was able to get photo URLs from that site without issue. Are you pulling individual photos or all photos for a listing or listings?

bwolven gravatar imagebwolven ( 2015-09-29 09:05:19 -0600 )edit

Are you still having issues with this. I see successful getobject requests from your account for Property Photo, Agent Photo and OfficeLogo?

bwolven gravatar imagebwolven ( 2015-09-30 10:47:09 -0600 )edit

Yeh, for some reason I managed to update all photos since last night. And I'll do a bit more testing on it. Thank you very much!

aven gravatar imageaven ( 2015-09-30 10:50:48 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-09-30 10:56:48 -0600

updated 2015-09-30 13:42:56 -0600

I see from the logs that you are requesting the actual photo binary data. It would be more efficient and less prone to timeouts if you requested photos using Location=1 which will return the URLs for the photos. It would also greatly reduce server load. Even if you needed local copies of the photos you could download them using the URL returned which would make more effective use of our image caching. It also looks like your librets must be set to rets version 1.5 not 1.7.2 from what we are showing in our logs.

You set the RETS version using SetRetsVersion() in the librets.RetsSession object.

You set Location=1 by using the GetObjectRequest object, method SetLocation (true).

To retrieve the URL use the ObjectDescriptor object, method GetObjectLocation() instead of getting the stream and writing the file to your storage. You should also check the reply code for the object by using method GetRetsReplyCode() to make sure it is a valid object.

Here is the librets help URL:

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-09-24 11:16:18 -0600

Seen: 3,336 times

Last updated: Sep 30 '15