pcpartpicker icon indicating copy to clipboard operation
pcpartpicker copied to clipboard

RuntimeError: await wasn't used with future

Open zimaRed opened this issue 4 years ago • 4 comments

Hello! I just downloaded this on pip and I'm getting an error when trying to retrieve parts data. Here's my code:

`from pcpartpicker import API

api = API() #print(api.supported_parts)

cpu_data = api.retrieve("cpu")`

I get the following error:

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect return await fut RuntimeError: await wasn't used with future

Not sure what the cause of this is -- do you have any suggestions for what I could change?

zimaRed avatar Nov 19 '21 22:11 zimaRed

Hmmm, this is a weird one. What version of Python are you using? I just tested with 3.9.5 and did not get this error. If I remember correctly, there was a 3.9.x version that had this issue in the core async framework.

JonathanVusich avatar Nov 22 '21 20:11 JonathanVusich

Thank you for the response -- I'm using 3.9.4, will try updating and let you know how it goes.

zimaRed avatar Nov 22 '21 20:11 zimaRed

Hi Jonathan, I upgraded to python 3.10.0 and I'm still getting the same error. Not sure why, it's possible I have the wrong version for one of the dependencies but I'm not familiar with them.

zimaRed avatar Nov 22 '21 21:11 zimaRed

It's possible that a mismatch in dependency versions is causing the issue. I would recommend trying to install pcpartpicker into an empty virtual environment and see what happens then. Since I can't reproduce this issue, I am assuming that it is a problem with your Python environment.

JonathanVusich avatar Nov 24 '21 15:11 JonathanVusich