S
Solara•17mo ago
Barrold

The timer thread is an infinte loop That

The timer thread is an infinte loop. That's the only loop I know of. And the timer isn't a problem when only using one second ticks to update the Markdown displayed time. The fifteen minute ticks cause no problem until they are used to trigger the component update. I don't touch the render function. I can show you more of the code @MaartenBreddels. Should I paste it here?
9 Replies
MaartenBreddels
MaartenBreddels•17mo ago
lets start a thread, yeah, you can paste more here
Barrold
BarroldOP•17mo ago
OK. This is all the solara-specifc code. If you want to see it, I can paste the file imported as CC as well.
Barrold
BarroldOP•17mo ago
Btw, here's the streamlit version of the app: https://celestialcompanion.streamlit.app/
MaartenBreddels
MaartenBreddels•17mo ago
i can't spot it right now 😦 I'm preparing for vacation.. so i cannot help a lot now i would try to debug this youself print out stuff, comment out stuff etc the code is bigger than i expected.. and i see nothing obviously wrong find when it breaks, when it doesn't
Barrold
BarroldOP•17mo ago
I'll see what I can do. Can you point me to a solara example of timer-driven component updates? Have a great vacation!
MaartenBreddels
MaartenBreddels•17mo ago
https://discord.com/channels/1106593685241614489/1106593686223069309/1111279663805898863 this might help but yours looks the same, its look good can't stand it! 🙂 if you fix it, let me know, i'm curious
Barrold
BarroldOP•17mo ago
The problem was that I was passing passing the value and not the reaction object itself. The state updating is working well for all the display objects. Thanks for your help! Now most of what I have to deal with is formatting.
MaartenBreddels
MaartenBreddels•17mo ago
which line was that?
Barrold
BarroldOP•17mo ago
That was at like line 13. In the code below, dateTime is just a datetime object. I have to learn to think more like a compiler! @solara.component def updateGlobe(dateTime, COLZ, localTimeZone, localLat, localLong): x=dateTime for cob in CC.Celestial(localTimeZone, localLat, localLong).iterrows(): ... Actually, I just looked at the example you posted this morning (8:39 CST). I'm surprised that DataDashboard re-executes when counter.value is passed. Value passing didn't work for me!
Want results from more Discord servers?
Add your server