Ask Your Question
0

Error "Could not get URL" Pulling Images

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

aven gravatar image

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

Hi,

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 [ http://nsar.rets.paragonrels.com/rets/fnisrets.aspx/NSAR/getobject] 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

Comments

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 -0500 )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 -0500 )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 -0500 )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 -0500 )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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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

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: http://nationalassociationofrealtors.github.io/libRETS/documentation/api/classlibrets_1_1_object_descriptor.html

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 2,579 times

Last updated: Sep 30 '15