peregrine icon indicating copy to clipboard operation
peregrine copied to clipboard

Error while trying the first "Multiples Exchange/ One Currency" example

Open ghost opened this issue 3 years ago • 7 comments

   exchanges = [getattr(ccxt, exchange_id)() for exchange_id in exchanges]
AttributeError: module 'ccxt.async_support' has no attribute '/'

ghost avatar Dec 22 '20 22:12 ghost

same for me, like below

opportunity = asyncio.get_event_loop().run_until_complete(get_opportunity_for_market("BTC/USD", collections_dir)) Traceback (most recent call last): File "", line 1, in File "/home/justin/anaconda3/envs/peregrine/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete return future.result() File "/mnt/f/projects/peregrine/peregrinearb/async_find_opportunities.py", line 324, in get_opportunity_for_market finder = OpportunityFinder(ticker, exchanges=exchanges, name=name) File "/mnt/f/projects/peregrine/peregrinearb/async_find_opportunities.py", line 52, in init exchanges = [getattr(ccxt, exchange_id)() for exchange_id in exchanges] File "/mnt/f/projects/peregrine/peregrinearb/async_find_opportunities.py", line 52, in exchanges = [getattr(ccxt, exchange_id)() for exchange_id in exchanges] AttributeError: module 'ccxt.async_support' has no attribute '/'

my pip list is below Package Version


aiodns 2.0.0 aiohttp 3.7.4 async-timeout 3.0.1 attrs 20.3.0 ccxt 1.42.38 certifi 2020.12.5 cffi 1.14.5 chardet 3.0.4 cryptography 3.4.6 decorator 4.4.2 idna 2.10 multidict 5.1.0 networkx 2.5 peregrinearb 1.8.0 pip 21.0.1 pycares 3.1.1 pycparser 2.20 requests 2.25.1 setuptools 52.0.0.post20210125 six 1.15.0 typing-extensions 3.7.4.3 urllib3 1.26.3 wheel 0.36.2 yarl 1.1.0

hola-ai avatar Feb 26 '21 03:02 hola-ai

Any updates on the above issue? I am facing the same error too

pratyushv9 avatar May 27 '21 07:05 pratyushv9

Is this entire project dead? 17 months since the latest update, the very first example in the ReadMe is failing and no response to requests for help, and this, and no response either. Would love to use this, but nervous about starting a large project with something already broken and abandoned, if anyone is still driving this, please respond.

SzQaNinja avatar Jun 15 '21 14:06 SzQaNinja

For anyone interested, here is the actual problem... in the example code provided are these two lines...

collections_dir = '/Users/wardbradt/cs/peregrine/' opportunity = asyncio.get_event_loop().run_until_complete(get_opportunity_for_market("BTC/USD", collections_dir))

as you can see, collections_dir is set to a literal string representation of some directory that of course will not exist on your machine. Then, that literal string is passed into the call for setting opportunity.

I am guessing the intent was to look into that directory, and find all of the exchanges you want to look through... but that literal string is never actually treated as a directory (which, again, even if it were, would not exist on anyones machine except the authors) and it is never searched for exchanges. Instead, it is parsed character by character as a string by downstream code, and since the first character is "/", that is where the error is originating.

I am done troubleshooting this... it is obviously broken and abandoned. If anyone pulls the string further and actually fixes it, please post the fix here, as I would still like to get it up and running, but I have to be realistic.

SzQaNinja avatar Jun 15 '21 18:06 SzQaNinja

... so, I couldn't help myself...

So, the code that is being called with that fucked up path has the inbound variable set as optional, with the default value = None. So I simply changed the demo code to not supply a value at all. But this still crashes, just differently. That call crawls inside a tangled web of asynchrounous non-sense (I despise asynchronous code, especially when the very next step depends on it's completion, thereby rendering the entire point moot...). Where it then crashes is in trying to iterate a coroutine, rather than iterating that coroutine's results. Obviously, something in the async/await chain is busted, and NOW I am totally done with this because it is too needlessly complicated, AND broken, AND abandoned.

Such a pity... we had such high hopes for you...

@wardbradt ???

SzQaNinja avatar Jun 15 '21 19:06 SzQaNinja

Is this entire project dead? 17 months since the latest update, the very first example in the ReadMe is failing and no response to requests for help, and this, and no response either. Would love to use this, but nervous about starting a large project with something already broken and abandoned, if anyone is still driving this, please respond.

At the moment, I am not actively maintaining this project. I will respond to some issues and review pull requests, but I am not currently working on code to contribute to its upkeep. There are some issues with the original implementation that have yet to be fixed, namely with regards to data directories and the use of async. @SzQaNinja

wardbradt avatar Jun 15 '21 21:06 wardbradt

@SzQaNinja Outside of my full-time job, I devote my personal coding time to a proprietary arbitrage/ MEV bot. Although I would like for the Peregrine project to be kept up-to-date, I have little time to contribute to it.

wardbradt avatar Jun 15 '21 22:06 wardbradt