question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi there,

First of all I LOVE your widget, it has finally put the touchbar to good use haha!

I set it up a few days ago and it was working nicely but yesterday it dropped out and returned an error, then was working again hours later, today the same thing however it never came back to life. Here’s what it says:

**Traceback (most recent call last)
File "<string>", line 25, in <module>**

If you have the time, mind taking a look at this?

Oh! Live update: it just came back while I was writing this up. Would you know what causes this?

Thanks a lot man, much appreciated!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chrislennoncommented, Mar 20, 2021

Hey @awkwardsky sorry for not getting back to you sooner. With regards to the calls not adding up to 136 537, I suspect (but not 100% sure) that this number relates to all calls made to the API (likely from that IP address). For example, these could have been calls from other devices or calls made in previous month buckets.

With respect to the month’s max calls, yeah their public (IP based) rate limiting is quite restrictive these days. For example assuming 1 device, 1 crypto pair, running 24/7 for a month would result in.

50 000 max_calls / (30 days * 24 hours * 60 minutes) = ~1 call per minute

For routes ahead I can see the following:

  1. Reducing the refresh rate, number of coins, and number of devices that are still calling whilst not being used

  2. I see that CryptoCompare has a free tier on their private API, this seems to increase the monthly cap from 50k to 100k

    • If you wanted to use this after obtaining an API key you would need to add it into the URL inside the script that BTT uses to call the API. In essence you would be looking for this line and append &api_key={your_api_key} at the end of this inside each script as documented here
  3. Significant structural changes to this application (this is more a note for myself) that would call all coins for each currency in a single data/pricemultifull call (as documented here) I’m not sure this would be possible, but would remove the multiplier by the number of crypto’s being used.

Hope this helps matters 😄

0reactions
awkwardskycommented, Mar 22, 2021

Hey @chrislennon

I reducing the refresh rate, to “Always run when widget becomes visible.” & “Execute script every 3600 seconds.”

My widget setting is not always visible, it’s visibility when i pressed the specific key. but I’m not sure the calls calculate in one day = my all pressed times * number of coin pairing widgets or the calls calculate in one day = (my all pressed times + 24 times) * number of coin pairing widgets which one it correct? or the other?

  1. I see that CryptoCompare has a free tier on their private API, this seems to increase the monthly cap from 50k to 100k

    • If you wanted to use this after obtaining an API key you would need to add it into the URL inside the script that BTT uses to call the API. In essence you would be looking for this line and append &api_key={your_api_key} at the end of this inside each script as documented here

it’s working haha! Your “getting back” is fast enough for me, don’t worry about it. thank a lots.

        url = "https://min-api.cryptocompare.com/data/pricemultifull?fsyms={}&tsyms={}&api_key=10817XXX....".format(coin_ticker, fiat_ticker)

this issue i have no idea how to refactor the script

Thank you for taking your valuable time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Problem Loading Widget on Android [SOLVED] - TechCult
Fix Problem Loading Widget on Android · Method 1: Restart your Device · Method 2: Remove the Widget · Method 3: Check Custom...
Read more >
Fix: Problem Loading Widget error on Android - Mobile Internist
Solution 1 – Remove the widget and add it again · Solution 2 – Make sure that the custom launcher has enough permissions...
Read more >
ErrorWidget class - widgets library - Flutter - Dart API docs
A widget that renders an exception's message. This widget is used when a build method fails, to help with determining where the problem...
Read more >
7 Ways to Fix Unresponsive Widgets on Android - MakeUseOf
7 Ways to Fix Unresponsive Widgets on Android · 1. Launch the App · 2. Restart Your Device · 3. Remove and Re-Add...
Read more >
Troubleshooting: Widget error - WellnessLiving
Problem. An error message that reads Widget URL is broken (skin id is not specified) is displayed where a widget should appear.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found