Closed skulumani closed 7 years ago
Sure thing,
I'm using Anaconda and here is a list of installed packages.
These are the steps I'm using to try and test Spacetrack
ipython
from spacetrack import SpaceTrackClient
st = SpaceTrackClient(identity='email', password='password')
This will give the error shown above.
Am I missing a required package or other dependency?
Thanks, I'm able to reproduce the bug on Anaconda 4.4.0.
There's an asyncio.Lock()
created by RateLimiter
, which requires an event loop. Only the main thread has one by default and for some reason this happens on Anaconda 4.4.0:
import threading
print(threading.current_thread())
import spacetrack
print(threading.current_thread())
<_MainThread(MainThread, started 140737209025472)>
<_DummyThread(Dummy-1, started daemon 140737209025472)>
I don't understand why this is happening, but it does show that the ratelimiter
module should not be creating an asyncio lock eagerly in case it is being used in a thread.
Thank you for checking on it so quickly. I can try using a different version of Anaconda and see if the issue persists.
On Sat, Jun 17, 2017 at 1:39 PM, Frazer McLean notifications@github.com wrote:
There's an asyncio.Lock() created by RateLimiter, which requires an event loop. Only the main thread has one by default and for some reason this happens on Anaconda 4.4.0:
import threading
print(threading.current_thread()) import spacetrack print(threading.current_thread())
<_MainThread(MainThread, started 140737209025472)> <_DummyThread(Dummy-1, started daemon 140737209025472)>
I don't understand why this is happening, but it does show that the ratelimiter module should not be creating an asyncio lock eagerly in case it is being used in a thread.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/python-astrodynamics/spacetrack/issues/38#issuecomment-309229386, or mute the thread https://github.com/notifications/unsubscribe-auth/AFBaZt3SgPgimMxbjZeZv7gO1g4-ipU3ks5sFA9tgaJpZM4N9Rg9 .
It doesn't happen on Anaconda 4.3.1
You can pip install -U ratelimiter
to get the fix. I will release a new spacetrack
that requires ratelimiter>=1.2
Hello I'm recieving a runtime error while trying to run through the examples.
Any suggestions on how to fix it?
Thank you