Khiro95 / Awqat-Salaat

A simple Windows widget to show the time of the next prayer alongside a countdown on the taskbar.
MIT License
49 stars 2 forks source link

[BUG] Could not convert string to double #25

Open sfksuperman opened 3 weeks ago

sfksuperman commented 3 weeks ago

Please check this, happening from today:

image

Khiro95 commented 3 weeks ago

Hi @sfksuperman, and thanks for rising this issue.

I see the api is returning unexpected result (latitude & longitude) for your case 😕

"meta":{
   "latitude":"*******",
   "longitude":"*******",
   "timezone":"Asia/Qatar",
   "method":{
      "id":10,
      "name":"Qatar",
      "params":{
         "Fajr":18,
         "Isha":"90 min"
      },
      "location":{
         "latitude":25.2854473,
         "longitude":51.5310398
      }
   },
   "latitudeAdjustmentMethod":"ANGLE_BASED",
   "midnightMode":"STANDARD",
   "school":"STANDARD",
   "offset":{
      "Imsak":0,
      "Fajr":0,
      "Sunrise":0,
      "Dhuhr":0,
      "Asr":0,
      "Maghrib":0,
      "Sunset":0,
      "Isha":0,
      "Midnight":0
   }
}

However, I couldn't reproduce the issue using the widget, which is an odd thing. As a workaround, you may need to either:

sfksuperman commented 3 weeks ago

Hi @sfksuperman, and thanks for rising this issue.

I see the api is returning unexpected result (latitude & longitude) for your case 😕

"meta":{
   "latitude":"*******",
   "longitude":"*******",
   "timezone":"Asia/Qatar",
   "method":{
      "id":10,
      "name":"Qatar",
      "params":{
         "Fajr":18,
         "Isha":"90 min"
      },
      "location":{
         "latitude":25.2854473,
         "longitude":51.5310398
      }
   },
   "latitudeAdjustmentMethod":"ANGLE_BASED",
   "midnightMode":"STANDARD",
   "school":"STANDARD",
   "offset":{
      "Imsak":0,
      "Fajr":0,
      "Sunrise":0,
      "Dhuhr":0,
      "Asr":0,
      "Maghrib":0,
      "Sunset":0,
      "Isha":0,
      "Midnight":0
   }
}

However, I couldn't reproduce the issue using the widget, which is an odd thing. As a workaround, you may need to either:

  • Switch to the other service (you will have to set latitude/longitude in settings since it doesn't support your zip code), or
  • Try to use a different calculation method

But it works well on my other pc, lol.

image

Khiro95 commented 3 weeks ago

But it works well on my other pc, lol.

And on my PC too 🙂 Something is wrong with the API service for sure. But still need to handle such situations since it can happen from time to time.

Thanks again