Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

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

Open
ghost opened this issue Dec 22, 2020 · 7 comments
Open

Comments

@ghost
Copy link

ghost commented Dec 22, 2020

   exchanges = [getattr(ccxt, exchange_id)() for exchange_id in exchanges]
AttributeError: module 'ccxt.async_support' has no attribute '/'
@hola-ai
Copy link

hola-ai commented Feb 26, 2021

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

@pratyushv9
Copy link

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

@SzQaNinja
Copy link

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
Copy link

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
Copy link

... 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 ???

@wardbradt
Copy link
Owner

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
Copy link
Owner

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants