-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
RuntimeError: await wasn't used with future #80
Comments
Also if there's a better channel to send you feedback on the current master i'll be happy to use that instead |
Nah, issues like this are fine. Regarding the error though, this is something that comes from aiohttp and asyncio itself, and thus it's not my bug. As far as I'm aware, this can happen if your internet becomes unstable, which would explain why you're getting it after a restart too. There's not much I can do about it, other than just handle the exception and move on. Although if this is really caused by internet instability, then the "moving on" step may end up in an infinite loop, which I'd like to avoid. |
There's nothing on the |
I have had some trouble with my ISP with tunneling in the past, but my internet seems to be fine now. I was even playing a game when it happened yesterday, so I'm pretty sure it's not the internet... |
No no, it is the internet connection's fault. But it's not a matter of losing it, more like it becoming temporarily unstable. Games and other software doesn't use I'll just open an issue and see what the |
To file the issue, I'll need some information from you. Specifically:
Remember to run these from the |
Also, I've pushed out 5e53448 to try and remedy this, as I saw some correlation between my code and what google was suggesting (not awaiting something properly). Theoretically it shouldn't matter, as awaiting calls the You may want to try this out for a bit before we file an issue. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@Totesfleisch There's a pinned issue with this exact error, that you seem to have missed: #68 Please only comment under the issue if you're getting the same (or at least very similar) traceback. |
I'm running the compiled version, so I ran the commands in the folder I used to build the exe.
I'll try 5e53448 and let you know if I encounter it again. |
So I left my PC running for a couple of days to test it, and it kept happening. I think it was a little less, but that might be due to other outside influences. I also wrote a .bat file to update to the current master, which I thought might be helpful to other people testing or people using master bcs of critical bugs.
edit:
It's pretty similar but doesn't have "Exiting..." at the end. I guess that answers my question. I haven't seen it progress further after the error yet. edit 2: |
This error comes from the watch loop task. Thing is, the watch loop is only started at the very beginning of the application, and then not handled, checked or touched afterwards. If it dies because of an exception, the application will stop sending watch payloads to the current watching channel, and the mining will just stop. This won't end up in a fatal error like in your first case, because the watch loop is a task that can "swallow" all exceptions, while the first error came from the main loop that controls the application state and GUI. I'll just file an aiohttp bug report and see what they say about this. |
Oh, you're right. I didn't look properly and confused the campaign and drop progress, so I thought it mined further. I guess we'll leave it at that, and we'll see if aiohttp do something... |
Just got another one, also on startup and with aiohttp, that isn't being caught. It seems to be really similar to the one I opened this issue with:
|
Assuming you're running this from the built executable form, would it be possible for you to test running it from source? I'm wondering if PyInstaller does something weird to the event loop, but to check that, you'd need to try getting the same error running it from source. |
I ran it from the same folder I used to build the exe and got this: edit: I ran “env/Scripts/activate.bat” and then “python main.py” in the directory.
|
@drachedachte1 That one is already known and solved for Please only comment if you're having the same issue, |
@Windows200000 Been thinking about this one lately. I made you a slightly modified File: main.zip Oh, also, since it just occurred to me I haven't really suggested you this yet. From what I've tried to research about similar issues others were having, this particular error could be a result of an external application forcing the Python interpreter into ceasing creating a connection. To ensure that's not the case for you, please take a look at whatever programs you may have running in the background on your PC, specifically ones that can interfere with network traffic (antivirus, firewall, connection throughput enhancers, etc.), and try temporarily disabling those to see if they could be the cause here. |
I'll try this when I have time. I'm assuming I should try it after I find the .exe crashing. I only run windows defender and have no other network ulities. |
I have the same issue as @Windows200000 but for me it just after log in the mainpy provided by @DevilXD didin't solve the issue for me PS : the same build works fine on my other machine with the same version of python 3.10.5 |
Because it was never supposed to solve the issue, in case you haven't realized it from my description, it's intended to enable extra debugging information that I'd very much need in order to determine where is the problem. If you're having the same issue, please use it and comment with whatever the console spits out during runtime please. |
i ran the python main.py from activated env and this is the output
and the error in the GUI is
|
Hmm. That's just an unclosed executable icon file. Not sure why this happened, but also, this has pretty much a zero chance to interfere with anything relating to making internet requests that the error comes from, so entirely unrelated. This leads me nowhere for now. You'll need to try finding the cause yourself, or someone from the |
So after not getting the error for a week I finally got it again, but when trying your main.py with the latest build I ran into #100. Can I use my cookies and settings from the .exe in the .py of the build I used to make the exe somehow? Otherwise, I'll have to wait til it crashes again, because I'm locked out... |
Not sure if I'm getting this question right, but essentially, the executable form is the same as the source code form, the only difference is that the source code comes as a bunch of So like, yes, you can use the same |
Turns out I'm just dumb and didn't realize the files wouldn't be there if I didn't actually run the .py yet, so I wasn't sure about where to put them. Here's the traceback:
the terminal:
|
I see. Still the same error heh? Also, I gotta deal with this icon error at some point, it should be just a matter of explicitly closing the file after creating the icon object. |
LMK if I can help you further somehow, and thanks for making this! |
An interesting find. This information should probably be put under the aiohttp issue for sure. I'll pass it there. |
looks like I have the same error in v15: 01:28:49: Fatal error encountered: I have no reason to think that the problem is internet stability. It seems more like an OS problem. For me it started after I reinstalled Windows 7 with a hard drive change. Twitch itself works, but what a coincidence - if i open Twitch stream in VLC (player), i get certificate related error. At the same time, the same certificate in the browser is listed as safe/valid. UPD: Tested on two different internet providers, result is the same UPD2: So, instead of updating my outdated Windows version, i simply put the latest W7 distribution. And now the program works. If problem is really with certificates, the best thing you could do is adding feature to ignore this problem (again, like in VLC - there you can "accept" problematic certificate for 24 hours \ forever) |
@guihkx Could you try running your repro on this piece of code, if possible? import asyncio
import aiohttp
async def main():
async with aiohttp.request("https://google.com") as response:
print(await response.text())
asyncio.run(main()) Since this issue now received an official CPython issue and has a repro, I'd like to find something smaller than this entire monster of a project, to repro the issue on. If you'd happen to have a Discord account (or would be willing to make one), we could sit down tomorrow, around 2-6 PM your time (assuming GMT-3), to hopefully narrow it down as much as possible. Well, unless it already fails on the code above x) I'd prefer Discord as it makes it easier to discuss things over interactive chat, rather than messages under issues like this one. My Discord tag is |
Sure, no problem. I've added you on Discord. The code as it is doesn't seem correct, btw:
|
I tried with this one instead (I grabbed it from their website): import asyncio
import aiohttp
async def main():
async with aiohttp.ClientSession() as session:
async with session.get('https://www.google.com/') as resp:
print(await resp.text())
asyncio.run(main()) This is what I got:
|
The CPython issue on this has been "temporarily" closed, until someone from the However, not all is lost - I now know what exactly causes the issue. With that, the only other option would be for me to rework the entire I'll get to it when I can find some free time. This issue is now a part of v16 task list goals too: #234 |
Okay, so I have some good news. There's been a PR made to pip install --force-reinstall git+https://github.com/stalkerg/aiohttp@coroutine-wrapper-fix If you'd be unsure how to do this, you can change the
..., and then delete and recreate the PR link: aio-libs/aiohttp#7785 |
Actually, nevermind - the PR has already been merged (aio-libs/aiohttp@a57dc31), and it looks like the fix will become available in |
Just in case - I am still interested in confirmation that it's really help for your case. |
@MehmetCanWT I think you have ipv6 in your system, can you try to install the latest master branch of aiohttp and test again? |
My Miner is now also dead after a Win11 reinstall. //edit: |
i reinstall old windows server to my server and it's working again |
a99227a should prevent this issue from happening, as explained above. Please try out the latest development build, and let me know if this issue is now resolved. |
I'm assuming this isn't a thing anymore, so it can finally be closed 😄 |
After running for a while, the miner usually throws an error and terminates. When I try to run it again, it throws it on startup. It typically works the next day again. I'll update this if I can figure out the circumstances more precisely.
The text was updated successfully, but these errors were encountered: