New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting Error while iterating iterator. Report a bug!!! #67
Comments
At first glance, it looks like you're trying to use async functions in Pythia, which it doesn't support. There is a hack where you create an async function to get data from Arma in a pseudo-asynchronous way, but that's just a Pythia hack and it has nothing to do with real python asyncio. For now, unless some kind of asyncio support is added to Pythia itself, you would probably have to do I guess the "report a bug" message comes from the fact that I didn't predict someone would actually use real asyncio in Pythia and that coroutines are iterable (so it tries to "iterate the iterator") |
Hi! As pointed out earlier, you could make it work, but that would require writing your own code for spinning an asyncio loop in a separate thread. I may or may not manage to add examples for doing that by the time 1.0 is released. On another note, I have taken a look at your avatar and, funnily enough, I am able to pinpoint the exact location where that photo was taken! :D |
Hi,
I did not expect anymore responses after 6 months, I have long abandoned
this project since.
I'm expecting you're from the place the photo was taken, otherwise that's a
very weird way to end a message
Op wo 10 aug. 2022 om 00:27 schreef Lukasz Taczuk ***@***.***
…:
Hi!
Just to let you know: I added a check that returns an error when you try
to execute coroutines, because that's not supported by Pythia. This will be
released along with Pythia 1.0, roughly within a month.
Sadly, this does not solve your issue, just informs that what you're
trying to do isn't doable out of the box.
As pointed out earlier, you could make it work, but that would require
writing your own code for spinning an asyncio loop in a separate thread.
See this for help:
https://stackoverflow.com/questions/32059732/send-asyncio-tasks-to-loop-running-in-other-thread
Be aware, though, that you'd then have to create separate functions for
querying the loop to see if your data that you wanted to read is available
already.
You'd also have to have a function that would stop the loop when you're
done with everything, at the end of the mission, for example.
I may or may not manage to add examples for doing that by the time 1.0 is
released.
On another note, I have taken a look at your avatar and, funnily enough, I
am able to pinpoint the exact location where that photo was taken! :D
—
Reply to this email directly, view it on GitHub
<#67 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKCDFZ6OWYWODVICGTGHSCDVYLLNZANCNFSM5S46QPTQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Met vriendelijke groet,
Jesse van Gool
|
When running the following code:
I get:
This piece of code is run in game using the following:
The client object comes from pytmi
The text was updated successfully, but these errors were encountered: