Loading ...
Sorry, an error occurred while loading the content.
 

Fwd: flickr.photos.search often returns 0 results

Expand Messages
  • Matt Lunn
    I ve been experiencing problems with the flickr.photos.search method; similar to what was described in
    Message 1 of 9 , Sep 29, 2012
      I've been experiencing problems with the flickr.photos.search method; similar to what was described in this post, but more widespread than just "has_geo=0".

      Randomly, and often (which is the key problem), the API returns 0 results for requests which, using exactly the same parameters, had returned results before. This appears on both the API explorer, and with my own application.

      Example on the API Explorer:

      Request:

      Response (note the total, and pages numbers, yet page 1 returned 0):
      { "photos": { "page": 1, "pages": 21, "perpage": "500", "total": "10201", 
      "photo": [] }, "stat": "ok" }

      Example on my application (some request parameters removed for security/ brevity):

      Request:
      contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1420452681&oauth_timestamp=1348936211&page=1&per_page=100

      Response:
      {"photos":{"page":1, "pages":103, "perpage":100, "total":"10292", "photo":[]}, "stat":"ok"}

      Request (exactly the same criteria as the previous request, but for page 2):
      contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1338486669&oauth_timestamp=1348936212&page=2&per_page=100

      Response:
      {"photos":{"page":2, "pages":105, "perpage":100, "total":"10433", "photo":[/* All photos here were returned correctly */]}, "stat":"ok"}

      Request (exactly the same criteria as the previous request but for page 3)
      contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1338486669&oauth_timestamp=1348936212&&page=3&per_page=100

      Response:
      {"photos":{"page":3, "pages":103, "perpage":100, "total":"10262", "photo":[]}, "stat":"ok"}

      I know that "contacts" is in testing, but I've observed this behaviour without the contacts parameter.
    • Jamie Kitson
      Perhaps this is a bit irrelevant, but I don t think this is the same issue. 1) the has_geo=0 issue was not random, it happened for periods of time, starting in
      Message 2 of 9 , Oct 1, 2012
        Perhaps this is a bit irrelevant, but I don't think this is the same issue.

        1) the has_geo=0 issue was not random, it happened for periods of time, starting in the late evening (UK time) and ending sometime the next day.
        2) the result would always either tell me I had zero photos, zero pages and return zero photos, or the search would return *nothing* at all.

        I can recreate your issue, for example, this page:

        <?xml version="1.0" encoding="utf-8" ?>
        <rsp stat="ok">
        <photos page="3" pages="8" perpage="100" total="714">

        only had 5 photos on it. Obviously it should have had 100.

        As you say this is apparently random, and later calls using the same parameters returns more photos.

        Sorry I can't be more help, Jamie

        --- In yws-flickr@yahoogroups.com, Matt Lunn <matt@...> wrote:
        >
        > I've been experiencing problems with the flickr.photos.search method;
        > similar to what was described in
        > this<http://tech.groups.yahoo.com/group/yws-flickr/message/7798> post,
        > but more widespread than just "has_geo=0".
        >
        > Randomly, and *often* (which is the key problem), the API returns 0 results
        > for requests which, using exactly the same parameters, had returned results
        > before. This appears on *both* the API explorer, and with my own
        > application.
        >
        > Example on the API Explorer:
        >
        > *Request:*
        > http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=ae9db31943a0676b7012c8089458d8a8&min_upload_date=1317398953&max_upload_date=1348934953&contacts=all&per_page=500&page=1&format=json&nojsoncallback=1&auth_token=72157631650513689-d2791daa549f9c33&api_sig=a2d3f07349a648262eafa8b6a1459887
        >
        > *Response (note the total, and pages numbers, yet page 1 returned 0):*
        > { "photos": { "page": 1, "pages": 21, "perpage": "500", "total": "10201",
        > "photo": [] }, "stat": "ok" }
        >
        > Example on my application (some request parameters removed for security/
        > brevity):
        >
        > *Request:*
        > contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1420452681&oauth_timestamp=1348936211&page=1&per_page=100
        >
        > *Response:*
        > {"photos":{"page":1, "pages":103, "perpage":100, "total":"10292",
        > "photo":[]}, "stat":"ok"}
        >
        > *Request (exactly the same criteria as the previous request, but for page
        > 2):*
        > contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1338486669&oauth_timestamp=1348936212&page=2&per_page=100
        >
        > *Response:*
        > {"photos":{"page":2, "pages":105, "perpage":100, "total":"10433",
        > "photo":[/* All photos here were returned correctly */]}, "stat":"ok"}
        >
        > *Request (exactly the same criteria as the previous request but for page 3)*
        > :
        > contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1338486669&oauth_timestamp=1348936212&&page=3&per_page=100
        >
        > *Response:*
        > {"photos":{"page":3, "pages":103, "perpage":100, "total":"10262",
        > "photo":[]}, "stat":"ok"}
        >
        > I *know* that "contacts" is in testing, but I've observed this behaviour *
        > without* the contacts parameter.
        >
      • Andrea Prosperi
        I m observing this issue too but there is something more: a 504 error (gateway timeout) is generating everytime this api fails... Are you experiencing the same
        Message 3 of 9 , Oct 1, 2012
          I'm observing this issue too but there is something more: a 504 error (gateway timeout) is generating everytime this api fails...

          Are you experiencing the same retcode?
          Sent using CrapBerry Mobile Phones

          From: Matt Lunn <matt@...>
          Sender: yws-flickr@yahoogroups.com
          Date: Sat, 29 Sep 2012 17:40:52 +0100
          To: <yws-flickr@yahoogroups.com>
          ReplyTo: yws-flickr@yahoogroups.com
          Subject: [yws-flickr] Fwd: flickr.photos.search often returns 0 results

           

          I've been experiencing problems with the flickr.photos.search method; similar to what was described in this post, but more widespread than just "has_geo=0".


          Randomly, and often (which is the key problem), the API returns 0 results for requests which, using exactly the same parameters, had returned results before. This appears on both the API explorer, and with my own application.

          Example on the API Explorer:

          Request:

          Response (note the total, and pages numbers, yet page 1 returned 0):
          { "photos": { "page": 1, "pages": 21, "perpage": "500", "total": "10201", 
          "photo": [] }, "stat": "ok" }

          Example on my application (some request parameters removed for security/ brevity):

          Request:
          contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1420452681&oauth_timestamp=1348936211&page=1&per_page=100

          Response:
          {"photos":{"page":1, "pages":103, "perpage":100, "total":"10292", "photo":[]}, "stat":"ok"}

          Request (exactly the same criteria as the previous request, but for page 2):
          contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1338486669&oauth_timestamp=1348936212&page=2&per_page=100

          Response:
          {"photos":{"page":2, "pages":105, "perpage":100, "total":"10433", "photo":[/* All photos here were returned correctly */]}, "stat":"ok"}

          Request (exactly the same criteria as the previous request but for page 3)
          contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1338486669&oauth_timestamp=1348936212&&page=3&per_page=100

          Response:
          {"photos":{"page":3, "pages":103, "perpage":100, "total":"10262", "photo":[]}, "stat":"ok"}

          I know that "contacts" is in testing, but I've observed this behaviour without the contacts parameter.
        • Tristan Savatier
          i am also observing random cases where flickr.photos.search returns 0 results instead of correct results, and it gives a correct result count (yet it returns 0
          Message 4 of 9 , Oct 1, 2012
            i am also observing random cases where flickr.photos.search returns 0
            results instead of correct results, and it gives a correct result
            count (yet it returns 0 results).

            i see that with calls that do not involve has_geo.

            -t

            On Mon, Oct 1, 2012 at 2:32 AM, Jamie Kitson <jamie@...> wrote:
            > Perhaps this is a bit irrelevant, but I don't think this is the same issue.
            >
            > 1) the has_geo=0 issue was not random, it happened for periods of time, starting in the late evening (UK time) and ending sometime the next day.
            > 2) the result would always either tell me I had zero photos, zero pages and return zero photos, or the search would return *nothing* at all.
            >
            > I can recreate your issue, for example, this page:
            >
            > <?xml version="1.0" encoding="utf-8" ?>
            > <rsp stat="ok">
            > <photos page="3" pages="8" perpage="100" total="714">
            >
            > only had 5 photos on it. Obviously it should have had 100.
            >
            > As you say this is apparently random, and later calls using the same parameters returns more photos.
            >
            > Sorry I can't be more help, Jamie
          • jamieakitson
            I am now having serious inconsistency issues too. Very often the search method will return less photos than requested even though it states that there are more
            Message 5 of 9 , Oct 3, 2012
              I am now having serious inconsistency issues too. Very often the search method will return less photos than requested even though it states that there are more than requested, eg, this was followed by eight photos, despite the fact it should obviously have had ten:

              <rsp stat="ok">
              <photos page="1" pages="318" perpage="10" total="3177">


              --- In yws-flickr@yahoogroups.com, Matt Lunn <matt@...> wrote:
              >
              > I've been experiencing problems with the flickr.photos.search method;
              > similar to what was described in
              > this<http://tech.groups.yahoo.com/group/yws-flickr/message/7798> post,
              > but more widespread than just "has_geo=0".
              >
              > Randomly, and *often* (which is the key problem), the API returns 0 results
              > for requests which, using exactly the same parameters, had returned results
              > before. This appears on *both* the API explorer, and with my own
              > application.
              >
              > Example on the API Explorer:
              >
              > *Request:*
              > http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=ae9db31943a0676b7012c8089458d8a8&min_upload_date=1317398953&max_upload_date=1348934953&contacts=all&per_page=500&page=1&format=json&nojsoncallback=1&auth_token=72157631650513689-d2791daa549f9c33&api_sig=a2d3f07349a648262eafa8b6a1459887
              >
              > *Response (note the total, and pages numbers, yet page 1 returned 0):*
              > { "photos": { "page": 1, "pages": 21, "perpage": "500", "total": "10201",
              > "photo": [] }, "stat": "ok" }
              >
              > Example on my application (some request parameters removed for security/
              > brevity):
              >
              > *Request:*
              > contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1420452681&oauth_timestamp=1348936211&page=1&per_page=100
              >
              > *Response:*
              > {"photos":{"page":1, "pages":103, "perpage":100, "total":"10292",
              > "photo":[]}, "stat":"ok"}
              >
              > *Request (exactly the same criteria as the previous request, but for page
              > 2):*
              > contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1338486669&oauth_timestamp=1348936212&page=2&per_page=100
              >
              > *Response:*
              > {"photos":{"page":2, "pages":105, "perpage":100, "total":"10433",
              > "photo":[/* All photos here were returned correctly */]}, "stat":"ok"}
              >
              > *Request (exactly the same criteria as the previous request but for page 3)*
              > :
              > contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1338486669&oauth_timestamp=1348936212&&page=3&per_page=100
              >
              > *Response:*
              > {"photos":{"page":3, "pages":103, "perpage":100, "total":"10262",
              > "photo":[]}, "stat":"ok"}
              >
              > I *know* that "contacts" is in testing, but I've observed this behaviour *
              > without* the contacts parameter.
              >
            • David Wilkinson
              I ve also been seeing searches return less photos than were expected in the past few days. Dave W/
              Message 6 of 9 , Oct 3, 2012
                I've also been seeing searches return less photos than were expected in the past few days.

                Dave W/

                On 3 Oct 2012, at 17:47, "jamieakitson" <jamie@...> wrote:

                 

                I am now having serious inconsistency issues too. Very often the search method will return less photos than requested even though it states that there are more than requested, eg, this was followed by eight photos, despite the fact it should obviously have had ten:

                <rsp stat="ok">
                <photos page="1" pages="318" perpage="10" total="3177">

                --- In yws-flickr@yahoogroups.com, Matt Lunn <matt@...> wrote:
                >
                > I've been experiencing problems with the flickr.photos.search method;
                > similar to what was described in
                > this<http://tech.groups.yahoo.com/group/yws-flickr/message/7798> post,
                > but more widespread than just "has_geo=0".
                >
                > Randomly, and *often* (which is the key problem), the API returns 0 results
                > for requests which, using exactly the same parameters, had returned results
                > before. This appears on *both* the API explorer, and with my own
                > application.
                >
                > Example on the API Explorer:
                >
                > *Request:*
                > http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=ae9db31943a0676b7012c8089458d8a8&min_upload_date=1317398953&max_upload_date=1348934953&contacts=all&per_page=500&page=1&format=json&nojsoncallback=1&auth_token=72157631650513689-d2791daa549f9c33&api_sig=a2d3f07349a648262eafa8b6a1459887
                >
                > *Response (note the total, and pages numbers, yet page 1 returned 0):*
                > { "photos": { "page": 1, "pages": 21, "perpage": "500", "total": "10201",
                > "photo": [] }, "stat": "ok" }
                >
                > Example on my application (some request parameters removed for security/
                > brevity):
                >
                > *Request:*
                > contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1420452681&oauth_timestamp=1348936211&page=1&per_page=100
                >
                > *Response:*
                > {"photos":{"page":1, "pages":103, "perpage":100, "total":"10292",
                > "photo":[]}, "stat":"ok"}
                >
                > *Request (exactly the same criteria as the previous request, but for page
                > 2):*
                > contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1338486669&oauth_timestamp=1348936212&page=2&per_page=100
                >
                > *Response:*
                > {"photos":{"page":2, "pages":105, "perpage":100, "total":"10433",
                > "photo":[/* All photos here were returned correctly */]}, "stat":"ok"}
                >
                > *Request (exactly the same criteria as the previous request but for page 3)*
                > :
                > contacts=all&format=json&max_upload_date=1348936211&method=flickr.photos.search&min_upload_date=1317400211&nojsoncallback=1&oauth_consumer_key=dabd514750232956f641572a829e4b7f&oauth_nonce=1338486669&oauth_timestamp=1348936212&&page=3&per_page=100
                >
                > *Response:*
                > {"photos":{"page":3, "pages":103, "perpage":100, "total":"10262",
                > "photo":[]}, "stat":"ok"}
                >
                > I *know* that "contacts" is in testing, but I've observed this behaviour *
                > without* the contacts parameter.
                >


              • Tristan Savatier
                i get the same problems. for example, a search returns 80 results and i use pagination with per_page=12 then when i call the same search with page=2 (to get
                Message 7 of 9 , Oct 3, 2012
                  i get the same problems.

                  for example, a search returns 80 results and i use pagination with per_page=12

                  then when i call the same search with page=2 (to get the second page
                  of the results), i get 0 results.

                  i am certain that this is caused by some sort of timeout within the
                  flickr database servers.

                  the problem is that the flickr API returns a result formated as being
                  "valid", rather than a result indicating an error.

                  if an error was returned by the API, then applications could retry
                  (maybe after a small delay) to get the correct search result.

                  -t

                  On Wed, Oct 3, 2012 at 9:47 AM, jamieakitson <jamie@...> wrote:
                  > I am now having serious inconsistency issues too. Very often the search method will return less photos than requested even though it states that there are more than requested, eg, this was followed by eight photos, despite the fact it should obviously have had ten:
                • Matt Lunn
                  I am still seeing the same issues described in this thread. I would like to re-iterate Tristan s point that the important problem here is that the invalid
                  Message 8 of 9 , Oct 18, 2012
                    I am still seeing the same issues described in this thread.

                    I would like to re-iterate Tristan's point that the important problem here is that the invalid response includes all the characteristics of a successful response; and there is no way in your program to detect/ defend yourself against this. 

                    If the response at least indicated an error, we could retry/ fail gracefully as appropriate and it would not be such a problem (although obviously, still not ideal!)

                    Regards,
                    Matt
                  • Tristan Savatier
                    i m sure that flickr staff is aware of this problem, because it s been going on for so long :(
                    Message 9 of 9 , Oct 18, 2012
                      i'm sure that flickr staff is aware of this problem, because it's been going on for so long :(

                      On Thu, Oct 18, 2012 at 3:00 PM, Matt Lunn <matt@...> wrote:


                      I am still seeing the same issues described in this thread.

                      I would like to re-iterate Tristan's point that the important problem here is that the invalid response includes all the characteristics of a successful response; and there is no way in your program to detect/ defend yourself against this. 

                      If the response at least indicated an error, we could retry/ fail gracefully as appropriate and it would not be such a problem (although obviously, still not ideal!)

                      Regards,
                      Matt



                    Your message has been successfully submitted and would be delivered to recipients shortly.