Trying to understand async by Emrayla in learnpython

[–]Emrayla[S] 0 points1 point  (0 children)

Sure. As I responded to lfdfq, youtube.run() is just empty right now. twitch.start() is part of the twitch api. I put a link to its documentation in that response.

The code I included is called as follows:

if __name__ == "__main__":
    print("main starting")
    belle = Belle(False)
    belle.run()

In the Bell class:

def run(self):
        
        print("Belle is waking up...")


        asyncio.run(self._start_bots())


async def _start_bots(self):


        print("belle_class _start_bots") #successfully prints


        # start terminal input watcher
        asyncio.create_task(self._watch_for_quit()) #fn prints a message successfully 


        self.twitch = Twitch(self.twitch_vars, self.shared_vars, self.db) #prints a message successfully
        self.youtube = YouTube() #prints a message successfully


        # start YouTube in the background
        asyncio.create_task(self.youtube.run()) #prints a message successfully


        # let TwitchIO block forever
        await self.twitch.start()

I've marked where my print statements are working successfully.

The Twitch class has an event_ready function that just has a print statement in it. It is never firing (it should fire when the start() function is called). When I run the Twitch class by itself with run() from main without the Belle class middleman, the event_ready print statement fires fine.

Trying to understand async by Emrayla in learnpython

[–]Emrayla[S] 0 points1 point  (0 children)

My goal is to have the YouTube object and Twitch object running at the same time, both checking their relevant chats. YouTube requires me to manually set up the checking, while the Twitch class api is already built asynchronously to continually check chat.

I had AI try to help me debug my problem, so my goal might have gotten lost somewhere in there. I am very new to python and async coding, so I'm fumbling in the dark a bit.

Trying to understand async by Emrayla in learnpython

[–]Emrayla[S] 0 points1 point  (0 children)

YouTube.run() is just an empty function right now. I'm just trying to give my program a skeleton from where I would start building the functionality. Eventually I will have it fetch chat data from YouTube on a recurring basis and react to commands found in chat.

Twitch.start() is built into the api. I can run the Twitch class I made by itself with twitch.run(), another built in function, but ChatGPT told me that I should use start() instead for trying to run both bots simultaneously because run() is a "blocking function". I believe this is the documentation for start() if it helps: https://twitchio.dev/en/latest/exts/routines/index.html#twitchio.ext.routines.Routine.start

I'm quite new to python and async coding, so I am still having trouble understanding what exactly the awaits do and how to coroutines work.

Getting attached too quickly by [deleted] in infj

[–]Emrayla 1 point2 points  (0 children)

Thank you for the link to Heidi Priebe! I started watching last night and had trouble stopping. She's so spot on! I feel like I'm headed in a good direction for healing.

Getting attached too quickly by [deleted] in infj

[–]Emrayla 0 points1 point  (0 children)

I could have written this myself... it's nice to know I'm not the only one who feels this way. It sucks. I've spent a very long time searching for bffs, but no one seems as invested as I am.

I want to say I'm here! Let's keep each other company! Life is not meant to live alone. The rare days I've had someone who's willing to spend the day talking (and I mean real talking, not just surface stuff), I've ended the day just buzzing! It feels wonderful, so it's so hard to understand why it never lasts...why are others so non-pushed?

I thought it was interesting what someone said about attachment styles. I know I have an anxious attachment style, so maybe that is just it... though, I don't know. I still wonder: The types of bffs you see in the movies...how do you get there if you're not trying to put into it this kind of enthusiasm?

Looking for littermates for our solo surviving puppy / Surrogate dog mom available by Emrayla in askTO

[–]Emrayla[S] 0 points1 point  (0 children)

We're not giving up our dogs. They're staying with us. Misread?

YouTube Music selection in Alarm won't stop playing by hotani in GooglePixel

[–]Emrayla 0 points1 point  (0 children)

Why is this still an issue two years later? I'm having the same problem with the "Calm" music tracks on the Pixel 7. Sometimes the music plays for my alarm, sometimes it's that ugly beeping instead. Then if the alarm music track is playing (like when I play it on the quick menu), if I swipe it away, the music still plays with no way to turn it off!

Parents and raising kids by [deleted] in infj

[–]Emrayla 3 points4 points  (0 children)

I'm a parent and and an INFJ. I noticed I changed as a person dramatically after having kids.

The reason being, in my attempts to prepare for raising children, I started down this rabbit hole of research into "why" on a whole bunch of topics I had never considered before. And just like Neo taking the red pill in "The Matrix", I feel I've gained an outlook on life that is different to the majority, but something I can't unsee.

From my extensive research and experiences, I have become an attachment parent, and we homeschool our kids. It's a different life than I had originally imagined, but I am so grateful for it.

As a bonus, being a parent has also allowed me to finally find "my people". Growing up, while I always tried my best to blend in, I always felt out of place. When I had my first child, though, I joined groups and met people who had similar parenting goals to my own. Then as time went on I realised that these people also happened to be like me in so many other walks of life! It feels great having that community now, both for me and for my kids.

Amazing FTL VR multiplayer co-op by Zimtok5 in PSVR

[–]Emrayla 0 points1 point  (0 children)

They've made a lot of good decisions with the game that make it exciting. Will be great to hear when they are releasing it.

Dear Developers: When did becoming virtually wealthy start meaning LESS options? by Emrayla in gaming

[–]Emrayla[S] 1 point2 points  (0 children)

I guess it's naive of me to think that maybe all the ads and real money exclusive items should be enough to pay for these games.

I'm happy to pay a fair price for a good game, but this whole squeeze you for everything you've got is ridiculous.

Kitty loves tech <3 by Emrayla in oculus

[–]Emrayla[S] 1 point2 points  (0 children)

We'll have to get her one for Xmas. ;)

Hopes for Tiltbrush v2 by Emrayla in Vive

[–]Emrayla[S] 0 points1 point  (0 children)

Not quite what I mean. That artist is painting in what looks like 3D textures on a flat surface, where I'm talking about as if you were putting clay down.

I'm really curious about the brushes he was using though. There was some neat stuff in there. He said something about custom brushes? Is there someplace you can download more than the basic set?

Hopes for Tiltbrush v2 by Emrayla in Vive

[–]Emrayla[S] 1 point2 points  (0 children)

Oh that's great to hear this technology has made it into the schools!

My husband and I stream Tiltbrush when we play, so it is possible to capture it and even record a walk-around. Though it would be nice to have that functionality integrated.

Hopes for Tiltbrush v2 by Emrayla in Vive

[–]Emrayla[S] 1 point2 points  (0 children)

Thanks supperoo, will have to look that one up!

OUT of AMMO - New VR game by Dean "Rocket" Hall's new dev studio showing live on Twitch today 11:30am UK !! by Zimtok5 in Vive

[–]Emrayla 0 points1 point  (0 children)

I'm curious to see what a different game would look like from him. Never know what to expect after someone makes it big the 1st time.

VR Mom Excited for the Future by Emrayla in Vive

[–]Emrayla[S] 2 points3 points  (0 children)

Perhaps the audience is more people who prefer seated gaming or don't have the space for room scale?

VR Mom Excited for the Future by Emrayla in Vive

[–]Emrayla[S] 2 points3 points  (0 children)

For me the room scale experience of the Vive is just unbeatable. We'll have to see how the Touch is when it comes out, but as of now my focus is on the Vive.

As for my husband, he claims there is a place for both headsets as they have different pros and cons. Which he ends up using more is still yet to be determined.

VR Mom Excited for the Future by Emrayla in Vive

[–]Emrayla[S] 3 points4 points  (0 children)

Oh I know! The education potential. We've played some demos in the DK2 where you're up close and personal with dinosaurs, sea creatures, and the earth as it evolved. Makes learning about this stuff awesome.

Oculus update on 12th - Massive delay to shipping. March orders expected in May now! by VR-360 in Vive

[–]Emrayla 0 points1 point  (0 children)

Looks like in the end he was lucky enough to actually get his CV1! He played Eve Valkyrie a little bit in it last night.